summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-21 23:33:23 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-21 23:33:53 +0000
commit95047fb08327c5a9c38e5daa46cc3241a1b69cbe (patch)
tree3d9e0b9b0d4ffd750881a2323108d0a35b6a2cb1 /src/Window.cpp
parentf00b2fd50969e134f55a4a8de26bf7ffff4d41a1 (diff)
return full monitor box for fullscreen windows in idealBB
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 66035f42..e98193e1 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -59,6 +59,13 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() {
auto POS = m_vPosition;
auto SIZE = m_vSize;
+ if (m_bIsFullscreen) {
+ POS = PMONITOR->vecPosition;
+ SIZE = PMONITOR->vecSize;
+
+ return wlr_box{(int)POS.x, (int)POS.y, (int)SIZE.x, (int)SIZE.y};
+ }
+
if (DELTALESSTHAN(POS.y - PMONITOR->vecPosition.y, PMONITOR->vecReservedTopLeft.y, 1)) {
POS.y = PMONITOR->vecPosition.y;
SIZE.y += PMONITOR->vecReservedTopLeft.y;