Re: Sawfish and full maximization

On Wed, 17 Nov 2004 16:57:37 +0100
Jerome <j-andrieux laposte net> wrote:

> Sawfish maximize those applications so the maximum numbers of
> columns/lines fit within the screen. This makes maximized
> windows not to cover the whole viewport. I have no idea about
> how other WM do, but I wonder how to make sawfish fully maximize
> those apps. Any idea ?

On my laptop, because i was not used to small screens and had the
feeling that every single pixel was missing, i've wrote a small
hook that removes the frame around maximized windows. It's not
exactly what you're asking, but it might give you ideas, because
the way it forces the window size really makes them fullscreen,
including for xterms or things like that. 

(require 'sawfish.wm.util.workarea)
(defun tgl-no-frame (w)
  (when (window-frame w)
    (set-window-frame w nil)
    (let* ((workarea (calculate-workarea #:window w))
	   (posx (car workarea))
	   (posy (cadr workarea))
	   (dimx (- (caddr workarea) posx))
	   (dimy (- (cadddr workarea) posy)))
      (move-window-to w posx posy)
      (resize-window-to w dimx dimy) )))
(defun tgl-frame (w)
  (when (not (window-frame w))
    (refresh-window w) ))
(add-hook 'window-maximized-hook tgl-no-frame)
(add-hook 'window-unmaximized-hook tgl-frame)

To keep the frames, the main difference is that you have to
substract the additional width or height they add. I've not looked
how to get this informations, it's probably somewhere in the
programming guide:

Hope that can help,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]