summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-07-30 18:26:35 +0200
committerDanny Baumann <dannybaumann@web.de>2007-07-30 18:26:35 +0200
commit2a9375943bb1058e8c1ad49a739361c5dd579519 (patch)
tree402495633afcf8e27e397e1a478f6eb6b8dd8c32
parent0e479dfdaf73f2fa19f210a2c1a371142250c0e9 (diff)
downloadshowdesktop-2a9375943bb1058e8c1ad49a739361c5dd579519.tar.gz
showdesktop-2a9375943bb1058e8c1ad49a739361c5dd579519.tar.bz2
Don't make focusWindow think showdesktop'ed windows are not managed.
-rw-r--r--showdesktop.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/showdesktop.c b/showdesktop.c
index a9c3cda..d0b82d6 100644
--- a/showdesktop.c
+++ b/showdesktop.c
@@ -84,6 +84,7 @@ typedef struct _ShowdesktopScreen
EnterShowDesktopModeProc enterShowDesktopMode;
LeaveShowDesktopModeProc leaveShowDesktopMode;
GetAllowedActionsForWindowProc getAllowedActionsForWindow;
+ FocusWindowProc focusWindow;
int state;
int moreAdjust;
@@ -709,6 +710,28 @@ showdesktopLeaveShowDesktopMode (CompScreen *s,
WRAP (ss, s, leaveShowDesktopMode, showdesktopLeaveShowDesktopMode);
}
+static Bool
+showdesktopFocusWindow (CompWindow *w)
+{
+ CompScreen *s = w->screen;
+ Bool ret;
+
+ SD_SCREEN (s);
+ SD_WINDOW (w);
+
+ if (w->inShowDesktopMode)
+ w->managed = sw->wasManaged;
+
+ UNWRAP (ss, s, focusWindow);
+ ret = (*s->focusWindow) (w);
+ WRAP (ss, s, focusWindow, showdesktopFocusWindow);
+
+ if (w->inShowDesktopMode)
+ w->managed = FALSE;
+
+ return ret;
+}
+
/* display initialization */
static Bool
@@ -776,6 +799,7 @@ showdesktopInitScreen (CompPlugin * p,
WRAP (ss, s, paintWindow, showdesktopPaintWindow);
WRAP (ss, s, enterShowDesktopMode, showdesktopEnterShowDesktopMode);
WRAP (ss, s, leaveShowDesktopMode, showdesktopLeaveShowDesktopMode);
+ WRAP (ss, s, focusWindow, showdesktopFocusWindow);
WRAP (ss, s, getAllowedActionsForWindow,
showdesktopGetAllowedActionsForWindow);
@@ -797,6 +821,7 @@ showdesktopFiniScreen (CompPlugin * p,
UNWRAP (ss, s, paintWindow);
UNWRAP (ss, s, enterShowDesktopMode);
UNWRAP (ss, s, leaveShowDesktopMode);
+ UNWRAP (ss, s, focusWindow);
UNWRAP (ss, s, getAllowedActionsForWindow);
freeWindowPrivateIndex (s, ss->windowPrivateIndex);