[gtk/wip/matthiasc/popup5: 93/152] window: Don't inherit cursors	across surfaces
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/wip/matthiasc/popup5: 93/152] window: Don't inherit cursors	across surfaces
- Date: Sun, 26 May 2019 05:27:24 +0000 (UTC)
commit ea43a50bc0e7882af2528aa2710267bcc98429c5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 4 16:21:33 2019 +0000
    window: Don't inherit cursors across surfaces
    
    I can't think of a case where this is the desired
    behavior. So, instead of setting an explicit cursor
    on all popups, just stop walking the parents at
    surface boundaries.
 gtk/gtkwindow.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 604d2d5825..316cb01f6c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9923,6 +9923,10 @@ update_cursor (GtkWindow *toplevel,
           if (grab_widget && target == grab_widget)
             break;
 
+          /* Don't inherit cursors across surfaces */
+          if (surface != gtk_widget_get_surface (target))
+            break;
+
           cursor = gtk_widget_get_cursor (target);
 
           if (cursor)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]