forked from AuroraMiddleware/gtk
x11: Avoid gdk_device_manager_get_client_pointer()
We can use the pointer of the default seat instead.
This commit is contained in:
parent
1fbf2fe4d7
commit
c3f1565c18
@ -1364,7 +1364,7 @@ gdk_x11_display_init_input (GdkDisplay *display)
|
|||||||
|
|
||||||
g_list_free (list);
|
g_list_free (list);
|
||||||
|
|
||||||
display->core_pointer = gdk_device_manager_get_client_pointer (device_manager);
|
display->core_pointer = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
|
||||||
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
|
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
|
||||||
g_object_ref (display->core_pointer));
|
g_object_ref (display->core_pointer));
|
||||||
}
|
}
|
||||||
|
@ -1597,12 +1597,12 @@ xdnd_enter_filter (GdkXEvent *xev,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer cb_data)
|
gpointer cb_data)
|
||||||
{
|
{
|
||||||
GdkDeviceManager *device_manager;
|
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkX11Display *display_x11;
|
GdkX11Display *display_x11;
|
||||||
XEvent *xevent = (XEvent *)xev;
|
XEvent *xevent = (XEvent *)xev;
|
||||||
GdkDragContext *context;
|
GdkDragContext *context;
|
||||||
GdkX11DragContext *context_x11;
|
GdkX11DragContext *context_x11;
|
||||||
|
GdkSeat *seat;
|
||||||
gint i;
|
gint i;
|
||||||
Atom type;
|
Atom type;
|
||||||
int format;
|
int format;
|
||||||
@ -1650,8 +1650,8 @@ xdnd_enter_filter (GdkXEvent *xev,
|
|||||||
context_x11->version = version;
|
context_x11->version = version;
|
||||||
|
|
||||||
/* FIXME: Should extend DnD protocol to have device info */
|
/* FIXME: Should extend DnD protocol to have device info */
|
||||||
device_manager = gdk_display_get_device_manager (display);
|
seat = gdk_display_get_default_seat (display);
|
||||||
gdk_drag_context_set_device (context, gdk_device_manager_get_client_pointer (device_manager));
|
gdk_drag_context_set_device (context, gdk_seat_get_pointer (seat));
|
||||||
|
|
||||||
context->source_window = gdk_x11_window_foreign_new_for_display (display, source_window);
|
context->source_window = gdk_x11_window_foreign_new_for_display (display, source_window);
|
||||||
if (!context->source_window)
|
if (!context->source_window)
|
||||||
|
Loading…
Reference in New Issue
Block a user