@@ -53,7 +53,7 @@ WayfireAutohidingWindow::WayfireAutohidingWindow(WayfireOutput *output,
5353 std::cerr << " WARNING: Compositor does not support zwf_shell_manager_v2 " << \
5454 " disabling hotspot and autohide features " << \
5555 " (is wayfire-shell plugin enabled?)" << std::endl;
56- return ;
56+ return ;
5757 }
5858
5959 static const zwf_output_v2_listener listener = {
@@ -64,7 +64,11 @@ WayfireAutohidingWindow::WayfireAutohidingWindow(WayfireOutput *output,
6464 .leave_fullscreen = [] (void *data, zwf_output_v2*)
6565 {
6666 ((WayfireAutohidingWindow*)data)->decrease_autohide ();
67- }
67+ },
68+ .toggle_menu = [] (void *data, zwf_output_v2*)
69+ {
70+ ((WayfireAutohidingWindow*)data)->output ->toggle_menu_signal ().emit ();
71+ },
6872 };
6973 zwf_output_v2_add_listener (output->output , &listener, this );
7074}
@@ -262,7 +266,7 @@ void WayfireAutohidingWindow::setup_hotspot()
262266
263267void WayfireAutohidingWindow::setup_auto_exclusive_zone ()
264268{
265- if (!auto_exclusive_zone && auto_exclusive_zone == 0 )
269+ if (!auto_exclusive_zone && ( auto_exclusive_zone == 0 ) )
266270 {
267271 return ;
268272 }
@@ -273,7 +277,7 @@ void WayfireAutohidingWindow::setup_auto_exclusive_zone()
273277void WayfireAutohidingWindow::update_auto_exclusive_zone ()
274278{
275279 int allocated_height = get_allocated_height ();
276- int new_zone_size = this ->auto_exclusive_zone ? allocated_height : 0 ;
280+ int new_zone_size = this ->auto_exclusive_zone ? allocated_height : 0 ;
277281
278282 if (new_zone_size != this ->auto_exclusive_zone_size )
279283 {
@@ -282,7 +286,7 @@ void WayfireAutohidingWindow::update_auto_exclusive_zone()
282286 }
283287}
284288
285- void WayfireAutohidingWindow::set_auto_exclusive_zone (bool has_zone)
289+ void WayfireAutohidingWindow::set_auto_exclusive_zone (bool has_zone)
286290{
287291 if (has_zone && (output->output && autohide_opt))
288292 {
@@ -453,11 +457,11 @@ void WayfireAutohidingWindow::setup_autohide()
453457 this ->signal_size_allocate ().connect_notify (
454458 [=] (Gtk::Allocation&)
455459 {
456- // std::cerr << "set_auto_exclusive_zone: " << this->auto_exclusive_zone << std::endl;
460+ // std::cerr << "set_auto_exclusive_zone: " << this->auto_exclusive_zone << std::endl;
457461 this ->update_auto_exclusive_zone ();
458462
459463 // We have to check here as well, otherwise it enables hotspot when it shouldn't
460- if (!output->output || !(output->output && autohide_opt))
464+ if (!output->output || !(output->output && autohide_opt))
461465 {
462466 return ;
463467 }
0 commit comments