Skip to content
Open
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
38 changes: 1 addition & 37 deletions src/panel/widgets/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,6 @@ void WayfireMenu::on_popover_shown()
on_search_changed();
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);
}

bool WayfireMenu::update_icon()
Expand Down Expand Up @@ -615,31 +611,6 @@ void WayfireMenu::setup_popover_layout()
return false;
}, false));
button->get_popover()->add_controller(typing_gesture);
signals.push_back(button->get_popover()->signal_closed().connect([=] ()
{
Gtk::Window *window = dynamic_cast<Gtk::Window*>(button->get_root());
WfOption<std::string> panel_layer{"panel/layer"};

if ((std::string)panel_layer == "overlay")
{
gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_OVERLAY);
}

if ((std::string)panel_layer == "top")
{
gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_TOP);
}

if ((std::string)panel_layer == "bottom")
{
gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_BOTTOM);
}

if ((std::string)panel_layer == "background")
{
gtk_layer_set_layer(window->gobj(), GTK_LAYER_SHELL_LAYER_BACKGROUND);
}
}));
}

void WayfireMenu::update_popover_layout()
Expand Down Expand Up @@ -771,14 +742,7 @@ WayfireLogoutUI::WayfireLogoutUI()

main_layout.set_row_spacing(LOGOUT_BUTTON_MARGIN);
main_layout.set_column_spacing(LOGOUT_BUTTON_MARGIN);
/* Make surfaces layer shell */
gtk_layer_init_for_window(ui.gobj());
gtk_layer_set_layer(ui.gobj(), GTK_LAYER_SHELL_LAYER_OVERLAY);

gtk_layer_set_anchor(ui.gobj(), GTK_LAYER_SHELL_EDGE_TOP, true);
gtk_layer_set_anchor(ui.gobj(), GTK_LAYER_SHELL_EDGE_BOTTOM, true);
gtk_layer_set_anchor(ui.gobj(), GTK_LAYER_SHELL_EDGE_LEFT, true);
gtk_layer_set_anchor(ui.gobj(), GTK_LAYER_SHELL_EDGE_RIGHT, true);

main_layout.set_valign(Gtk::Align::CENTER);
box.set_center_widget(main_layout);
box.set_hexpand(true);
Expand Down