gdk: Inherit the frame clock for popups

With separate clocks, the phases are not coordinated,
which messes with GTKs size allocation machinery treating
the entire widget tree as a whole, and causes us to
run into assertion where popups get drawn before they
are allocated.
This commit is contained in:
Matthias Clasen 2019-05-05 22:59:51 +00:00
parent 07c8fd9997
commit ef353f24c6
2 changed files with 8 additions and 2 deletions

View File

@ -510,7 +510,10 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
GdkWaylandSurface *impl;
GdkFrameClock *frame_clock;
frame_clock = _gdk_frame_clock_idle_new ();
if (parent)
frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
else
frame_clock = _gdk_frame_clock_idle_new ();
surface = g_object_new (GDK_TYPE_WAYLAND_SURFACE,
"display", display,

View File

@ -809,7 +809,10 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
x11_screen = GDK_X11_SCREEN (display_x11->screen);
xparent = GDK_SCREEN_XROOTWIN (x11_screen);
frame_clock = _gdk_frame_clock_idle_new ();
if (parent)
frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
else
frame_clock = _gdk_frame_clock_idle_new ();
surface = g_object_new (GDK_TYPE_X11_SURFACE,
"display", display,