mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 03:45:58 +01:00
some fixes for xwayland windows and focus
This commit is contained in:
parent
d798376330
commit
86bb95c125
2 changed files with 4 additions and 5 deletions
|
@ -449,6 +449,7 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
||||||
|
|
||||||
if (g_pInputManager->dragButton == BTN_LEFT) {
|
if (g_pInputManager->dragButton == BTN_LEFT) {
|
||||||
DRAGGINGWINDOW->m_vRealPosition.setValueAndWarp(m_vBeginDragPositionXY + DELTA);
|
DRAGGINGWINDOW->m_vRealPosition.setValueAndWarp(m_vBeginDragPositionXY + DELTA);
|
||||||
|
g_pXWaylandManager->setWindowSize(DRAGGINGWINDOW, DRAGGINGWINDOW->m_vRealSize.goalv());
|
||||||
} else {
|
} else {
|
||||||
if (DRAGGINGWINDOW->m_bIsFloating) {
|
if (DRAGGINGWINDOW->m_bIsFloating) {
|
||||||
DRAGGINGWINDOW->m_vRealSize.setValueAndWarp(m_vBeginDragSizeXY + DELTA);
|
DRAGGINGWINDOW->m_vRealSize.setValueAndWarp(m_vBeginDragSizeXY + DELTA);
|
||||||
|
@ -601,8 +602,6 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow) {
|
||||||
// get back its' dimensions from position and size
|
// get back its' dimensions from position and size
|
||||||
pWindow->m_vRealPosition = pWindow->m_vPosition;
|
pWindow->m_vRealPosition = pWindow->m_vPosition;
|
||||||
pWindow->m_vRealSize = pWindow->m_vSize;
|
pWindow->m_vRealSize = pWindow->m_vSize;
|
||||||
|
|
||||||
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if it now got fullscreen, make it fullscreen
|
// if it now got fullscreen, make it fullscreen
|
||||||
|
@ -616,9 +615,9 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow) {
|
||||||
// apply new pos and size being monitors' box
|
// apply new pos and size being monitors' box
|
||||||
pWindow->m_vRealPosition = PMONITOR->vecPosition;
|
pWindow->m_vRealPosition = PMONITOR->vecPosition;
|
||||||
pWindow->m_vRealSize = PMONITOR->vecSize;
|
pWindow->m_vRealSize = PMONITOR->vecSize;
|
||||||
|
}
|
||||||
|
|
||||||
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv());
|
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv());
|
||||||
}
|
|
||||||
|
|
||||||
g_pCompositor->moveWindowToTop(pWindow);
|
g_pCompositor->moveWindowToTop(pWindow);
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
if (time)
|
if (time)
|
||||||
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
||||||
|
|
||||||
Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : Vector2D(g_pCompositor->m_sWLRCursor->x, g_pCompositor->m_sWLRCursor->y) - surfacePos;
|
Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : mouseCoords - surfacePos;
|
||||||
|
|
||||||
if (pFoundWindow) {
|
if (pFoundWindow) {
|
||||||
if (g_pConfigManager->getInt("input:follow_mouse") == 0 && !refocus) {
|
if (g_pConfigManager->getInt("input:follow_mouse") == 0 && !refocus) {
|
||||||
|
|
Loading…
Reference in a new issue