File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 189189 <default >42</default >
190190 <min >0</min >
191191 </option >
192+ <option name =" menu_force_show_popup" type =" bool" >
193+ <_short >Force showing the menu popup</_short >
194+ <_long >Show the menu popup over other windows, even if it and the panel would be hidden otherwise.</_long >
195+ <default >true</default >
196+ </option >
192197 <option name =" menu_min_category_width" type =" int" >
193198 <_short >Menu Minimum Category Width</_short >
194199 <default >200</default >
Original file line number Diff line number Diff line change @@ -518,9 +518,11 @@ void WayfireMenu::on_popover_shown()
518518 set_category (" All" );
519519 flowbox.unselect_all ();
520520
521- Gtk::Window *window = dynamic_cast <Gtk::Window*>(button->get_root ());
522-
523- gtk_layer_set_layer (window->gobj (), GTK_LAYER_SHELL_LAYER_OVERLAY);
521+ if (force_show_popup.value ())
522+ {
523+ Gtk::Window *window = dynamic_cast <Gtk::Window*>(button->get_root ());
524+ gtk_layer_set_layer (window->gobj (), GTK_LAYER_SHELL_LAYER_OVERLAY);
525+ }
524526}
525527
526528bool WayfireMenu::update_icon ()
@@ -615,8 +617,14 @@ void WayfireMenu::setup_popover_layout()
615617 return false ;
616618 }, false ));
617619 button->get_popover ()->add_controller (typing_gesture);
620+
618621 signals.push_back (button->get_popover ()->signal_closed ().connect ([=] ()
619622 {
623+ if (!force_show_popup.value ())
624+ {
625+ return ;
626+ }
627+
620628 Gtk::Window *window = dynamic_cast <Gtk::Window*>(button->get_root ());
621629 WfOption<std::string> panel_layer{" panel/layer" };
622630
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ class WayfireMenu : public WayfireWidget
176176 WfOption<bool > fuzzy_search_enabled{" panel/menu_fuzzy_search" };
177177 WfOption<std::string> panel_position{" panel/position" };
178178 WfOption<std::string> menu_icon{" panel/menu_icon" };
179+ WfOption<bool > force_show_popup{" panel/menu_force_show_popup" };
179180 WfOption<int > menu_min_category_width{" panel/menu_min_category_width" };
180181 WfOption<int > menu_min_content_height{" panel/menu_min_content_height" };
181182 WfOption<bool > menu_show_categories{" panel/menu_show_categories" };
You can’t perform that action at this time.
0 commit comments