[Xfce4-commits] <xfwm4:xfce-4.8> Reverting from desktop view may not focus the top most window (bug #8173)
Olivier Fourdan
noreply at xfce.org
Tue Dec 6 18:16:01 CET 2011
Updating branch refs/heads/xfce-4.8
to b1cdf9096b59fce718d8457084637e6a11fb9d8d (commit)
from 99f769bc6e214933716df2dfa9d15b959dcd69d2 (commit)
commit b1cdf9096b59fce718d8457084637e6a11fb9d8d
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Tue Dec 6 17:57:41 2011 +0100
Reverting from desktop view may not focus the top most window (bug #8173)
src/client.c | 18 +++++++++++++++---
src/focus.c | 4 +++-
src/workspaces.c | 2 +-
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/client.c b/src/client.c
index c058c1e..9d02d0d 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2167,7 +2167,7 @@ clientFrameAll (ScreenInfo *screen_info)
{
XFree (wins);
}
- clientFocusTop (screen_info, WIN_LAYER_NORMAL, myDisplayGetCurrentTime (display_info));
+ clientFocusTop (screen_info, WIN_LAYER_FULLSCREEN, myDisplayGetCurrentTime (display_info));
xfwmWindowDelete (&shield);
myDisplayUngrabServer (display_info);
XSync (display_info->dpy, FALSE);
@@ -2575,7 +2575,7 @@ clientToggleShowDesktop (ScreenInfo *screen_info)
}
FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN);
}
- clientFocusTop (screen_info, WIN_LAYER_NORMAL, myDisplayGetCurrentTime (screen_info->display_info));
+ clientFocusTop (screen_info, WIN_LAYER_FULLSCREEN, myDisplayGetCurrentTime (screen_info->display_info));
}
}
@@ -2758,11 +2758,23 @@ clientSetLayer (Client * c, guint l)
}
}
g_list_free (list_of_windows);
+
if (clientGetLastRaise (c->screen_info) == c)
{
clientClearLastRaise (c->screen_info);
}
- clientRaise (c, None);
+
+ c2 = clientGetFocusOrPending ();
+ if (c2 && (c2 != c) && (c2->win_layer == c->win_layer))
+ {
+ TRACE ("Placing %s under %s", c->name, c2->name);
+ clientLower (c, c2->frame);
+ }
+ else
+ {
+ TRACE ("Placing %s on top of its layer %i", c->name, c->win_layer);
+ clientRaise (c, None);
+ }
}
void
diff --git a/src/focus.c b/src/focus.c
index bc6e810..f2f901d 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -485,16 +485,17 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
TRACE ("entering clientUpdateFocus");
c2 = ((client_focus != c) ? client_focus : NULL);
- pending_focus = NULL;
if ((c) && !clientAcceptFocus (c))
{
TRACE ("SKIP_FOCUS set for client \"%s\" (0x%lx)", c->name, c->window);
+ pending_focus = NULL;
return;
}
if ((c) && (c == client_focus) && !(flags & FOCUS_FORCE))
{
TRACE ("client \"%s\" (0x%lx) is already focused, ignoring request", c->name, c->window);
+ pending_focus = NULL;
return;
}
@@ -537,6 +538,7 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
}
clientSetNetActiveWindow (screen_info, c, 0);
clientClearDelayedFocus ();
+ pending_focus = NULL;
}
void
diff --git a/src/workspaces.c b/src/workspaces.c
index c4c4c6a..dc2cab6 100644
--- a/src/workspaces.c
+++ b/src/workspaces.c
@@ -400,7 +400,7 @@ workspaceSwitch (ScreenInfo *screen_info, gint new_ws, Client * c2, gboolean upd
}
else
{
- clientFocusTop (screen_info, WIN_LAYER_NORMAL, timestamp);
+ clientFocusTop (screen_info, WIN_LAYER_FULLSCREEN, timestamp);
}
}
}
More information about the Xfce4-commits
mailing list