[Xfce4-commits] <xfwm4:master> Avoid some updates to NET_WM_STATE
Olivier Fourdan
noreply at xfce.org
Tue Feb 23 21:40:01 CET 2010
Updating branch refs/heads/master
to 45fd45d4e04a50a161d6e1fdd74ae3851fea7c10 (commit)
from 5e17b21936b9efc66619c58eb4df0dac729a87fd (commit)
commit 45fd45d4e04a50a161d6e1fdd74ae3851fea7c10
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Tue Feb 23 18:46:32 2010 +0100
Avoid some updates to NET_WM_STATE
src/client.c | 21 ++++++++++++---------
src/focus.c | 2 +-
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/client.c b/src/client.c
index 3addde6..ea26f70 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2325,6 +2325,12 @@ clientShowSingle (Client * c, gboolean deiconify)
g_return_if_fail (c != NULL);
+ if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
+ {
+ /* Should we map the window if it is visible? */
+ return;
+ }
+
screen_info = c->screen_info;
display_info = screen_info->display_info;
@@ -2864,24 +2870,22 @@ clientStick (Client * c, gboolean include_transients)
for (list = list_of_windows; list; list = g_list_next (list))
{
c2 = (Client *) list->data;
- TRACE ("sticking client \"%s\" (0x%lx)", c2->name, c2->window);
c2->win_state |= WIN_STATE_STICKY;
+ TRACE ("Sticking client \"%s\" (0x%lx)", c2->name, c2->window);
FLAG_SET (c2->flags, CLIENT_FLAG_STICKY);
setHint (display_info, c2->window, NET_WM_DESKTOP, (unsigned long) ALL_WORKSPACES);
- clientSetNetState (c2);
frameQueueDraw (c2, FALSE);
}
- clientSetWorkspace (c, screen_info->current_ws, TRUE);
g_list_free (list_of_windows);
}
else
{
- TRACE ("sticking client \"%s\" (0x%lx)", c->name, c->window);
+ TRACE ("Sticking client \"%s\" (0x%lx)", c->name, c->window);
c->win_state |= WIN_STATE_STICKY;
FLAG_SET (c->flags, CLIENT_FLAG_STICKY);
setHint (display_info, c->window, NET_WM_DESKTOP, (unsigned long) ALL_WORKSPACES);
- clientSetWorkspace (c, screen_info->current_ws, TRUE);
}
+ clientSetWorkspace (c, screen_info->current_ws, TRUE);
clientSetNetState (c);
}
@@ -2896,7 +2900,6 @@ clientUnstick (Client * c, gboolean include_transients)
g_return_if_fail (c != NULL);
TRACE ("entering clientUnstick");
- TRACE ("unsticking client \"%s\" (0x%lx)", c->name, c->window);
screen_info = c->screen_info;
display_info = screen_info->display_info;
@@ -2908,21 +2911,21 @@ clientUnstick (Client * c, gboolean include_transients)
{
c2 = (Client *) list->data;
c2->win_state &= ~WIN_STATE_STICKY;
+ TRACE ("Unsticking client \"%s\" (0x%lx)", c2->name, c2->window);
FLAG_UNSET (c2->flags, CLIENT_FLAG_STICKY);
setHint (display_info, c2->window, NET_WM_DESKTOP, (unsigned long) screen_info->current_ws);
- clientSetNetState (c2);
frameQueueDraw (c2, FALSE);
}
- clientSetWorkspace (c, screen_info->current_ws, TRUE);
g_list_free (list_of_windows);
}
else
{
+ TRACE ("Unsticking client \"%s\" (0x%lx)", c->name, c->window);
c->win_state &= ~WIN_STATE_STICKY;
FLAG_UNSET (c->flags, CLIENT_FLAG_STICKY);
setHint (display_info, c->window, NET_WM_DESKTOP, (unsigned long) screen_info->current_ws);
- clientSetWorkspace (c, screen_info->current_ws, TRUE);
}
+ clientSetWorkspace (c, screen_info->current_ws, TRUE);
clientSetNetState (c);
}
diff --git a/src/focus.c b/src/focus.c
index a0daae5..ae69237 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -526,11 +526,11 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
{
TRACE ("Un-setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
FLAG_UNSET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+ clientSetNetState (c);
}
clientAdjustFullscreenLayer (c, TRUE);
frameQueueDraw (c, FALSE);
clientUpdateOpacity (c);
- clientSetNetState (c);
}
if (c2)
{
More information about the Xfce4-commits
mailing list