[MPlayer-dev-eng] How do I ensure window sizes? (Was: FUD in the MPlayer FAQ)
Mathias Hasselmann
mathias.hasselmann at gmx.de
Thu Oct 4 10:53:39 CEST 2001
Hello friends,
Now it happend a second time that you are publishing immature
unedjucated FUD within your FAQ section:
Q: The GUI isn't usable with icewm, because some panel are over the
movie!!
A: Known, icewm is shit and dictatoric. Unsolvable. In detail:
icewm sucks because its taskbar overrides GUI's window resize
queries. If it asks for resize to 800x600, then it resizes
window to 800x(600-taskbar_size). It's bad. Very bad. In
short: shit.
I really wonder how such accidents can happen: Mplayer itself is
a nice piece of software. Why didn't you try to contact us to figure out
how to interpret the ICCCM*) if you had problems? You message to
icewm-devel at lists.sourceforge.net,
icewm-user at lists.sourceforge.net
or to my private address
would have been welcomed. Anyway, here's the information you've would have
get if you would have asked:
The ICCCM defines the WM_NORMAL_SIZE hint to allow clients to
request certain window size related guaranties. By using this hint you can
request a minmal size for client windows. No there still is the problem
how to move a window to a certain position. Traditinally the x/y members
and the USPosition flags of the WM_NORMAL_SIZE hint were used for this
purpose. Unfortunatlly this flags are marked to be obsolete now. Well,
Within icewm you can force windows to appear at a certain position when
you create a configure request after mapping the window? Why does it have
to be done this way? Quite simple: If IceWM would ultimately respect
geometry setting set before mapping very usefull features like workarea
limiting, smart window placement would not work.
Ok. Enough words let's follow some code:
// ICCCM Variant 1, Somehow obsolete since XSizeHints::x, y are used
XSizeHints hints;
hints.flags = USPosition | PMinSize;
hints.x = 0;
hints.y = 0;
hints.min_width = 2000;
hints.min_height = 2000;
XSetWMNormalHints(dpy, win, &hints);
XMapWindow(dpy, win);
// ICCCM Variant 2, Somehow obsolete since XSizeHints::x, y are used
XSizeHints hints;
hints.flags = USPosition | UPPBaseSize;
hints.x = 0;
hints.y = 0;
hints.base_width = 2000;
hints.base_height = 2000;
XSetWMNormalHints(dpy, win, &hints);
XMapWindow(dpy, win);
// ICCCM Variant 3, Notice first map, than move.
XSizeHints hints;
hints.flags = PMinSize;
hints.min_width = 2000;
hints.min_height = 2000;
XSetWMNormalHints(dpy, win, &hints);
XMapWindow(dpy, win);
XMoveWindow(dpy, win, 0, 0);
Ciao,
Mathias
*) As stated before __the__ reference manual for window managers.
PS: I'm not subscribed to the mplayer lists anymore: Far too much traffic
for my taste. So you'd have to contact me per PM to answer.
--
WWW: http://www.informatik.hu-berlin.de/~hasselma/
PGP/GnuPG: 1024-Bit DSA: ID 55E572F3, 1024-Bit RSA: ID EAAF7CF1
More information about the MPlayer-dev-eng
mailing list