mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
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
@@ -211,8 +211,9 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin)
|
|||||||
|
|
||||||
if (wwin->flags.mapped)
|
if (wwin->flags.mapped)
|
||||||
wAppMenuMap(napp->menu, wwin);
|
wAppMenuMap(napp->menu, wwin);
|
||||||
wApplicationActivate(napp);
|
|
||||||
}
|
}
|
||||||
|
if (napp)
|
||||||
|
wApplicationActivate(napp);
|
||||||
|
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
old_scr = scr;
|
old_scr = scr;
|
||||||
|
|||||||
11
src/window.c
11
src/window.c
@@ -56,6 +56,8 @@
|
|||||||
#include "defaults.h"
|
#include "defaults.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
#include "appmenu.h"
|
||||||
|
#include "appicon.h"
|
||||||
|
|
||||||
#ifdef MWM_HINTS
|
#ifdef MWM_HINTS
|
||||||
# include "motif.h"
|
# include "motif.h"
|
||||||
@@ -1654,6 +1656,15 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
|||||||
}
|
}
|
||||||
wSetFocusTo(scr, newFocusedWindow);
|
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);
|
wWindowDestroy(wwin);
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user