
This patch makes xmonad obey (some) size hints set by clients, for example the aspect ratio hint set by mplayer. I also implemented the max size and size increment hints, as some clients seem to get confused if their window is "too large" (for example Xephyr). Problems with this patch: - The hints are retrieved every wm operation, which could hurt over a slow link. They should be cached (and xmonad should listen to property events) - The code is not integrated in the layout algorithm, which results in ugly gaps between windows. - Too many lines of code.

This version is cleaner. Still breaks the loc limit though.

Peter De Wachter on 2007-05-01 12:36:14 +0200:
This patch makes xmonad obey (some) size hints set by clients, for example the aspect ratio hint set by mplayer. I also implemented the max size and size increment hints, as some clients seem to get confused if their window is "too large" (for example Xephyr).
I haven't tried your updated patch, but this version worked pretty well and is a nice usability improvement. I did some tests with zenity (GTK+ version of dialog) and was pleased to see that windows were of a sane size instead of stretched and distorted to full screen; pinentry-gtk for inputting GPG passphrases also acted nicely. Not all of the windows I expected to be resized were, though; in particular, the Konqueror/kwallet password prompt that is properly resized in dwm was still stretched to full screen. Additionally, the windows I tested that were resized appeared at the top-right of the screen instead of centered. I don't know if there's an optional hint to center them that zenity's not setting, if your code isn't acting on such a hint, or it's expected to be implemented in the window manager, but it would be nice if the windows appeared centered on the screen.

alec:
Peter De Wachter on 2007-05-01 12:36:14 +0200:
This patch makes xmonad obey (some) size hints set by clients, for example the aspect ratio hint set by mplayer. I also implemented the max size and size increment hints, as some clients seem to get confused if their window is "too large" (for example Xephyr).
I haven't tried your updated patch, but this version worked pretty well and is a nice usability improvement.
Ok. That's good to know.
I did some tests with zenity (GTK+ version of dialog) and was pleased to see that windows were of a sane size instead of stretched and distorted to full screen; pinentry-gtk for inputting GPG passphrases also acted nicely. Not all of the windows I expected to be resized were, though; in particular, the Konqueror/kwallet password prompt that is properly resized in dwm was still stretched to full screen.
Additionally, the windows I tested that were resized appeared at the top-right of the screen instead of centered. I don't know if there's an optional hint to center them that zenity's not setting, if your code isn't acting on such a hint, or it's expected to be implemented in the window manager, but it would be nice if the windows appeared centered on the screen.
YEs. I think we'll probably take this patch as a starting point for an approach to handling hints. I quite like the 'no gaps' that are produced by the current layout system (which ignores all hints), but some applications seem to crucially expect certain geometry. If we can support hints, without resulting with ugly gapping of tiling, that would be best. -- Don
participants (3)
-
Alec Berryman
-
dons@cse.unsw.edu.au
-
Peter De Wachter