mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
gdkwindow: Specify some invariants for cursors
Cursors should not be on a different display than their window / device, as that would break Wayland.
This commit is contained in:
parent
168a49426e
commit
52e3b88382
@ -6015,6 +6015,9 @@ gdk_window_set_cursor_internal (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
g_assert (gdk_window_get_display (window) == gdk_device_get_display (device));
|
||||
g_assert (!cursor || gdk_window_get_display (window) == gdk_cursor_get_display (cursor));
|
||||
|
||||
if (window->window_type == GDK_WINDOW_ROOT ||
|
||||
window->window_type == GDK_WINDOW_FOREIGN)
|
||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_device_cursor (window, device, cursor);
|
||||
|
Loading…
Reference in New Issue
Block a user