[gtk/matthiasc/for-master] window: Make resize cursors work for modal dialogs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] window: Make resize cursors work for modal dialogs
- Date: Mon, 13 Apr 2020 02:32:19 +0000 (UTC)
commit 08fbd012ec7cf44a15ff586ac881e5634ff9176a
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 12 22:18:50 2020 -0400
window: Make resize cursors work for modal dialogs
We were inadvertedly not letting the grab_widget determine
a cursor. This was showing up as resize cursors not appearing.
gtk/gtkwindow.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ee27db076c..69e3e7a399 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7915,7 +7915,7 @@ update_cursor (GtkWindow *toplevel,
surface = gtk_native_get_surface (gtk_widget_get_native (target));
- if (grab_widget && !gtk_widget_is_ancestor (target, grab_widget))
+ if (grab_widget && !gtk_widget_is_ancestor (target, grab_widget) && target != grab_widget)
{
/* Outside the grab widget, cursor stays to whatever the grab
* widget says.
@@ -7932,9 +7932,6 @@ update_cursor (GtkWindow *toplevel,
*/
while (target)
{
- if (grab_widget && target == grab_widget)
- break;
-
/* Don't inherit cursors across surfaces */
if (surface != gtk_native_get_surface (gtk_widget_get_native (target)))
break;
@@ -7947,6 +7944,9 @@ update_cursor (GtkWindow *toplevel,
if (cursor)
break;
+ if (grab_widget && target == grab_widget)
+ break;
+
target = _gtk_widget_get_parent (target);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]