Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions metadata/panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@
<default>42</default>
<min>0</min>
</option>
<option name="menu_force_show_popup" type="bool">
<_short>Force showing the menu popup</_short>
<_long>Show the menu popup over other windows, even if it and the panel would be hidden otherwise.</_long>
<default>true</default>
</option>
<option name="menu_min_category_width" type="int">
<_short>Menu Minimum Category Width</_short>
<default>200</default>
Expand Down
14 changes: 11 additions & 3 deletions src/panel/widgets/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,11 @@ void WayfireMenu::on_popover_shown()
set_category("All");
flowbox.unselect_all();

Gtk::Window *window = dynamic_cast<Gtk::Window*>(button->get_root());

gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_OVERLAY);
if (force_show_popup.value())
{
Gtk::Window *window = dynamic_cast<Gtk::Window*>(button->get_root());
gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_OVERLAY);
}
}

bool WayfireMenu::update_icon()
Expand Down Expand Up @@ -615,8 +617,14 @@ void WayfireMenu::setup_popover_layout()
return false;
}, false));
button->get_popover()->add_controller(typing_gesture);

signals.push_back(button->get_popover()->signal_closed().connect([=] ()
{
if (!force_show_popup.value())
{
return;
}

Gtk::Window *window = dynamic_cast<Gtk::Window*>(button->get_root());
WfOption<std::string> panel_layer{"panel/layer"};

Expand Down
1 change: 1 addition & 0 deletions src/panel/widgets/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class WayfireMenu : public WayfireWidget
WfOption<bool> fuzzy_search_enabled{"panel/menu_fuzzy_search"};
WfOption<std::string> panel_position{"panel/position"};
WfOption<std::string> menu_icon{"panel/menu_icon"};
WfOption<bool> force_show_popup{"panel/menu_force_show_popup"};
WfOption<int> menu_min_category_width{"panel/menu_min_category_width"};
WfOption<int> menu_min_content_height{"panel/menu_min_content_height"};
WfOption<bool> menu_show_categories{"panel/menu_show_categories"};
Expand Down