diff --git a/src/view/view-impl.cpp b/src/view/view-impl.cpp index a5974ce96..b312b0bfe 100644 --- a/src/view/view-impl.cpp +++ b/src/view/view-impl.cpp @@ -397,14 +397,6 @@ wf::pointf_t wf::place_popup_at(wlr_surface *parent, wlr_surface *popup, wf::poi // Get the {0, 0} of the parent view in output coordinates popup_offset += popup_parent->get_surface_root_node()->to_global({0, 0}); - auto xdg_surface = wlr_xdg_surface_try_from_wlr_surface(parent); - if (xdg_surface) - { - // substract shadows etc; test app: d-feet - popup_offset.x -= xdg_surface->current.geometry.x; - popup_offset.y -= xdg_surface->current.geometry.y; - } - // Apply transformers to the popup position auto node = popup_parent->get_surface_root_node()->parent(); while (node != popup_parent->get_transformed_node().get()) diff --git a/src/view/xdg-shell.cpp b/src/view/xdg-shell.cpp index a8fc39210..a4230d121 100644 --- a/src/view/xdg-shell.cpp +++ b/src/view/xdg-shell.cpp @@ -3,7 +3,6 @@ #include #include "view/view-impl.hpp" #include "wayfire/core.hpp" -#include "surface-impl.hpp" #include "wayfire/geometry.hpp" #include "wayfire/output.hpp" #include "wayfire/scene-operations.hpp" @@ -166,8 +165,8 @@ void wayfire_xdg_popup::update_position() // Offset relative to the parent surface wf::pointf_t popup_offset = wf::place_popup_at(popup->parent, popup->base->surface, { - popup->current.geometry.x * 1.0, - popup->current.geometry.y * 1.0, + popup->current.geometry.x * 1.0 - popup->base->current.geometry.x, + popup->current.geometry.y * 1.0 - popup->base->current.geometry.y, }); this->move(popup_offset.x, popup_offset.y);