forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
638508fa20
commit
08fbd012ec
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user