[gtk/window-cursor] window: Set cursor on the right surface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/window-cursor] window: Set cursor on the right surface
- Date: Mon, 29 Apr 2019 18:54:00 +0000 (UTC)
commit 89d1f8c3ca3a046569acebd1392211652e216e8a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 26 23:48:13 2019 +0000
window: Set cursor on the right surface
Set the cursor on the surface of the target
widget, not the surface of some of its parents.
This does not make a difference currently.
But it will in the future, when we have
parented widgets with surfaces.
gtk/gtkwindow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 0fdb869bc7..04c1decdfb 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9876,6 +9876,9 @@ update_cursor (GtkWindow *toplevel,
GtkWidget *target)
{
GdkCursor *cursor = NULL;
+ GdkSurface *surface;
+
+ surface = gtk_widget_get_surface (target);
if (grab_widget && !gtk_widget_is_ancestor (target, grab_widget))
{
@@ -9903,8 +9906,7 @@ update_cursor (GtkWindow *toplevel,
}
}
- gdk_surface_set_device_cursor (gtk_widget_get_surface (GTK_WIDGET (toplevel)),
- device, cursor);
+ gdk_surface_set_device_cursor (surface, device, cursor);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]