THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened. Details are below. User who did this - Uli Schlachter (psychon)
Attached to Project - awesome
Summary - Setting and reading client.focus can result in different clients
Task Type - Bug Report
Category - Core
Status - New
Assigned To - Operating System - All
Severity - High
Priority - Urgent
Reported Version - git/3.4
Due in Version - 4.0
Due Date - Undecided
Details - This bug affects both the 3.4 and master branch (thanks to me 
cherry-picking...).
The commit in question is this one:

commit 6ed3b618449be3804daf3b60163a7c202558c52e
Author: Uli Schlachter <[email protected]>
Date:   Sun Aug 15 13:17:07 2010 +0200

   Don't call "focus" hook in client_focus()
Later on that call will be done through a FocusIn event. Signed-off-by: Uli Schlachter <[email protected]>

diff --git a/client.c b/client.c
index 494f261..8042c3a 100644
--- a/client.c
+++ b/client.c
@@ -446,9 +446,6 @@ client_focus(client_t *c)
    /* X11 doesn't let you focus a window that isn't viewable */
    client_unban(c);

-    if (!c->nofocus)
-        client_focus_update(c);
-
    client_set_focus(c, !c->nofocus);
}

Now let's take a look at the default config:

   awful.key({ modkey,           }, "j",
       function ()
           awful.client.focus.byidx( 1)
           if client.focus then client.focus:raise() end
       end),

This first focuses a new client and then raises that client, if possible. The 
problem is that the above patch causes client.focus to only be updated after an 
event from the X server. This means that client.focus will still return the 
previously focused client and so the wrong client is raised.

Of course, reverting this commit fixes that, but this revealed sth that was 
already broken before. Clients with the WM_TAKE_FOCUS protocol that don't focus 
themselves or that have the noinput hint set will cause client.focus to read 
out the wrong client.


More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=details&task_id=800

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [email protected].

Reply via email to