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

- Fixed problem with shared appicon on clients having an appmenu that

is created after the application has mapped its window(s).

This means that if you use wterm without an appmenu it will be able to
use shared appicons, but as soon as you start one with an appmenu they
will get separated appicons.
This commit is contained in:
dan
2001-12-21 00:48:41 +00:00
parent e1ed96951b
commit f968d88070
2 changed files with 46 additions and 6 deletions

View File

@@ -607,11 +607,51 @@ wClientCheckProperty(WWindow *wwin, XPropertyEvent *event)
/* TODO: remake appmenu update */
wAppMenuDestroy(wapp->menu);
}
if (wwin->fake_group) {
extern WPreferences wPreferences;
WScreen *scr = wwin->screen_ptr;
WWindow *foo = scr->focused_window;
WFakeGroupLeader *fPtr = wwin->fake_group;
wApplicationDestroy(wapp);
while (foo) {
if (foo->fake_group && foo->fake_group==fPtr) {
WSETUFLAG(foo, shared_appicon, 0);
foo->fake_group = NULL;
if (foo->group_id!=None)
foo->main_window = foo->group_id;
else if (foo->client_leader!=None)
foo->main_window = foo->client_leader;
else if (WFLAGP(foo, emulate_appicon))
foo->main_window = foo->client_win;
else
foo->main_window = None;
if (foo->main_window) {
wapp = wApplicationCreate(scr, foo->main_window);
}
}
foo = foo->prev;
}
if (fPtr->leader!=None)
XDestroyWindow(dpy, fPtr->leader);
fPtr->retainCount = 0;
fPtr->leader = None;
fPtr->origLeader = None;
wapp = wApplicationOf(wwin->main_window);
if (wapp) {
wapp->menu = wAppMenuGet(scr, wwin->main_window);
}
if (wPreferences.auto_arrange_icons) {
wArrangeIcons(wwin->screen_ptr, True);
}
} else {
wapp->menu = wAppMenuGet(wwin->screen_ptr, wwin->main_window);
}
/* make the appmenu be mapped */
wSetFocusTo(wwin->screen_ptr, NULL);
wSetFocusTo(wwin->screen_ptr,
wwin->screen_ptr->focused_window);
wSetFocusTo(wwin->screen_ptr, wwin->screen_ptr->focused_window);
}
} else if (event->atom==_XA_GNUSTEP_WM_ATTR) {
GNUstepWMAttributes *attr;

View File

@@ -807,7 +807,7 @@ wManageWindow(WScreen *scr, Window window)
WSETUFLAG(wwin, shared_appicon, 0);
}
{
if (wwin->main_window) {
extern Atom _XA_WINDOWMAKER_MENU;
XTextProperty text_prop;