Skip to content

shell: prevent loading last-panel unconditionally on startup

Nelson Ben requested to merge fix_opening_panel_from_commandline into main

We currently load the last-panel every time gnome-control-center is launched, we do it from the CcWindow contructor method.

But we shouldn't do it when we are explicitly opening a different panel by eg. using commandline parameter ($ gnome-control-center keyboard) or from a DBus method, because otherwise we slow things down by unnecesarily start launching last-panel just to be cancelled moments later when the code starts processing the other panel.

We fix it by moving the code that loads last-panel to an idle handler, so by the time it gets executed the other panel has already started loading, and we can check for that with the cc_panel_list_get_current_panel() function we add in this patch.

With this patch, I can feel that panels opened from a gnome-shell search are presented faster.

Fixes issue #2569 (closed)

Merge request reports