File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,11 @@ void LayerShellEmulation::onExclusionZoneChanged()
172172 } else if ((anchors == DLayerShellWindow::AnchorRight) || (anchors ^ DLayerShellWindow::AnchorRight) == (DLayerShellWindow::AnchorTop | DLayerShellWindow::AnchorBottom)) {
173173 int boundary = 0 ;
174174 for (auto screen : qApp->screens ()) {
175- if (boundary < screen->geometry ().right ())
176- boundary = screen->geometry ().right ();
175+ int right = screen->geometry ().x ()/scaleFactor + screen->geometry ().width ();
176+ if (boundary < right)
177+ boundary = right;
177178 }
178- strut_partial.right = boundary - rect.right () + ( m_dlayerShellWindow->exclusionZone ()) * scaleFactor;
179+ strut_partial.right = ( boundary - rect.right () + m_dlayerShellWindow->exclusionZone ()) * scaleFactor;
179180 strut_partial.right_start_y = rect.y ();
180181 strut_partial.right_end_y = rect.y () + m_window->height ();
181182 } else if ((anchors == DLayerShellWindow::AnchorTop) || (anchors ^ DLayerShellWindow::AnchorTop) == (DLayerShellWindow::AnchorLeft | DLayerShellWindow::AnchorRight)) {
@@ -188,10 +189,11 @@ void LayerShellEmulation::onExclusionZoneChanged()
188189 // but there is no issue.
189190 int boundary = 0 ;
190191 for (auto screen : qApp->screens ()) {
191- if (boundary < screen->geometry ().bottom ())
192- boundary = screen->geometry ().bottom ();
192+ int botton = screen->geometry ().y ()/scaleFactor + screen->geometry ().height ();
193+ if (boundary < botton)
194+ boundary = botton;
193195 }
194- strut_partial.bottom = boundary - rect.bottom () + ( m_dlayerShellWindow->exclusionZone ()) * scaleFactor;
196+ strut_partial.bottom = ( boundary - rect.bottom () + m_dlayerShellWindow->exclusionZone ()) * scaleFactor;
195197 strut_partial.bottom_start_x = rect.x ();
196198 strut_partial.bottom_end_x = rect.x () + m_window->width ();
197199 }
You can’t perform that action at this time.
0 commit comments