xwem-devel
[Top] [All Lists]

Re: fullscreen problem / question

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Re: fullscreen problem / question
Date: Sat, 12 Feb 2005 18:38:35 +0300
Cc: xwem-devel@xxxxxxxx
Organization: xwem.org
User-agent: Gnus/5.1002 (Gnus v5.10.2) sxemacs/22.1
Richard Klinda <ignotus@xxxxxxxxxxx> writes:

> Lg wrote me the following code snippet:
>
> ,----
> | (defvar ign-borders-alist '((generic . 2)
> |                             (fullscreen . 0)))
> | 
> | (defun ign-set-border-width (cl)
> |   "Set CL's border width to one in `ign-borders-alist'."
> |   (let ((bw (cdr (assq (xwem-cl-manage-type cl)
> |                        ign-borders-alist))))
> |     (when bw
> |       (xwem-client-set-property cl
> |                                 'x-border-width bw))))
> | 
> | (add-hook 'xwem-cl-activate-hook
> |           'ign-set-border-width)
> `----
>
> That way fullscreen programs (like MPlayer) don't have border, but it
> doesn't work now (xwem-version =>
> "dev@xxxxxxxxxxxxxxxx/xwem--dev--2.1--patch-10"), what may be the
> problem?

Kind of bug, but no, it is a feature that discloses a little
inconsistence.  It will be fixed in main--patch-21 and you should use
`xwem-cl-manage-hook' instead of `xwem-cl-activate-hook'.
`xwem-cl-activate-hook' and `xwem-cl-deactivate-hook' already removed.

Thanks for noticing this!

>
> Other question, I would like to have a function that makes the current
> client fullscreen, how can I do that?  Or better, I would like to make
> the current frame fullscreen (it overlaps the dockapp/ XWEM-minibuffer
> areas, and titlebar would be hidden).  Is there functionality for this?
>

You could use `H-x 7 f' or create your own command to make xwem frame
fit full screen geometry, like this:

    (define-xwem-command my-frame-fit-full-screen (&optional frame title-layout)
      "Make FRAME to fit full screen."
      (xwem-interactive (list xwem-frame-selected 'none))
    
      (unless frame (setq frame (xwem-frame-selected)))
      (unless title-layout (setq title-layout 'none))
    
      (xwem-frame-set-property frame 'title-layout title-layout)
      (setf (xwem-frame-xgeom frame)
            (copy-X-Geom (xwem-rootgeom)))
      (xwem-frame-apply-xgeom frame))

Also you can modify it to act as toggle.  If you want to keep some
info with frame(for later use) use `xwem-frame-put-prop'.  So your
toggle function will act in way like this:

    (let ((state (or (xwem-frame-get-prop frame 'my-saved-state)
                     'normal)))
       (case state
         (normal
           ;; Enable fit full screen
           ...
           (xwem-frame-put-prop frame 'my-saved-state 'fullscreen))
         (fullscreen
           ;; Disable fit full screen
           ...
           (xwem-frame-put-prop frame 'my-saved-state 'normal)))
      ..)

-- 
XWEM - Feel the freedom.

<Prev in Thread] Current Thread [Next in Thread>