From ad641c19929a6864b446fac8f2edca4d615e86ab Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 2 Jul 2005 19:23:41 +0000 Subject: [PATCH] Fixed issue with GNUstep applications losing focus when all their windows are closed and there remains only their menu (Matt Rice ) --- ChangeLog | 2 ++ src/actions.c | 1 - src/switchmenu.c | 5 ++++- src/window.c | 11 ----------- src/window.h | 4 ++++ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 750b5479..6190a9d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,8 @@ Changes since version 0.91.0: - fixed bug with windows shrinking to very small sizes when Unmaximize was used on them, after they were closed in a maximized state. - fixed bug with restoring maximized state from NetWM atoms. +- fixed issue with GNUstep applications losing focus when all their windows + are closed and there remains only their menu (Matt Rice ) Changes since version 0.90.0: diff --git a/src/actions.c b/src/actions.c index 3aaa012f..56c08752 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1548,7 +1548,6 @@ wUnhideApplication(WApplication *wapp, Bool miniwindows, Bool bringToCurrentWS) } - void wShowAllWindows(WScreen *scr) { diff --git a/src/switchmenu.c b/src/switchmenu.c index 223e4245..544652b3 100644 --- a/src/switchmenu.c +++ b/src/switchmenu.c @@ -231,8 +231,11 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action) char *t; int idx; - if (wwin->flags.internal_window || WFLAGP(wwin, skip_window_list)) + if (wwin->flags.internal_window || + WFLAGP(wwin, skip_window_list) || + IS_GNUSTEP_MENU(wwin)) { return; + } if (wwin->frame->title) snprintf(title, len, "%s", wwin->frame->title); diff --git a/src/window.c b/src/window.c index d6dc9c0e..1a82549a 100644 --- a/src/window.c +++ b/src/window.c @@ -340,17 +340,6 @@ setupGNUstepHints(WWindow *wwin, GNUstepWMAttributes *gs_hints) wwin->client_flags.no_appicon = 1; } - /* temporary solution to avoid GS menus in our window list. - * it's temporary because it's not the proper way: windows at the - * floating level are also skipped from the window list with this. - * Fix it -Dan */ - if (gs_hints->flags & GSWindowLevelAttr) { - if (gs_hints->window_level == WMMainMenuWindowLevel || - gs_hints->window_level == WMSubmenuWindowLevel) { - wwin->client_flags.skip_window_list = 1; - } - } - } diff --git a/src/window.h b/src/window.h index 54afee81..b543d34e 100644 --- a/src/window.h +++ b/src/window.h @@ -334,6 +334,10 @@ typedef struct WWindow { #define WINDOW_LEVEL(w) ((w)->frame->core->stacking->window_level) +#define IS_GNUSTEP_MENU(w) ((w)->wm_gnustep_attr && \ + ((w)->wm_gnustep_attr->flags & GSWindowLevelAttr) && \ + ((w)->wm_gnustep_attr->window_level==WMMainMenuWindowLevel || \ + (w)->wm_gnustep_attr->window_level==WMSubmenuWindowLevel)) /* -- 2.11.4.GIT