Commit 9864445b authored by Benjamin Otte's avatar Benjamin Otte
Browse files

API: gdk: Change GdkEventOwnerChange to not take GdkNativeWindow

Use GdkWindow instead. This requires calling
gdk_x11_window_foreign_new_for_display(), so might cause a slight
performance penalty, but is required to be portable.
parent cfa65055
......@@ -567,6 +567,10 @@ gdk_event_copy (const GdkEvent *event)
sizeof (gdouble) * gdk_device_get_n_axes (event->motion.device));
break;
case GDK_OWNER_CHANGE:
new_event->owner_change.owner = g_object_ref (event->owner_change.owner);
break;
default:
break;
}
......@@ -636,6 +640,10 @@ gdk_event_free (GdkEvent *event)
g_free (event->setting.name);
break;
case GDK_OWNER_CHANGE:
g_object_unref (event->owner_change.owner);
break;
default:
break;
}
......
......@@ -840,7 +840,7 @@ struct _GdkEventOwnerChange
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkNativeWindow owner;
GdkWindow *owner;
GdkOwnerChange reason;
GdkAtom selection;
guint32 time;
......
......@@ -919,7 +919,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->owner_change.type = GDK_OWNER_CHANGE;
event->owner_change.window = window;
event->owner_change.owner = selection_notify->owner;
event->owner_change.owner = gdk_x11_window_foreign_new_for_display (display,
selection_notify->owner);
event->owner_change.reason = selection_notify->subtype;
event->owner_change.selection =
gdk_x11_xatom_to_atom_for_display (display,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment