diff --git a/src/view/xdg-shell.cpp b/src/view/xdg-shell.cpp index 243c7140b..38abb8974 100644 --- a/src/view/xdg-shell.cpp +++ b/src/view/xdg-shell.cpp @@ -72,12 +72,17 @@ wayfire_xdg_popup::wayfire_xdg_popup(wlr_xdg_popup *popup) : wf::view_interface_ { wf::view_implementation::emit_ping_timeout_signal(self()); }); + on_reposition.set_callback([&] (void*) + { + unconstrain(); + }); on_map.connect(&popup->base->events.map); on_unmap.connect(&popup->base->events.unmap); on_destroy.connect(&popup->base->events.destroy); on_new_popup.connect(&popup->base->events.new_popup); on_ping_timeout.connect(&popup->base->events.ping_timeout); + on_reposition.connect(&popup->events.reposition); popup->base->data = this; parent_geometry_changed.set_callback([=] (auto) @@ -222,6 +227,7 @@ void wayfire_xdg_popup::destroy() on_destroy.disconnect(); on_new_popup.disconnect(); on_ping_timeout.disconnect(); + on_reposition.disconnect(); popup = nullptr; } @@ -350,7 +356,7 @@ static wlr_xdg_shell *xdg_handle = nullptr; void wf::init_xdg_shell() { static wf::wl_listener_wrapper on_xdg_created; - xdg_handle = wlr_xdg_shell_create(wf::get_core().display, 2); + xdg_handle = wlr_xdg_shell_create(wf::get_core().display, 3); if (xdg_handle) { diff --git a/src/view/xdg-shell.hpp b/src/view/xdg-shell.hpp index 192b15bb9..644a10f3a 100644 --- a/src/view/xdg-shell.hpp +++ b/src/view/xdg-shell.hpp @@ -16,7 +16,7 @@ class wayfire_xdg_popup : public wf::view_interface_t { protected: wf::wl_listener_wrapper on_destroy, on_new_popup, - on_map, on_unmap, on_ping_timeout; + on_map, on_unmap, on_ping_timeout, on_reposition; wf::signal::connection_t parent_geometry_changed; wf::signal::connection_t parent_title_changed;