-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Running system-config-printer under Niri window manager exposes a bug in the way dialogs are presented. If I use system-config-printer to show printer-properties and then print a test page the "Submitted" modal dialog is shown behind the printer-properties dialog and cant be interacted with.
In the screenshot, I have moved the "Printer properties...." dialog down and to the left, to partially reveal the "Submitted" dialog beneath. When presented the three are stacked one in front of the other.
The expected behaviour, is the "Submitted" is at the front and focused.
I took a look into the code for https://github.com/OpenPrinting/system-config-printer/blob/master/printerproperties.py and found that the final dialog has its parent set to the earliest opened window.
At lines 1215-1218 I changed
if job_id is not None:
show_info_dialog (_("Submitted"),
_("Test page submitted as job %d") % job_id,
parent=self.parent)
to
if job_id is not None:
show_info_dialog (_("Submitted"),
_("Test page submitted as job %d") % job_id,
parent=self.dialog)
and the problem went away.
The GTK documentation clearly states a modal dialog's parent should be set to the window it was spawned from.