GNOME Bugzilla – Bug 580572
Windows don't open with focus
Last modified: 2009-05-01 23:41:09 UTC
Please describe the problem: When opening a new window via an application, I'd expect it to have focus, but this seems not to be the case. The only app I use regularly that opens new windows is Evolution, but it's reproducable on this every time. Steps to reproduce: 1. Open evolution. 2. If you have several accounts, password prompt windows pop up, one after the other 3. Normal behaviour is that focus will pass to the next one whenever you close the previous one (by entering a password and pressing "Return" or clicking "OK"). 4. Focus stays with the same window. 5. Same behaviour when you double click to open a message window. 6. Same behaviour when you right click on the message in the list and choose "Move to folder...". This is where it becomes most annoying, as I have several hundred folders, and rely on keyboard completion to choose one, but if I have to click on the window to give it focus, it's missing the point. Actual results: Each window pops up without focus, which stays with the main application. Expected results: I'd expect each new window to open with focus. Does this happen every time? Yes. Other information:
Created attachment 133765 [details] [review] Avoid clobbering the root window event mask Calling gdk_window_get_events() then gdk_window_set_events() will remove "exotic" X event masks that GDK doesn't know about like SubstructureRedirectMask. A window manager that doesn't select for SubstructureRedirectMask on the root window is no longer really a window manager, so various Bad Things were happening. We can just piggy-back on Mutter selecting for PropertyNotify events on the root window, so removing the code works fine. http://bugzilla.gnome.org/show_bug.cgi?id=580572 (reported by Mike Bursell)
Pushed with some comment improvements suggested by Marina.