--- a/src/overview.cpp +++ b/src/overview.cpp @@ -1285,6 +1285,7 @@ wf::wl_timer clock_timer; wf::effect_hook_t pre_hook; bool hooks_active = false; + bool show_panel = false; int panel_height = 16, corner_radius = 12, spacing = 20, anim_duration = 300; std::string panel_color = "#1a1a1aE6"; bool button_held = false; @@ -1312,7 +1313,7 @@ void init() override { panel = std::make_unique(output, panel_height, panel_color); activities = std::make_unique(output); - activities->set_config(corner_radius, spacing, panel_height, anim_duration); + activities->set_config(corner_radius, spacing, show_panel ? panel_height : 0, anim_duration); wf::gles::run_in_context([&] { progs.load(); }); load_wallpaper(); @@ -1330,21 +1331,23 @@ } }; - clock_timer.set_timeout(60000, [this]() { + if (show_panel) clock_timer.set_timeout(60000, [this]() { panel->render(); panel->upload(); if (panel_node) wf::scene::damage_node(panel_node, panel_node->get_bounding_box()); return true; }); - panel_node = std::make_shared(output, panel.get(), &progs, &activities->is_active); - wf::scene::add_front(wf::get_core().scene(), panel_node); - wf::scene::damage_node(panel_node, panel_node->get_bounding_box()); + if (show_panel) { + panel_node = std::make_shared(output, panel.get(), &progs, &activities->is_active); + wf::scene::add_front(wf::get_core().scene(), panel_node); + wf::scene::damage_node(panel_node, panel_node->get_bounding_box()); + } } void activate_hooks() { if (hooks_active) return; if (!render_node) { - render_node = std::make_shared(output, activities.get(), &progs, wallpaper_tex, panel.get()); + render_node = std::make_shared(output, activities.get(), &progs, wallpaper_tex, show_panel ? panel.get() : nullptr); wf::scene::add_front(wf::get_core().scene(), render_node); } if (panel_node) { @@ -1384,7 +1387,7 @@ void handle_motion(wf::pointf_t cursor) { auto og = output->get_layout_geometry(); - bool in_panel = cursor.y >= og.y && cursor.y < og.y + panel->height; + bool in_panel = show_panel && cursor.y >= og.y && cursor.y < og.y + panel->height; if (in_panel) { if (panel->set_hover(panel->point_in_activities(cursor))) wf::scene::damage_node(panel_node, panel_node->get_bounding_box()); @@ -1420,7 +1423,7 @@ bool handle_button(uint32_t btn, uint32_t state, wf::pointf_t cursor) { if (btn != BTN_LEFT) return false; if (state == WL_POINTER_BUTTON_STATE_PRESSED) { - if (panel->point_in_activities(cursor)) { toggle(); return true; } + if (show_panel && panel->point_in_activities(cursor)) { toggle(); return true; } if (activities->is_active && !activities->is_animating) { button_held = true; press_pos = cursor; drag_started = false; return true; } @@ -1451,6 +1454,7 @@ // ============================================================================ class wayfire_overview_t : public wf::plugin_interface_t { + wf::option_wrapper_t opt_show_panel{"overview/show_panel"}; wf::option_wrapper_t opt_panel_height{"overview/panel_height"}; wf::option_wrapper_t opt_panel_color{"overview/panel_color"}; wf::option_wrapper_t opt_corner_radius{"overview/corner_radius"}; @@ -1477,6 +1481,7 @@ } void add_output(wf::output_t *out) { auto i = std::make_unique(); + i->show_panel = opt_show_panel; i->panel_height = opt_panel_height; i->panel_color = (std::string)opt_panel_color; i->corner_radius = opt_corner_radius; i->anim_duration = opt_animation_duration; i->spacing = opt_spacing; i->output = out; --- a/metadata/overview.xml +++ b/metadata/overview.xml @@ -11,12 +11,18 @@ <_short>Panel + +