GNOME Bugzilla – Bug 774330
Possible warnings around meta_display_(un)register_x_window if user time window is reused
Last modified: 2016-11-15 16:38:54 UTC
Trying the Steam client under Wine on gnome-shell, I see that moving the pointer around to get menus popped up trigger warnings around meta_display_(un)register_x_window. AFAICS this is because wine reuses the same X window as NET_WM_USER_TIME_WINDOW across different toplevels, if another toplevel registers the same window before a previous toplevel gave it up, the hack in reload_net_wm_user_time_window() to register the window in the XIDs hashtable so we get property changes will find the window is already registered by the previous toplevel, so the window will fail to be registered a second time. And this will also trigger warnings when unregistering the window, because we now have two MetaWindows with it as the user time window, but it's just being registered with one. So in order to complete the hack, it seems we need to look up whether the user time window was previously used by someone else, and unregister + unset from the previous owner, so it can be registered successfully. Patch coming.
Created attachment 339700 [details] [review] x11: Double check whether the user time window was previously used Some applications like Wine may choose to juggle the same user time window across different toplevels, in that case we receive warnings when trying to register the window a second time, leading to wrong accounting. If the window was already used as the user time window for another toplevel, unset it from the previous MetaWindow owner, and unregister so the registration with the new MetaWindow is successful.
Review of attachment 339700 [details] [review]: looks good
Cheers :). Pushed to master. Attachment 339700 [details] pushed as ae73e9d - x11: Double check whether the user time window was previously used