mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 00:05:59 +01:00
parent
259dcd838e
commit
25e72949a1
9 changed files with 38 additions and 34 deletions
|
@ -791,7 +791,7 @@ PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t proper
|
||||||
if (properties & ALLOW_FLOATING) {
|
if (properties & ALLOW_FLOATING) {
|
||||||
for (auto const& w : m_vWindows | std::views::reverse) {
|
for (auto const& w : m_vWindows | std::views::reverse) {
|
||||||
const auto BB = w->getWindowBoxUnified(properties);
|
const auto BB = w->getWindowBoxUnified(properties);
|
||||||
CBox box = BB.copy().expand(w->m_iX11Type != 2 ? BORDER_GRAB_AREA : 0);
|
CBox box = BB.copy().expand(!w->isX11OverrideRedirect() ? BORDER_GRAB_AREA : 0);
|
||||||
if (w->m_bIsFloating && w->m_bIsMapped && !w->isHidden() && !w->m_bX11ShouldntFocus && w->m_bPinned && !w->m_sWindowData.noFocus.valueOrDefault() &&
|
if (w->m_bIsFloating && w->m_bIsMapped && !w->isHidden() && !w->m_bX11ShouldntFocus && w->m_bPinned && !w->m_sWindowData.noFocus.valueOrDefault() &&
|
||||||
w != pIgnoreWindow) {
|
w != pIgnoreWindow) {
|
||||||
if (box.containsPoint(g_pPointerManager->position()))
|
if (box.containsPoint(g_pPointerManager->position()))
|
||||||
|
@ -821,16 +821,16 @@ PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t proper
|
||||||
BB.x + BB.width <= PWINDOWMONITOR->vecPosition.x + PWINDOWMONITOR->vecSize.x && BB.y + BB.height <= PWINDOWMONITOR->vecPosition.y + PWINDOWMONITOR->vecSize.y)
|
BB.x + BB.width <= PWINDOWMONITOR->vecPosition.x + PWINDOWMONITOR->vecSize.x && BB.y + BB.height <= PWINDOWMONITOR->vecPosition.y + PWINDOWMONITOR->vecSize.y)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CBox box = BB.copy().expand(w->m_iX11Type != 2 ? BORDER_GRAB_AREA : 0);
|
CBox box = BB.copy().expand(!w->isX11OverrideRedirect() ? BORDER_GRAB_AREA : 0);
|
||||||
if (w->m_bIsFloating && w->m_bIsMapped && isWorkspaceVisible(w->m_pWorkspace) && !w->isHidden() && !w->m_bPinned && !w->m_sWindowData.noFocus.valueOrDefault() &&
|
if (w->m_bIsFloating && w->m_bIsMapped && isWorkspaceVisible(w->m_pWorkspace) && !w->isHidden() && !w->m_bPinned && !w->m_sWindowData.noFocus.valueOrDefault() &&
|
||||||
w != pIgnoreWindow && (!aboveFullscreen || w->m_bCreatedOverFullscreen)) {
|
w != pIgnoreWindow && (!aboveFullscreen || w->m_bCreatedOverFullscreen)) {
|
||||||
// OR windows should add focus to parent
|
// OR windows should add focus to parent
|
||||||
if (w->m_bX11ShouldntFocus && w->m_iX11Type != 2)
|
if (w->m_bX11ShouldntFocus && !w->isX11OverrideRedirect())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (box.containsPoint(g_pPointerManager->position())) {
|
if (box.containsPoint(g_pPointerManager->position())) {
|
||||||
|
|
||||||
if (w->m_bIsX11 && w->m_iX11Type == 2 && !w->m_pXWaylandSurface->wantsFocus()) {
|
if (w->m_bIsX11 && w->isX11OverrideRedirect() && !w->m_pXWaylandSurface->wantsFocus()) {
|
||||||
// Override Redirect
|
// Override Redirect
|
||||||
return g_pCompositor->m_pLastWindow.lock(); // we kinda trick everything here.
|
return g_pCompositor->m_pLastWindow.lock(); // we kinda trick everything here.
|
||||||
// TODO: this is wrong, we should focus the parent, but idk how to get it considering it's nullptr in most cases.
|
// TODO: this is wrong, we should focus the parent, but idk how to get it considering it's nullptr in most cases.
|
||||||
|
@ -997,7 +997,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWindow && pWindow->m_bIsX11 && pWindow->m_iX11Type == 2 && !pWindow->m_pXWaylandSurface->wantsFocus())
|
if (pWindow && pWindow->m_bIsX11 && pWindow->isX11OverrideRedirect() && !pWindow->m_pXWaylandSurface->wantsFocus())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->bringWindowToTop(pWindow);
|
g_pLayoutManager->getCurrentLayout()->bringWindowToTop(pWindow);
|
||||||
|
@ -1071,7 +1071,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface
|
||||||
|
|
||||||
updateWindowAnimatedDecorationValues(PLASTWINDOW);
|
updateWindowAnimatedDecorationValues(PLASTWINDOW);
|
||||||
|
|
||||||
if (!pWindow->m_bIsX11 || pWindow->m_iX11Type == 1)
|
if (!pWindow->m_bIsX11 || !pWindow->isX11OverrideRedirect())
|
||||||
g_pXWaylandManager->activateWindow(PLASTWINDOW, false);
|
g_pXWaylandManager->activateWindow(PLASTWINDOW, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1928,7 +1928,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// shadow
|
// shadow
|
||||||
if (pWindow->m_iX11Type != 2 && !pWindow->m_bX11DoesntWantBorders) {
|
if (!pWindow->isX11OverrideRedirect() && !pWindow->m_bX11DoesntWantBorders) {
|
||||||
if (pWindow == m_pLastWindow) {
|
if (pWindow == m_pLastWindow) {
|
||||||
pWindow->m_cRealShadowColor = CColor(*PSHADOWCOL);
|
pWindow->m_cRealShadowColor = CColor(*PSHADOWCOL);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -21,7 +21,6 @@ PHLWINDOW CWindow::create(SP<CXWaylandSurface> surface) {
|
||||||
|
|
||||||
pWindow->m_pSelf = pWindow;
|
pWindow->m_pSelf = pWindow;
|
||||||
pWindow->m_bIsX11 = true;
|
pWindow->m_bIsX11 = true;
|
||||||
pWindow->m_iX11Type = surface->overrideRedirect ? 2 : 1;
|
|
||||||
|
|
||||||
pWindow->m_vRealPosition.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), pWindow, AVARDAMAGE_ENTIRE);
|
pWindow->m_vRealPosition.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), pWindow, AVARDAMAGE_ENTIRE);
|
||||||
pWindow->m_vRealSize.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), pWindow, AVARDAMAGE_ENTIRE);
|
pWindow->m_vRealSize.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), pWindow, AVARDAMAGE_ENTIRE);
|
||||||
|
@ -1571,3 +1570,11 @@ void CWindow::unsetWindowData(eOverridePriority priority) {
|
||||||
element.second(m_pSelf.lock())->unset(priority);
|
element.second(m_pSelf.lock())->unset(priority);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CWindow::isX11OverrideRedirect() {
|
||||||
|
return m_pXWaylandSurface && m_pXWaylandSurface->overrideRedirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWindow::isModal() {
|
||||||
|
return (m_pXWaylandSurface && m_pXWaylandSurface->modal);
|
||||||
|
}
|
||||||
|
|
|
@ -288,8 +288,6 @@ class CWindow {
|
||||||
// XWayland stuff
|
// XWayland stuff
|
||||||
bool m_bIsX11 = false;
|
bool m_bIsX11 = false;
|
||||||
PHLWINDOWREF m_pX11Parent;
|
PHLWINDOWREF m_pX11Parent;
|
||||||
uint64_t m_iX11Type = 0;
|
|
||||||
bool m_bIsModal = false;
|
|
||||||
bool m_bX11DoesntWantBorders = false;
|
bool m_bX11DoesntWantBorders = false;
|
||||||
bool m_bX11ShouldntFocus = false;
|
bool m_bX11ShouldntFocus = false;
|
||||||
float m_fX11SurfaceScaledBy = 1.f;
|
float m_fX11SurfaceScaledBy = 1.f;
|
||||||
|
@ -468,6 +466,8 @@ class CWindow {
|
||||||
void warpCursor();
|
void warpCursor();
|
||||||
PHLWINDOW getSwallower();
|
PHLWINDOW getSwallower();
|
||||||
void unsetWindowData(eOverridePriority priority);
|
void unsetWindowData(eOverridePriority priority);
|
||||||
|
bool isX11OverrideRedirect();
|
||||||
|
bool isModal();
|
||||||
|
|
||||||
// listeners
|
// listeners
|
||||||
void onAck(uint32_t serial);
|
void onAck(uint32_t serial);
|
||||||
|
|
|
@ -120,7 +120,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
PWINDOW->m_bRequestsFloat = true;
|
PWINDOW->m_bRequestsFloat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PWINDOW->m_bX11ShouldntFocus = PWINDOW->m_bX11ShouldntFocus || (PWINDOW->m_bIsX11 && PWINDOW->m_iX11Type == 2 && !PWINDOW->m_pXWaylandSurface->wantsFocus());
|
PWINDOW->m_bX11ShouldntFocus = PWINDOW->m_bX11ShouldntFocus || (PWINDOW->m_bIsX11 && PWINDOW->isX11OverrideRedirect() && !PWINDOW->m_pXWaylandSurface->wantsFocus());
|
||||||
|
|
||||||
if (PWORKSPACE->m_bDefaultFloating)
|
if (PWORKSPACE->m_bDefaultFloating)
|
||||||
PWINDOW->m_bIsFloating = true;
|
PWINDOW->m_bIsFloating = true;
|
||||||
|
@ -477,7 +477,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PWINDOW->m_sWindowData.noFocus.valueOrDefault() && !PWINDOW->m_bNoInitialFocus &&
|
if (!PWINDOW->m_sWindowData.noFocus.valueOrDefault() && !PWINDOW->m_bNoInitialFocus &&
|
||||||
(PWINDOW->m_iX11Type != 2 || (PWINDOW->m_bIsX11 && PWINDOW->m_pXWaylandSurface->wantsFocus())) && !workspaceSilent && (!PFORCEFOCUS || PFORCEFOCUS == PWINDOW) &&
|
(!PWINDOW->isX11OverrideRedirect() || (PWINDOW->m_bIsX11 && PWINDOW->m_pXWaylandSurface->wantsFocus())) && !workspaceSilent && (!PFORCEFOCUS || PFORCEFOCUS == PWINDOW) &&
|
||||||
!g_pInputManager->isConstrained()) {
|
!g_pInputManager->isConstrained()) {
|
||||||
g_pCompositor->focusWindow(PWINDOW);
|
g_pCompositor->focusWindow(PWINDOW);
|
||||||
PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA);
|
PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA);
|
||||||
|
@ -577,7 +577,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
|
|
||||||
g_pCompositor->updateWorkspaceWindows(PWINDOW->workspaceID());
|
g_pCompositor->updateWorkspaceWindows(PWINDOW->workspaceID());
|
||||||
|
|
||||||
if (PMONITOR && PWINDOW->m_iX11Type == 2)
|
if (PMONITOR && PWINDOW->isX11OverrideRedirect())
|
||||||
PWINDOW->m_fX11SurfaceScaledBy = PMONITOR->scale;
|
PWINDOW->m_fX11SurfaceScaledBy = PMONITOR->scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -816,7 +816,7 @@ void Events::listener_activateX11(void* owner, void* data) {
|
||||||
|
|
||||||
Debug::log(LOG, "X11 Activate request for window {}", PWINDOW);
|
Debug::log(LOG, "X11 Activate request for window {}", PWINDOW);
|
||||||
|
|
||||||
if (PWINDOW->m_iX11Type == 2) {
|
if (PWINDOW->isX11OverrideRedirect()) {
|
||||||
|
|
||||||
Debug::log(LOG, "Unmanaged X11 {} requests activate", PWINDOW);
|
Debug::log(LOG, "Unmanaged X11 {} requests activate", PWINDOW);
|
||||||
|
|
||||||
|
|
|
@ -721,7 +721,7 @@ void CMonitor::setSpecialWorkspace(const PHLWORKSPACE& pWorkspace) {
|
||||||
w->setAnimationsToMove();
|
w->setAnimationsToMove();
|
||||||
|
|
||||||
const auto MIDDLE = w->middle();
|
const auto MIDDLE = w->middle();
|
||||||
if (w->m_bIsFloating && !VECINRECT(MIDDLE, vecPosition.x, vecPosition.y, vecPosition.x + vecSize.x, vecPosition.y + vecSize.y) && w->m_iX11Type != 2) {
|
if (w->m_bIsFloating && !VECINRECT(MIDDLE, vecPosition.x, vecPosition.y, vecPosition.x + vecSize.x, vecPosition.y + vecSize.y) && !w->isX11OverrideRedirect()) {
|
||||||
// if it's floating and the middle isnt on the current mon, move it to the center
|
// if it's floating and the middle isnt on the current mon, move it to the center
|
||||||
const auto PMONFROMMIDDLE = g_pCompositor->getMonitorFromVector(MIDDLE);
|
const auto PMONFROMMIDDLE = g_pCompositor->getMonitorFromVector(MIDDLE);
|
||||||
Vector2D pos = w->m_vRealPosition.goal();
|
Vector2D pos = w->m_vRealPosition.goal();
|
||||||
|
|
|
@ -104,7 +104,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
||||||
pWindow->m_vRealSize = PWINDOWSURFACE->current.size;
|
pWindow->m_vRealSize = PWINDOWSURFACE->current.size;
|
||||||
|
|
||||||
if ((desiredGeometry.width <= 1 || desiredGeometry.height <= 1) && pWindow->m_bIsX11 &&
|
if ((desiredGeometry.width <= 1 || desiredGeometry.height <= 1) && pWindow->m_bIsX11 &&
|
||||||
pWindow->m_iX11Type == 2) { // XDG windows should be fine. TODO: check for weird atoms?
|
pWindow->isX11OverrideRedirect()) { // XDG windows should be fine. TODO: check for weird atoms?
|
||||||
pWindow->setHidden(true);
|
pWindow->setHidden(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
||||||
if (pWindow->m_vRealSize.goal().x <= 5 || pWindow->m_vRealSize.goal().y <= 5)
|
if (pWindow->m_vRealSize.goal().x <= 5 || pWindow->m_vRealSize.goal().y <= 5)
|
||||||
pWindow->m_vRealSize = PMONITOR->vecSize / 2.f;
|
pWindow->m_vRealSize = PMONITOR->vecSize / 2.f;
|
||||||
|
|
||||||
if (pWindow->m_bIsX11 && pWindow->m_iX11Type == 2) {
|
if (pWindow->m_bIsX11 && pWindow->isX11OverrideRedirect()) {
|
||||||
|
|
||||||
if (pWindow->m_pXWaylandSurface->geometry.x != 0 && pWindow->m_pXWaylandSurface->geometry.y != 0)
|
if (pWindow->m_pXWaylandSurface->geometry.x != 0 && pWindow->m_pXWaylandSurface->geometry.y != 0)
|
||||||
pWindow->m_vRealPosition = g_pXWaylandManager->xwaylandToWaylandCoords(pWindow->m_pXWaylandSurface->geometry.pos());
|
pWindow->m_vRealPosition = g_pXWaylandManager->xwaylandToWaylandCoords(pWindow->m_pXWaylandSurface->geometry.pos());
|
||||||
|
@ -163,12 +163,12 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
|
||||||
if (*PXWLFORCESCALEZERO && pWindow->m_bIsX11)
|
if (*PXWLFORCESCALEZERO && pWindow->m_bIsX11)
|
||||||
pWindow->m_vRealSize = pWindow->m_vRealSize.goal() / PMONITOR->scale;
|
pWindow->m_vRealSize = pWindow->m_vRealSize.goal() / PMONITOR->scale;
|
||||||
|
|
||||||
if (pWindow->m_bX11DoesntWantBorders || (pWindow->m_bIsX11 && pWindow->m_iX11Type == 2)) {
|
if (pWindow->m_bX11DoesntWantBorders || (pWindow->m_bIsX11 && pWindow->isX11OverrideRedirect())) {
|
||||||
pWindow->m_vRealPosition.warp();
|
pWindow->m_vRealPosition.warp();
|
||||||
pWindow->m_vRealSize.warp();
|
pWindow->m_vRealSize.warp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWindow->m_iX11Type != 2) {
|
if (!pWindow->isX11OverrideRedirect()) {
|
||||||
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goal());
|
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goal());
|
||||||
|
|
||||||
g_pCompositor->changeWindowZOrder(pWindow, true);
|
g_pCompositor->changeWindowZOrder(pWindow, true);
|
||||||
|
@ -592,7 +592,7 @@ PHLWINDOW IHyprLayout::getNextWindowCandidate(PHLWINDOW pWindow) {
|
||||||
|
|
||||||
// find whether there is a floating window below this one
|
// find whether there is a floating window below this one
|
||||||
for (auto const& w : g_pCompositor->m_vWindows) {
|
for (auto const& w : g_pCompositor->m_vWindows) {
|
||||||
if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && w->m_iX11Type != 2 && w->m_pWorkspace == pWindow->m_pWorkspace && !w->m_bX11ShouldntFocus &&
|
if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && !w->isX11OverrideRedirect() && w->m_pWorkspace == pWindow->m_pWorkspace && !w->m_bX11ShouldntFocus &&
|
||||||
!w->m_sWindowData.noFocus.valueOrDefault() && w != pWindow) {
|
!w->m_sWindowData.noFocus.valueOrDefault() && w != pWindow) {
|
||||||
if (VECINRECT((pWindow->m_vSize / 2.f + pWindow->m_vPosition), w->m_vPosition.x, w->m_vPosition.y, w->m_vPosition.x + w->m_vSize.x,
|
if (VECINRECT((pWindow->m_vSize / 2.f + pWindow->m_vPosition), w->m_vPosition.x, w->m_vPosition.y, w->m_vPosition.x + w->m_vSize.x,
|
||||||
w->m_vPosition.y + w->m_vSize.y)) {
|
w->m_vPosition.y + w->m_vSize.y)) {
|
||||||
|
@ -612,7 +612,7 @@ PHLWINDOW IHyprLayout::getNextWindowCandidate(PHLWINDOW pWindow) {
|
||||||
|
|
||||||
// if not, floating window
|
// if not, floating window
|
||||||
for (auto const& w : g_pCompositor->m_vWindows) {
|
for (auto const& w : g_pCompositor->m_vWindows) {
|
||||||
if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && w->m_iX11Type != 2 && w->m_pWorkspace == pWindow->m_pWorkspace && !w->m_bX11ShouldntFocus &&
|
if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && !w->isX11OverrideRedirect() && w->m_pWorkspace == pWindow->m_pWorkspace && !w->m_bX11ShouldntFocus &&
|
||||||
!w->m_sWindowData.noFocus.valueOrDefault() && w != pWindow)
|
!w->m_sWindowData.noFocus.valueOrDefault() && w != pWindow)
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,7 @@ PHLWINDOW IHyprLayout::getNextWindowCandidate(PHLWINDOW pWindow) {
|
||||||
pWindowCandidate = g_pCompositor->getFirstWindowOnWorkspace(pWindow->workspaceID());
|
pWindowCandidate = g_pCompositor->getFirstWindowOnWorkspace(pWindow->workspaceID());
|
||||||
|
|
||||||
if (!pWindowCandidate || pWindow == pWindowCandidate || !pWindowCandidate->m_bIsMapped || pWindowCandidate->isHidden() || pWindowCandidate->m_bX11ShouldntFocus ||
|
if (!pWindowCandidate || pWindow == pWindowCandidate || !pWindowCandidate->m_bIsMapped || pWindowCandidate->isHidden() || pWindowCandidate->m_bX11ShouldntFocus ||
|
||||||
pWindowCandidate->m_iX11Type == 2 || pWindowCandidate->m_iMonitorID != g_pCompositor->m_pLastMonitor->ID)
|
pWindowCandidate->isX11OverrideRedirect() || pWindowCandidate->m_iMonitorID != g_pCompositor->m_pLastMonitor->ID)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return pWindowCandidate;
|
return pWindowCandidate;
|
||||||
|
|
|
@ -194,7 +194,7 @@ void CAnimationManager::tick() {
|
||||||
default: UNREACHABLE();
|
default: UNREACHABLE();
|
||||||
}
|
}
|
||||||
// set size and pos if valid, but only if damage policy entire (dont if border for example)
|
// set size and pos if valid, but only if damage policy entire (dont if border for example)
|
||||||
if (validMapped(PWINDOW) && av->m_eDamagePolicy == AVARDAMAGE_ENTIRE && PWINDOW->m_iX11Type != 2)
|
if (validMapped(PWINDOW) && av->m_eDamagePolicy == AVARDAMAGE_ENTIRE && !PWINDOW->isX11OverrideRedirect())
|
||||||
g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.goal());
|
g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.goal());
|
||||||
|
|
||||||
// check if we did not finish animating. If so, trigger onAnimationEnd.
|
// check if we did not finish animating. If so, trigger onAnimationEnd.
|
||||||
|
|
|
@ -59,7 +59,7 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) {
|
||||||
|
|
||||||
if (activate) {
|
if (activate) {
|
||||||
pWindow->m_pXWaylandSurface->setMinimized(false);
|
pWindow->m_pXWaylandSurface->setMinimized(false);
|
||||||
if (pWindow->m_iX11Type != 2)
|
if (!pWindow->isX11OverrideRedirect())
|
||||||
pWindow->m_pXWaylandSurface->restackToTop();
|
pWindow->m_pXWaylandSurface->restackToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void CHyprXWaylandManager::getGeometryForWindow(PHLWINDOW pWindow, CBox* pbox) {
|
||||||
if (pWindow->m_bIsX11) {
|
if (pWindow->m_bIsX11) {
|
||||||
const auto SIZEHINTS = pWindow->m_pXWaylandSurface->sizeHints.get();
|
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.
|
// 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
|
// 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;
|
pbox->x = pWindow->m_pXWaylandSurface->geometry.x;
|
||||||
|
@ -160,10 +160,8 @@ bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWindow->m_pXWaylandSurface->modal) {
|
if (pWindow->isModal())
|
||||||
pWindow->m_bIsModal = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (pWindow->m_pXWaylandSurface->transient)
|
if (pWindow->m_pXWaylandSurface->transient)
|
||||||
return true;
|
return true;
|
||||||
|
@ -203,10 +201,9 @@ void CHyprXWaylandManager::checkBorders(PHLWINDOW pWindow) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pWindow->m_iX11Type == 2) {
|
if (pWindow->isX11OverrideRedirect())
|
||||||
pWindow->m_bX11DoesntWantBorders = true;
|
pWindow->m_bX11DoesntWantBorders = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void CHyprXWaylandManager::setWindowFullscreen(PHLWINDOW pWindow, bool fullscreen) {
|
void CHyprXWaylandManager::setWindowFullscreen(PHLWINDOW pWindow, bool fullscreen) {
|
||||||
if (pWindow->m_bIsX11)
|
if (pWindow->m_bIsX11)
|
||||||
|
|
|
@ -675,7 +675,7 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
|
||||||
|
|
||||||
// clicking on border triggers resize
|
// clicking on border triggers resize
|
||||||
// TODO detect click on LS properly
|
// TODO detect click on LS properly
|
||||||
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e.state == WL_POINTER_BUTTON_STATE_PRESSED && (!w || w->m_iX11Type != 2)) {
|
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e.state == WL_POINTER_BUTTON_STATE_PRESSED && (!w || !w->isX11OverrideRedirect())) {
|
||||||
if (w && !w->isFullscreen()) {
|
if (w && !w->isFullscreen()) {
|
||||||
const CBox real = {w->m_vRealPosition.value().x, w->m_vRealPosition.value().y, w->m_vRealSize.value().x, w->m_vRealSize.value().y};
|
const CBox real = {w->m_vRealPosition.value().x, w->m_vRealPosition.value().y, w->m_vRealSize.value().x, w->m_vRealSize.value().y};
|
||||||
const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA};
|
const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA};
|
||||||
|
@ -1688,7 +1688,7 @@ void CInputManager::setCursorIconOnBorder(PHLWINDOW w) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore X11 OR windows, they shouldn't be touched
|
// ignore X11 OR windows, they shouldn't be touched
|
||||||
if (w->m_bIsX11 && w->m_iX11Type == 2)
|
if (w->m_bIsX11 && w->isX11OverrideRedirect())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
static auto PEXTENDBORDERGRAB = CConfigValue<Hyprlang::INT>("general:extend_border_grab_area");
|
static auto PEXTENDBORDERGRAB = CConfigValue<Hyprlang::INT>("general:extend_border_grab_area");
|
||||||
|
|
Loading…
Reference in a new issue