Subject: | maximize by NET-WM message |
Date: | Tue, 12 Nov 2013 08:45:19 +1100 |
To: | bug-Prima [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
I've had a bit of trouble with the prima window maximize() under recent
debian i386 fvwm 2.6.5. After maximizing a restore does not return to
the previous size, whereas I hoped it would.
Simple program below. Pressing maximize button maximizes as expected,
but then pressing restore does not return to the previous size.
Nosing around with xmon it seems maximize is
Unmap
ClientMessage
set _NET_WM_STATE property
Map
I wonder if for netwm it would be ClientMessage alone and trust the wm
to update the state and maintain the "normal" size, with no unmapping or
property storing.
I saw a comment in apc_win.c
/* net hints changes by themselves do not result in maximization -
need explicit map/unmap. */
If that meant storing to _NET_WM_STATE does nothing then yes that's so.
As I understand it after mapping a client should send wm messages for
any changes (any client can ask to change any toplevel). Initial
_NET_WM_STATE can be set for desired initial state.
Incidentally the code syncing with the wm seems hairy. I'm not sure
there's a protocol for that. You'd be tempted to send ClientMessage and
not worry that the actual change will take place a little later. Could
applications tolerate the maximize state not changing immediately but
only a little later?
Message body is not shown because sender requested not to inline it.