File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ namespace Gala {
73
73
private WindowSwitcher ? winswitcher = null ;
74
74
private ActivatableComponent ? window_overview = null ;
75
75
76
- private BackgroundMenu background_menu;
76
+ private BackgroundMenu ? background_menu = null ;
77
77
78
78
public ScreenSaverManager ? screensaver { get ; private set ; }
79
79
@@ -249,9 +249,6 @@ namespace Gala {
249
249
stage. remove_child (top_window_group);
250
250
ui_group. add_child (top_window_group);
251
251
252
- background_menu = new BackgroundMenu (this );
253
- ui_group. add_child (background_menu);
254
-
255
252
FilterManager . init (this );
256
253
257
254
/* keybindings*/
@@ -406,6 +403,11 @@ namespace Gala {
406
403
}
407
404
408
405
private void on_show_background_menu (int x , int y ) {
406
+ if (background_menu == null ) {
407
+ background_menu = new BackgroundMenu (this );
408
+ ui_group. add_child (background_menu);
409
+ }
410
+
409
411
background_menu. set_position (x, y);
410
412
background_menu. open_menu ();
411
413
}
You can’t perform that action at this time.
0 commit comments