API: gdk: Make GdkEventSelection.requestor a GdkWindow
instead of a GdkNativeWindow. Also change gdk_selection_notify() API to take a GdkWindow to match this change.
This commit is contained in:
@ -814,7 +814,11 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
event->selection.selection = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.selection);
|
||||
event->selection.target = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.target);
|
||||
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.property);
|
||||
event->selection.requestor = xevent->xselectionrequest.requestor;
|
||||
if (xevent->xselectionrequest.requestor != None)
|
||||
event->selection.requestor = gdk_x11_window_foreign_new_for_display (display,
|
||||
xevent->xselectionrequest.requestor);
|
||||
else
|
||||
event->selection.requestor = NULL;
|
||||
event->selection.time = xevent->xselectionrequest.time;
|
||||
|
||||
break;
|
||||
|
||||
@ -190,7 +190,7 @@ gboolean _gdk_x11_display_set_selection_owner (GdkDisplay *display,
|
||||
GdkWindow * _gdk_x11_display_get_selection_owner (GdkDisplay *display,
|
||||
GdkAtom selection);
|
||||
void _gdk_x11_display_send_selection_notify (GdkDisplay *display,
|
||||
GdkNativeWindow requestor,
|
||||
GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
GdkAtom property,
|
||||
|
||||
@ -308,7 +308,7 @@ _gdk_x11_display_get_selection_property (GdkDisplay *display,
|
||||
|
||||
void
|
||||
_gdk_x11_display_send_selection_notify (GdkDisplay *display,
|
||||
GdkNativeWindow requestor,
|
||||
GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
GdkAtom property,
|
||||
@ -319,7 +319,7 @@ _gdk_x11_display_send_selection_notify (GdkDisplay *display,
|
||||
xevent.type = SelectionNotify;
|
||||
xevent.serial = 0;
|
||||
xevent.send_event = True;
|
||||
xevent.requestor = requestor;
|
||||
xevent.requestor = GDK_WINDOW_XID (requestor);
|
||||
xevent.selection = gdk_x11_atom_to_xatom_for_display (display, selection);
|
||||
xevent.target = gdk_x11_atom_to_xatom_for_display (display, target);
|
||||
if (property == GDK_NONE)
|
||||
@ -328,7 +328,7 @@ _gdk_x11_display_send_selection_notify (GdkDisplay *display,
|
||||
xevent.property = gdk_x11_atom_to_xatom_for_display (display, property);
|
||||
xevent.time = time;
|
||||
|
||||
_gdk_x11_display_send_xevent (display, requestor, False, NoEventMask, (XEvent*) & xevent);
|
||||
_gdk_x11_display_send_xevent (display, xevent.requestor, False, NoEventMask, (XEvent*) & xevent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -876,7 +876,9 @@ x_event_mask_to_gdk_event_mask (long mask)
|
||||
* @display: the #GdkDisplay where the window handle comes from.
|
||||
* @window: an XLib <type>Window</type>
|
||||
*
|
||||
* Wraps a native window in a #GdkWindow.
|
||||
* Wraps a native window in a #GdkWindow. The function will try to
|
||||
* look up the window using gdk_x11_window_lookup_for_display() first.
|
||||
* If it does not find it there, it will create a new window.
|
||||
*
|
||||
* This may fail if the window has been destroyed. If the window
|
||||
* was already known to GDK, a new reference to the existing
|
||||
|
||||
Reference in New Issue
Block a user