mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-29 10:53:49 -07:00
xwayland: various window handling fixes
I hate this fucking garbage
This commit is contained in:
@@ -1556,10 +1556,10 @@ void CWindow::onX11Configure(CBox box) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vPosition = m_vRealPosition->value();
|
m_vPosition = m_vRealPosition->goal();
|
||||||
m_vSize = m_vRealSize->value();
|
m_vSize = m_vRealSize->goal();
|
||||||
|
|
||||||
m_pXWaylandSurface->configure(box);
|
g_pXWaylandManager->setWindowSize(m_pSelf.lock(), box.size(), true);
|
||||||
|
|
||||||
m_vPendingReportedSize = box.size();
|
m_vPendingReportedSize = box.size();
|
||||||
m_vReportedSize = box.size();
|
m_vReportedSize = box.size();
|
||||||
@@ -1569,7 +1569,7 @@ void CWindow::onX11Configure(CBox box) {
|
|||||||
if (!m_pWorkspace || !m_pWorkspace->isVisible())
|
if (!m_pWorkspace || !m_pWorkspace->isVisible())
|
||||||
return; // further things are only for visible windows
|
return; // further things are only for visible windows
|
||||||
|
|
||||||
m_pWorkspace = g_pCompositor->getMonitorFromVector(m_vRealPosition->value() + m_vRealSize->value() / 2.f)->activeWorkspace;
|
m_pWorkspace = g_pCompositor->getMonitorFromVector(m_vRealPosition->goal() + m_vRealSize->goal() / 2.f)->activeWorkspace;
|
||||||
|
|
||||||
g_pCompositor->changeWindowZOrder(m_pSelf.lock(), true);
|
g_pCompositor->changeWindowZOrder(m_pSelf.lock(), true);
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ static void setVector2DAnimToMove(WP<CBaseAnimatedVariable> pav) {
|
|||||||
animvar->setConfig(g_pConfigManager->getAnimationPropertyConfig("windowsMove"));
|
animvar->setConfig(g_pConfigManager->getAnimationPropertyConfig("windowsMove"));
|
||||||
|
|
||||||
const auto PHLWINDOW = animvar->m_Context.pWindow.lock();
|
const auto PHLWINDOW = animvar->m_Context.pWindow.lock();
|
||||||
if (PHLWINDOW && !PHLWINDOW->m_vRealPosition->isBeingAnimated() && !PHLWINDOW->m_vRealSize->isBeingAnimated())
|
if (PHLWINDOW)
|
||||||
PHLWINDOW->m_bAnimatingIn = false;
|
PHLWINDOW->m_bAnimatingIn = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,6 +680,9 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||||||
|
|
||||||
if (PMONITOR && PWINDOW->isX11OverrideRedirect())
|
if (PMONITOR && PWINDOW->isX11OverrideRedirect())
|
||||||
PWINDOW->m_fX11SurfaceScaledBy = PMONITOR->scale;
|
PWINDOW->m_fX11SurfaceScaledBy = PMONITOR->scale;
|
||||||
|
|
||||||
|
if (!PWINDOW->isX11OverrideRedirect() && PWINDOW->m_bIsX11 && PWINDOW->m_bIsFloating)
|
||||||
|
g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize->goal(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapWindow(void* owner, void* data) {
|
void Events::listener_unmapWindow(void* owner, void* data) {
|
||||||
|
@@ -55,7 +55,7 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) {
|
|||||||
if (pWindow->m_bIsX11) {
|
if (pWindow->m_bIsX11) {
|
||||||
|
|
||||||
if (activate) {
|
if (activate) {
|
||||||
setWindowSize(pWindow, pWindow->m_vRealSize->goal()); // update xwayland output pos
|
setWindowSize(pWindow, pWindow->m_vRealSize->value(), true); // update xwayland output pos
|
||||||
pWindow->m_pXWaylandSurface->setMinimized(false);
|
pWindow->m_pXWaylandSurface->setMinimized(false);
|
||||||
|
|
||||||
if (!pWindow->isX11OverrideRedirect())
|
if (!pWindow->isX11OverrideRedirect())
|
||||||
@@ -162,7 +162,9 @@ bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) {
|
|||||||
if (a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"])
|
if (a == HYPRATOMS["_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"] || a == HYPRATOMS["_NET_WM_WINDOW_TYPE_MENU"])
|
||||||
pWindow->m_bX11ShouldntFocus = true;
|
pWindow->m_bX11ShouldntFocus = true;
|
||||||
|
|
||||||
pWindow->m_bNoInitialFocus = true;
|
if (a != HYPRATOMS["_NET_WM_WINDOW_TYPE_DIALOG"])
|
||||||
|
pWindow->m_bNoInitialFocus = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user