Ensure that windows used for selections are native

This fixes cut and paste in gvim (#588115)
This commit is contained in:
Alexander Larsson 2009-07-10 19:36:38 +02:00
parent ccb09d1c6f
commit 9063e5b3bf

View File

@ -144,6 +144,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
if (GDK_WINDOW_DESTROYED (owner) || !GDK_WINDOW_IS_X11 (owner))
return FALSE;
gdk_window_ensure_native (owner);
xdisplay = GDK_WINDOW_XDISPLAY (owner);
xwindow = GDK_WINDOW_XID (owner);
}
@ -230,10 +231,11 @@ gdk_selection_convert (GdkWindow *requestor,
GdkDisplay *display;
g_return_if_fail (selection != GDK_NONE);
if (GDK_WINDOW_DESTROYED (requestor) || !GDK_WINDOW_IS_X11 (requestor))
return;
gdk_window_ensure_native (requestor);
display = GDK_WINDOW_DISPLAY (requestor);
XConvertSelection (GDK_WINDOW_XDISPLAY (requestor),