Open dialogs are not closed when changing panels via command line
Open dialogs are not closed when changing panels via command line or dbus, such as gnome-control-center network
.
Steps to reproduce
- Open GNOME Settings
- Open the Input Source chooser from the Keyboard panel
- From (another) command line, enter
gnome-control-center network
- Network panel opens with the Input Source chooser still open
- (trying to add an Input Source will crash)
This works on both main
and 45.3.
Ideas for solving
If this is worth solving I don't know, since this must have been an issue for quite some time but I haven't seen reports.
In any case, I believe the one proper way would be to somehow register open dialogs with CcWindow, and (force) close them in activate_panel()
or so.
Note that fixes like g_clear_pointer (&dialog, adw_dialog_force_close);
(like the ones removed by 4d22aa5e) do not really work to solve this, since the open dialog could be from the same panel. An example is the Secure Shell dialog from System, that remains open on gnome-control-center system users
.
Relevant information
Edited by Matthijs Velsink