Reduce server grabs during window creation
Remove some obvious server grabs from the window creation codepath, also ones that are taken at startup. During startup, there is no need to grab: we install the event handlers before querying for the already-existing windows, so there is no danger that we will 'lose' some window. We might try to create a window twice (if it comes back in the original query and then we get an event for it) but the code is already protected against such conditions. When windows are created later, we also do not need grabs, we just need appropriate error checking as the window may be destroyed at any time (or it may have already been destroyed). The stack tracker is unaffected here - as it listens to CreateNotify and DestroyNotify events and responds directly, the internal stack representation will always be consistent even if the window goes away while we are processing MapRequest or similar. Now that there are no grabs we don't have to worry about explicitly calling display_notify_window after grabs have been dropped. Fold that into meta_window_new_shared(). https://bugzilla.gnome.org/show_bug.cgi?id=721345
parent
af46ef3b
Please register or sign in to comment