Skip to content
  • Rui Matos's avatar
    main: Push the current event on the stack before we start needing it · ef93257d
    Rui Matos authored
    The changes in commit 13e22e20 made
    _gtk_window_check_handle_wm_event() indirectly depend on
    gtk_get_current_event_time() which relies on the current event being
    available on the current_events stack.
    
    Since the current event is only pushed on the stack afterwards we get
    an invalid timestamp which breaks ewmh window moving.
    
    This fixes the issue by pushing the current event before we start
    relying on it being there in gtk_main_do_event() and, as a byproduct,
    also fixes a potential memory leak when we have a rewritten event and
    return early due to _gtk_window_check_handle_wm_event() being TRUE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750384
    ef93257d