Remaximazing all windows?
- From: Daniel M German <dmg uvic ca>
- To: sawfish-list gnome org
- Subject: Remaximazing all windows?
- Date: Sat, 12 Jul 2008 13:07:00 -0700
Hi Everybody,
First of all, my apologies. This is the first time I am trying to
write code for sawfish. And I am not a lisp expert.
I use a tablet, and when I rotate the screen the maximized windows do
not resize to the new boundaries of the display.
I am trying to create a function that does that, but I am running into
problems. My approach is to cycle over all windows, and check those
that are maximized. If they are, then I unmaximize it and maximize it
again. It sort of works.
My code is below. It works for fully maximized windows, and
vertically-maximized ones, but not for horizontally-maximized ones.
Also, it changes the current workspace to another one. That is why I
defined the varialbe curw, but it doesn't seem to do anything.
Any ideas?
Also, is there an easy way to test for compilation errors? What I
currently do is to restart sawfish and hope for the best.
----------------------------------------------------------------------
(defun dmg-remaximize-all ()
"Make sure windows are maximized in the current boundaries of the display."
(interactive)
(let* (
(wins (stacking-order))
(len (length wins))
(i (- len 1))
(curw current-workspace)
)
(progn
(while (>= i 0)
(let* (
(w (nth i wins))
(m (window-maximized-p w))
(h (window-maximized-horizontally-p w))
(v (window-maximized-vertically-p w))
)
(cond
((and m)
(progn
(unmaximize-window w)
(if (and v) (maximize-window-vertically w) (nil))
(if (and h) (maximize-window-horizontally w) (nil))
)
) ; end of (and m)
)
)
(setq i (- i 1))
)
(activate-workspace curw)
)
)
)
--
--
Daniel M. German
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]