Skip to content

Commit 403df37

Browse files
committed
panel: fix crash in other compositors
1 parent c53df71 commit 403df37

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/util/wf-autohide-window.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ WayfireAutohidingWindow::WayfireAutohidingWindow(WayfireOutput *output,
7070

7171
this->autohide_opt.set_callback([=] { setup_autohide(); });
7272

73+
74+
if (!output->output)
75+
{
76+
std::cerr << "WARNING: Compositor does not support zwf_shell_manager_v2 " << \
77+
"disabling hotspot and autohide features " << \
78+
"(is wayfire-shell plugin enabled?)" << std::endl;
79+
return;
80+
}
81+
7382
auto display = Gdk::Display::get_default();
7483
auto monitors = display->get_monitors();
7584
signals.push_back(monitors->signal_items_changed().connect([=] (auto, auto, auto)
@@ -80,13 +89,6 @@ WayfireAutohidingWindow::WayfireAutohidingWindow(WayfireOutput *output,
8089
// wait for idle, so once everything is initialised. Else, things depend on loading order.
8190
Glib::signal_idle().connect_once([=] () { this->reinit_ext_hotspots(); });
8291

83-
if (!output->output)
84-
{
85-
std::cerr << "WARNING: Compositor does not support zwf_shell_manager_v2 " << \
86-
"disabling hotspot and autohide features " << \
87-
"(is wayfire-shell plugin enabled?)" << std::endl;
88-
return;
89-
}
9092

9193
static const zwf_output_v2_listener listener = {
9294
.enter_fullscreen = [] (void *data, zwf_output_v2*)

0 commit comments

Comments
 (0)