Skip to content

WIP: fix wrong position on the printing dialog on macOS.

Alex Samorukov requested to merge samm/gimp-2-10-print-focus into gimp-2-10


Most of the dialogs in macOS GIMP are shown on correct location. However, at least Print dialog is always rendered on the primary monitor using 0,0 screen coordinates (top left). On multi-monitor configuration this is very uncomfortable, see report #4294

Tracing with debugger i identified the difference - we are using gimp_dialog for the most of our plugins and few are not using it, e.g. print.c, which is using gtk_print_operation_run to render widgets. This makes gimp_window_set_transient call and signal associated with it never called.

My workaround for this is very simple - i am creating new gtk window, calling gimp_window_set_transient on it and gtk_widget_show() to make sure that callback is registered. Hanlder of this window is passed to the print dialog, so it is shown on the correct location.


Screenshot before fix (GIMP itself is on another monitor!) Screenshot before fix

Screenshot after fix after fix

Edited by Jehan

Merge request reports