Hello,
I have just upgraded to 2.5.11, and I would like to write a nice
window menu. And I also want to be able to maximize windows to "real"
fullscreen modes.
A while back, I found a function like this in a posting:
DestroyFunc FullScreen
AddToFunc FullScreen
+ I ThisWindow (Maximized) WindowStyle Title, Borders
+ I TestRc (!Match) WindowStyle !Title, !Borders
+ I TestRc (!Match) Raise
+ I TestRc (!Match) UpdateStyles
+ I Maximize 100 100
But I have problems with the menu:
AddToMenu WindowMenu
+ DynamicPopupAction Function WindowMenuFunc
DestroyFunc WindowMenuFunc
AddToFunc WindowMenuFunc
+ I DestroyMenu recreate WindowMenu
+ I AddToMenu WindowMenu
+ I Current (Maximized) + "Unmaximize" Maximize false
+ I Current (!Maximized) + "Maximize..." Maximize -60p 100
+ I Current (??) + "Unfullscreen" FullScreen
+ I Current (!??) + "Fullscreen" FullScreen
What I'd like to have is this:
- an unmaximized, "unfullscreened" window can be maximized and also
"fullscreened", and the menu should say "Maximize" and "Fullscreen";
- a maximized, unfullscreen window can be unmaximized and also
fullscreened, and the menu should say so;
- a fullscreen window can be unfullscreened but it cannot be maximized
or unmaximized, only returned to its former (maximized or
unmaximized) state (I don't want to end up with unmaximized windows
without title and borders, but will this function do this?), and the
menu should grey out the (Un)Maximize item (is there a way to do
that?) or it should disappear altogether.
I guessed that I have to define some State for the FullScreen function
(hence the ?? and !??), and then I could perhaps do something like
this:
+ I Current (Maximized, !??) + "Unmaximize" Maximize false
+ I Current (!Maximized) + "Maximize..." Maximize -60p 100
+ I Current (??) + "Unfullscreen" UnFullScreen
+ I Current (!??) + "Fullscreen" FullScreen
The manpage, however, doesn't say a lot about defining and using
states, and I have not been able to find examples. Is this the right
way to go at all? Also, should there be separate FullScreen /
UnFullScreen functions instead of this one? Any ideas would be
appreciated.
Thanks,
Greg
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Oct 11 2004 - 20:11:43 BST