mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
renderer fixes
This commit is contained in:
@@ -412,6 +412,8 @@ void CHyprDwindleLayout::onBeginDragWindow() {
|
||||
m_vBeginDragPositionXY = DRAGGINGWINDOW->m_vRealPosition;
|
||||
m_vBeginDragSizeXY = DRAGGINGWINDOW->m_vRealSize;
|
||||
m_vLastDragXY = m_vBeginDragXY;
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onEndDragWindow() {
|
||||
@@ -422,6 +424,7 @@ void CHyprDwindleLayout::onEndDragWindow() {
|
||||
changeWindowFloatingMode(DRAGGINGWINDOW);
|
||||
}
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
||||
@@ -433,8 +436,14 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
||||
|
||||
const auto DELTA = Vector2D(mousePos.x - m_vBeginDragXY.x, mousePos.y - m_vBeginDragXY.y);
|
||||
const auto TICKDELTA = Vector2D(mousePos.x - m_vLastDragXY.x, mousePos.y - m_vLastDragXY.y);
|
||||
|
||||
if (abs(TICKDELTA.x) < 1.f && abs(TICKDELTA.y) < 1.f)
|
||||
return;
|
||||
|
||||
m_vLastDragXY = mousePos;
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
|
||||
if (g_pInputManager->dragButton == BTN_LEFT) {
|
||||
DRAGGINGWINDOW->m_vRealPosition = m_vBeginDragPositionXY + DELTA;
|
||||
DRAGGINGWINDOW->m_vEffectivePosition = DRAGGINGWINDOW->m_vRealPosition;
|
||||
@@ -515,6 +524,8 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
||||
DRAGGINGWINDOW->m_iMonitorID = PMONITOR->ID;
|
||||
DRAGGINGWINDOW->m_iWorkspaceID = PMONITOR->activeWorkspace;
|
||||
}
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) {
|
||||
|
Reference in New Issue
Block a user