Skip to content
  • Daniel Drake's avatar
    reduce server grabs during window creation · 73194072
    Daniel Drake authored and Alberts Muktupāvels's avatar Alberts Muktupāvels committed
    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721345
    73194072