forked from vitrine/wmaker
Minor fixes to appicon highlighting
When an app hides its window but doesn't exit (e.g. apps that "minimize" to the system tray), the highlighting was not being removed. When alt-tabbing, the tabbed-to app's icon was not getting highlighted. Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
committed by
Carlos R. Mafra
parent
70abda81d0
commit
3490c8bd30
+2
-1
@@ -211,8 +211,9 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
|
||||
if (wwin->flags.mapped)
|
||||
wAppMenuMap(napp->menu, wwin);
|
||||
wApplicationActivate(napp);
|
||||
}
|
||||
if (napp)
|
||||
wApplicationActivate(napp);
|
||||
|
||||
XFlush(dpy);
|
||||
old_scr = scr;
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
#include "defaults.h"
|
||||
#include "workspace.h"
|
||||
#include "xinerama.h"
|
||||
#include "appmenu.h"
|
||||
#include "appicon.h"
|
||||
|
||||
#ifdef MWM_HINTS
|
||||
# include "motif.h"
|
||||
@@ -1654,6 +1656,15 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
||||
}
|
||||
wSetFocusTo(scr, newFocusedWindow);
|
||||
}
|
||||
|
||||
/* Close menu and unhighlight */
|
||||
WApplication *oapp = wApplicationOf(wwin->main_window);
|
||||
WApplication *napp = scr->focused_window ? wApplicationOf(scr->focused_window->main_window) : NULL;
|
||||
if (oapp && oapp != napp) {
|
||||
wAppMenuUnmap(oapp->menu);
|
||||
wApplicationDeactivate(oapp);
|
||||
}
|
||||
|
||||
wWindowDestroy(wwin);
|
||||
XFlush(dpy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user