mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Freeze the update counter for unmapped windows
When a window is unmapped, freeze its frame clock. This avoids doing unnecessary work, but also means that we won't block waiting for _NET_WM_FRAME_DRAWN messages that will never be received since the frame ended while the window was withdrawn. https://bugzilla.gnome.org/show_bug.cgi?id=685460
This commit is contained in:
parent
8a6895fe52
commit
355e305c16
@ -688,6 +688,9 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
gdk_frame_clock_thaw (gdk_window_get_frame_clock (event->any.window));
|
||||
}
|
||||
|
||||
if (toplevel)
|
||||
gdk_window_freeze_toplevel_updates_libgtk_only (window);
|
||||
|
||||
_gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
|
||||
}
|
||||
|
||||
@ -708,6 +711,9 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_ICONIFIED,
|
||||
0);
|
||||
|
||||
if (toplevel)
|
||||
gdk_window_thaw_toplevel_updates_libgtk_only (window);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -940,6 +940,9 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
|
||||
G_CALLBACK (on_frame_clock_before_paint), window);
|
||||
g_signal_connect (clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), window);
|
||||
|
||||
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
|
||||
gdk_window_freeze_toplevel_updates_libgtk_only (window);
|
||||
}
|
||||
|
||||
static GdkEventMask
|
||||
|
Loading…
Reference in New Issue
Block a user