mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:45:58 +01:00
layout: don't reset to floating size on drag tiled
This commit is contained in:
parent
5484411232
commit
1e3571eb5b
2 changed files with 5 additions and 0 deletions
|
@ -189,8 +189,11 @@ void IHyprLayout::onBeginDragWindow() {
|
|||
|
||||
DRAGGINGWINDOW->m_bDraggingTiled = false;
|
||||
|
||||
m_vDraggingWindowOriginalFloatSize = DRAGGINGWINDOW->m_vLastFloatingSize;
|
||||
|
||||
if (!DRAGGINGWINDOW->m_bIsFloating) {
|
||||
if (g_pInputManager->dragMode == MBIND_MOVE) {
|
||||
DRAGGINGWINDOW->m_vLastFloatingSize = (DRAGGINGWINDOW->m_vRealSize.goalv() * 0.8489).clamp(Vector2D{5, 5}, Vector2D{}).floor();
|
||||
changeWindowFloatingMode(DRAGGINGWINDOW);
|
||||
DRAGGINGWINDOW->m_bIsFloating = true;
|
||||
DRAGGINGWINDOW->m_bDraggingTiled = true;
|
||||
|
@ -250,6 +253,7 @@ void IHyprLayout::onEndDragWindow() {
|
|||
DRAGGINGWINDOW->m_bIsFloating = false;
|
||||
g_pInputManager->refocus();
|
||||
changeWindowFloatingMode(DRAGGINGWINDOW);
|
||||
DRAGGINGWINDOW->m_vLastFloatingSize = m_vDraggingWindowOriginalFloatSize;
|
||||
}
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
|
|
|
@ -153,6 +153,7 @@ interface IHyprLayout {
|
|||
Vector2D m_vLastDragXY;
|
||||
Vector2D m_vBeginDragPositionXY;
|
||||
Vector2D m_vBeginDragSizeXY;
|
||||
Vector2D m_vDraggingWindowOriginalFloatSize;
|
||||
eRectCorner m_eGrabbedCorner = CORNER_TOPLEFT;
|
||||
|
||||
CWindow* m_pLastTiledWindow = nullptr;
|
||||
|
|
Loading…
Reference in a new issue