summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-08-15 20:09:32 +0200
committervaxerski <vaxry@vaxry.net>2023-08-15 20:10:43 +0200
commit4986d74ef201171a930c312a8e3b72a22d9b84ee (patch)
tree49a8a6db7178fe3cd7cfe063180d87fd4ada6005 /src/events/Windows.cpp
parent91e28bbe9df85e2e94fbcc0137106362aea14ab5 (diff)
xwayland: fix use of xwayland coords in native spaces
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index a45aa91e..211f6ed3 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -413,8 +413,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
PWINDOW->setHidden(false);
} catch (...) { Debug::log(LOG, "Rule move failed, rule: %s -> %s", r.szRule.c_str(), r.szValue.c_str()); }
} else if (r.szRule.find("center") == 0) {
- auto RESERVEDOFFSET = Vector2D();
- const auto ARGS = CVarList(r.szRule, 2, ' ');
+ auto RESERVEDOFFSET = Vector2D();
+ const auto ARGS = CVarList(r.szRule, 2, ' ');
if (ARGS[1] == "1")
RESERVEDOFFSET = (PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight) / 2.f;
@@ -994,7 +994,9 @@ void Events::listener_configureX11(void* owner, void* data) {
else
PWINDOW->setHidden(true);
- PWINDOW->m_vRealPosition.setValueAndWarp(Vector2D(E->x, E->y));
+ const auto LOGICALPOS = g_pXWaylandManager->xwaylandToWaylandCoords({E->x, E->y});
+
+ PWINDOW->m_vRealPosition.setValueAndWarp(LOGICALPOS);
PWINDOW->m_vRealSize.setValueAndWarp(Vector2D(E->width, E->height));
static auto* const PXWLFORCESCALEZERO = &g_pConfigManager->getConfigValuePtr("xwayland:force_zero_scaling")->intValue;