Use GdkDeviceManager to get the core pointer
Commit 2c8c1c6df49 in gtk+ removed gdk_display_get_core_pointer(). The equivalent functionality can be achieved by using the GdkDeviceManager to retrieve the client pointer device.
This commit is contained in:
parent
53777b133b
commit
2faf56947b
@ -101,6 +101,7 @@ static gboolean
|
|||||||
maybe_redirect_mouse_event (XEvent *xevent)
|
maybe_redirect_mouse_event (XEvent *xevent)
|
||||||
{
|
{
|
||||||
GdkDisplay *gdisplay;
|
GdkDisplay *gdisplay;
|
||||||
|
GdkDeviceManager *gmanager;
|
||||||
MetaUI *ui;
|
MetaUI *ui;
|
||||||
GdkEvent *gevent;
|
GdkEvent *gevent;
|
||||||
GdkWindow *gdk_window;
|
GdkWindow *gdk_window;
|
||||||
@ -206,7 +207,8 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we've gotten here, we've created the gdk_event and should send it on */
|
/* If we've gotten here, we've created the gdk_event and should send it on */
|
||||||
gdk_event_set_device (gevent, gdk_display_get_core_pointer (gdisplay));
|
gmanager = gdk_display_get_device_manager (gdisplay);
|
||||||
|
gdk_event_set_device (gevent, gdk_device_manager_get_client_pointer (gmanager));
|
||||||
gtk_main_do_event (gevent);
|
gtk_main_do_event (gevent);
|
||||||
gdk_event_free (gevent);
|
gdk_event_free (gevent);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user