summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 8f256630..2e5b15a4 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -43,8 +43,8 @@ void IHyprLayout::onWindowRemoved(CWindow* pWindow) {
pWindow->m_sGroupData.pNextWindow = nullptr;
if (pWindow->m_sGroupData.head) {
- pWindow->m_sGroupData.head = false;
- curr->m_sGroupData.head = true;
+ pWindow->m_sGroupData.head = false;
+ curr->m_sGroupData.head = true;
curr->m_sGroupData.locked = pWindow->m_sGroupData.locked;
pWindow->m_sGroupData.locked = false;
}
@@ -75,7 +75,9 @@ void IHyprLayout::onWindowRemovedFloating(CWindow* pWindow) {
void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) {
wlr_box desiredGeometry = {0};
g_pXWaylandManager->getGeometryForWindow(pWindow, &desiredGeometry);
- const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
+ const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
+
+ static auto* const PXWLFORCESCALEZERO = &g_pConfigManager->getConfigValuePtr("xwayland:force_zero_scaling")->intValue;
if (!PMONITOR) {
Debug::log(ERR, "Window %lx (%s) has an invalid monitor in onWindowCreatedFloating!!!", pWindow, pWindow->m_szTitle.c_str());
@@ -151,6 +153,11 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) {
}
}
+ if (*PXWLFORCESCALEZERO && pWindow->m_bIsX11) {
+ pWindow->m_vRealSize = pWindow->m_vRealSize.goalv() / PMONITOR->scale;
+ pWindow->m_vRealPosition = pWindow->m_vRealPosition.goalv() / PMONITOR->scale;
+ }
+
if (pWindow->m_bX11DoesntWantBorders || (pWindow->m_bIsX11 && pWindow->m_uSurface.xwayland->override_redirect)) {
pWindow->m_vRealPosition.setValue(pWindow->m_vRealPosition.goalv());
pWindow->m_vRealSize.setValue(pWindow->m_vRealSize.goalv());