forked from AuroraMiddleware/gtk
Sync the display when creating a native window.
This is needed because we want to be able to use the xid immediately even from another process or another connection to the display.
This commit is contained in:
parent
089c9ca2f1
commit
e631d2d2d4
@ -1305,6 +1305,12 @@ gdk_window_set_has_native (GdkWindow *window, gboolean has_native)
|
||||
|
||||
if (gdk_window_is_viewable (window))
|
||||
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->show (window);
|
||||
|
||||
/* We sync here to ensure the window is created in the Xserver when
|
||||
* this function returns. This is required because the returned XID
|
||||
* for this window must be valid immediately, even with another
|
||||
* connection to the Xserver */
|
||||
gdk_display_sync (gdk_drawable_get_display (window));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user