blob: 861943a0c4ce7f2d25ec9bc58d086dd8c9735b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- a/src/view/xdg-shell.cpp
+++ b/src/view/xdg-shell.cpp
@@ -15,6 +15,7 @@
#include "xdg-shell.hpp"
#include "wayfire/output-layout.hpp"
#include <wayfire/workspace-set.hpp>
+#include <wayfire/window-scope.hpp>
#include <wayfire/signal-definitions.hpp>
#include <wayfire/unstable/wlr-surface-controller.hpp>
#include <wayfire/unstable/wlr-view-events.hpp>
@@ -313,6 +314,14 @@
}
auto box = get_output()->get_relative_geometry();
+ if (auto toplevel = wf::toplevel_cast(toplevel_parent))
+ {
+ // Popup positioners use the toplevel's coordinate system. Keep a
+ // physical-scope application's menus on its member of a stitched
+ // output, while virtual-scope and layer-shell parents retain the
+ // logical output bounds.
+ box = wf::window_scope_fullscreen(toplevel);
+ }
auto parent_offset = toplevel_parent->get_surface_root_node()->to_global({0, 0});
box.x -= parent_offset.x;
box.y -= parent_offset.y;
|