GNOME Bugzilla – Bug 766243
Improve handling of tracking the old focused window during restart
Last modified: 2016-07-20 10:21:19 UTC
When restarting (X compositor only, obviously), we want to keep the same window focused. There is code that tries to do this by calling XGetInputFocus() but the previously focused window will almost certainly not still be focused by the time we get to the point where we call XGetInputFocus(), and in fact, probably was no longer correct after the previous window manager exited, so the net result is that we tend to focus no window on restart. A better approach is to leave the _NET_ACTIVE_WINDOW property set on the root window during exit, and if we find it set when starting, use that to initialize focus.
Created attachment 327616 [details] [review] Improve handling of tracking the old focused window during restart
Review of attachment 327616 [details] [review]: great, this has always bothered me a bit ::: src/core/display.c @@ -931,3 @@ - meta_error_trap_push (display); - - /* FIXME: This is totally broken; see comment 9 of bug 88194 about this */ yay for getting rid of something totally broken!
This landed, closing.