From a16a251ae1865fa7f907831f8fbe3a30832d7fdd Mon Sep 17 00:00:00 2001 From: Olivier Fourdan <fourdan.olivier@wanadoo.fr> Date: Sat, 17 Jun 2006 19:28:54 +0000 Subject: [PATCH] Make sure the 'demand attention' flags gets cleared on focus. (Old svn revision: 22146) --- src/focus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/focus.c b/src/focus.c index 29899fce3..ddebd4960 100644 --- a/src/focus.c +++ b/src/focus.c @@ -503,6 +503,11 @@ clientSetFocus (ScreenInfo *screen_info, Client * c, Time timestamp, unsigned sh if ((c) && FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE)) { TRACE ("setting focus to client \"%s\" (0x%lx)", c->name, c->window); + if (FLAG_TEST(c->flags, CLIENT_FLAG_DEMANDS_ATTENTION)) + { + FLAG_UNSET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION); + clientSetNetState (c); + } if ((c == client_focus) && !(flags & FOCUS_FORCE)) { TRACE ("client \"%s\" (0x%lx) is already focused, ignoring request", @@ -523,11 +528,6 @@ clientSetFocus (ScreenInfo *screen_info, Client * c, Time timestamp, unsigned sh { sendClientMessage (c->screen_info, c->window, WM_TAKE_FOCUS, timestamp); } - if (FLAG_TEST(c->flags, CLIENT_FLAG_DEMANDS_ATTENTION)) - { - FLAG_UNSET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION); - clientSetNetState (c); - } } else { -- GitLab