summaryrefslogtreecommitdiff
path: root/src/event.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-10-02 15:34:45 +0200
committerDanny Baumann <dannybaumann@web.de>2008-10-02 15:34:45 +0200
commitca7cb636f9f28759f193712ef72672b267f9a1b6 (patch)
treec16eb1620049b6988cf84fc3a1bd9d672f6bf978 /src/event.c
parent46e4aa0308fe542f2586835e86ee249ebea6fafb (diff)
Handle desktops a bit better.
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/event.c b/src/event.c
index 1039ec7c..545fce07 100644
--- a/src/event.c
+++ b/src/event.c
@@ -1995,23 +1995,26 @@ handleEvent (CompDisplay *d,
}
}
- w->managed = TRUE;
-
if (w->state & CompWindowStateHiddenMask)
if (!w->minimized && !w->inShowDesktopMode)
doMapProcessing = FALSE;
if (doMapProcessing)
{
- Bool allowFocus;
- CompStackingUpdateMode stackingMode;
-
w->initialViewportX = w->screen->x;
w->initialViewportY = w->screen->y;
w->initialTimestampSet = FALSE;
applyStartupProperties (w->screen, w);
+ }
+
+ w->managed = TRUE;
+
+ if (doMapProcessing)
+ {
+ Bool allowFocus;
+ CompStackingUpdateMode stackingMode;
if (!w->placed)
{
@@ -2065,12 +2068,11 @@ handleEvent (CompDisplay *d,
(*w->screen->leaveShowDesktopMode) (w->screen, w);
+ if (allowFocus && !onCurrentDesktop (w))
+ setCurrentDesktop (w->screen, w->desktop);
+
if (!(w->state & CompWindowStateHiddenMask))
- {
- w->pendingMaps++;
- XMapWindow (d->display, w->id);
- setWindowState (d, w->id, w->state);
- }
+ showWindow (w);
if (allowFocus)
moveInputFocusToWindow (w);