1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

wmaker: fix misuse of 'user_flags' instead of 'client_flags' for window attributes

The structure containing the information on windows contains 2 sets of
attributes, client_flags which contains those asked by the application
through Hints (like MWM Hints and others) and user_flags which was defined
to allow the user to override them.

Unfortunately many places of the code was using the wrong structure to save
the attributes to (for example by using the WSETUFLAG macro) which was
merely ok as the user_flags have priority, but when we want to provide a
clean consistent behaviour to users, we need to get things in the right
place.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2015-05-10 19:56:03 +02:00
committed by Carlos R. Mafra
parent a8f6abc9ea
commit fd1dd9c7ea
4 changed files with 58 additions and 52 deletions

View File

@@ -524,14 +524,14 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
wwin->transient_for = new_owner;
if (new_owner == None) {
if (WFLAGP(wwin, no_miniaturizable)) {
WSETUFLAG(wwin, no_miniaturizable, 0);
WSETUFLAG(wwin, no_miniaturize_button, 0);
wwin->client_flags.no_miniaturizable = 0;
wwin->client_flags.no_miniaturize_button = 0;
if (wwin->frame)
wWindowConfigureBorders(wwin);
}
} else if (!WFLAGP(wwin, no_miniaturizable)) {
WSETUFLAG(wwin, no_miniaturizable, 1);
WSETUFLAG(wwin, no_miniaturize_button, 1);
wwin->client_flags.no_miniaturizable = 1;
wwin->client_flags.no_miniaturize_button = 1;
if (wwin->frame)
wWindowConfigureBorders(wwin);
}
@@ -544,7 +544,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
PropGetProtocols(wwin->client_win, &wwin->protocols);
WSETUFLAG(wwin, kill_close, !wwin->protocols.DELETE_WINDOW);
wwin->client_flags.kill_close = !wwin->protocols.DELETE_WINDOW;
if (wwin->frame)
wWindowUpdateButtonImages(wwin);
@@ -572,7 +572,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
wApplicationDestroy(wapp);
while (foo) {
if (foo->fake_group && foo->fake_group == fPtr) {
WSETUFLAG(foo, shared_appicon, 0);
foo->client_flags.shared_appicon = 0;
foo->fake_group = NULL;
if (foo->group_id != None)