window/xwayland: minor property cleanup

fixes #6921
This commit is contained in:
Vaxry
2024-08-30 14:12:23 +02:00
parent 259dcd838e
commit 25e72949a1
9 changed files with 38 additions and 34 deletions

View File

@@ -59,7 +59,7 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) {
if (activate) {
pWindow->m_pXWaylandSurface->setMinimized(false);
if (pWindow->m_iX11Type != 2)
if (!pWindow->isX11OverrideRedirect())
pWindow->m_pXWaylandSurface->restackToTop();
}
@@ -80,7 +80,7 @@ void CHyprXWaylandManager::getGeometryForWindow(PHLWINDOW pWindow, CBox* pbox) {
if (pWindow->m_bIsX11) {
const auto SIZEHINTS = pWindow->m_pXWaylandSurface->sizeHints.get();
if (SIZEHINTS && pWindow->m_iX11Type != 2) {
if (SIZEHINTS && !pWindow->isX11OverrideRedirect()) {
// WM_SIZE_HINTS' x,y,w,h is deprecated it seems.
// Source: https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#wm_normal_hints_property
pbox->x = pWindow->m_pXWaylandSurface->geometry.x;
@@ -160,10 +160,8 @@ bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) {
return true;
}
if (pWindow->m_pXWaylandSurface->modal) {
pWindow->m_bIsModal = true;
if (pWindow->isModal())
return true;
}
if (pWindow->m_pXWaylandSurface->transient)
return true;
@@ -203,9 +201,8 @@ void CHyprXWaylandManager::checkBorders(PHLWINDOW pWindow) {
}
}
if (pWindow->m_iX11Type == 2) {
if (pWindow->isX11OverrideRedirect())
pWindow->m_bX11DoesntWantBorders = true;
}
}
void CHyprXWaylandManager::setWindowFullscreen(PHLWINDOW pWindow, bool fullscreen) {