Skip to content

Commit 8250879

Browse files
committed
Fix wayland
1 parent bd81770 commit 8250879

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/WindowManager.vala

+6-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace Gala {
7373
private WindowSwitcher? winswitcher = null;
7474
private ActivatableComponent? window_overview = null;
7575

76-
private BackgroundMenu background_menu;
76+
private BackgroundMenu? background_menu = null;
7777

7878
public ScreenSaverManager? screensaver { get; private set; }
7979

@@ -249,9 +249,6 @@ namespace Gala {
249249
stage.remove_child (top_window_group);
250250
ui_group.add_child (top_window_group);
251251

252-
background_menu = new BackgroundMenu (this);
253-
ui_group.add_child (background_menu);
254-
255252
FilterManager.init (this);
256253

257254
/*keybindings*/
@@ -406,6 +403,11 @@ namespace Gala {
406403
}
407404

408405
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+
409411
background_menu.set_position (x, y);
410412
background_menu.open_menu ();
411413
}

0 commit comments

Comments
 (0)