diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c index 77f5d53ac1..cf580cd8a0 100644 --- a/app/display/gimpnavigationeditor.c +++ b/app/display/gimpnavigationeditor.c @@ -312,6 +312,8 @@ gimp_navigation_editor_popup (GimpDisplayShell *shell, /* Set poup screen */ gtk_window_set_screen (GTK_WINDOW (shell->nav_popup), gtk_widget_get_screen (widget)); + gtk_window_set_transient_for (GTK_WINDOW (shell->nav_popup), + GTK_WINDOW (gtk_widget_get_toplevel (widget))); gimp_navigation_view_get_local_marker (view, &view_marker_center_x, diff --git a/app/widgets/gimpnavigationview.c b/app/widgets/gimpnavigationview.c index beb206d1d6..0e32f1f5ff 100644 --- a/app/widgets/gimpnavigationview.c +++ b/app/widgets/gimpnavigationview.c @@ -387,10 +387,21 @@ gimp_navigation_view_motion_notify (GtkWidget *widget, return FALSE; } - gimp_navigation_view_move_to (nav_view, - mevent->x - nav_view->motion_offset_x, - mevent->y - nav_view->motion_offset_y); + /* Derive window-local coords from root coords and event_window's screen origin. + * This only makes a difference on Wayland, on other platforms the event coords + * are not local so this is a noop */ + { + gint origin_x, origin_y; + gdouble mx, my; + gdk_window_get_origin (view->event_window, &origin_x, &origin_y); + mx = mevent->x_root - origin_x; + my = mevent->y_root - origin_y; + + gimp_navigation_view_move_to (nav_view, + mx - nav_view->motion_offset_x, + my - nav_view->motion_offset_y); + } gdk_event_request_motions (mevent); return TRUE;