summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-03 11:55:14 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-03 11:55:19 +0200
commit3c3f80c2fe093303b84cd52be22b523ea06a3c6e (patch)
tree4b871fd02fc5f96450696b88dab254e12e178fc3 /src
parenteee0cad4d0e58f145432bdcd6dde0b070cd73f14 (diff)
simplify code and update monitor on warp
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp4
-rw-r--r--src/managers/KeybindManager.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 8f59f8e1..8d24e8dd 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1692,6 +1692,10 @@ void CCompositor::warpCursorTo(const Vector2D& pos) {
return;
wlr_cursor_warp(m_sWLRCursor, m_sSeat.mouse->mouse, pos.x, pos.y);
+
+ const auto PMONITORNEW = getMonitorFromVector(pos);
+ if (PMONITORNEW != m_pLastMonitor)
+ m_pLastMonitor = PMONITORNEW;
}
SLayerSurface* CCompositor::getLayerSurfaceFromWlr(wlr_layer_surface_v1* pLS) {
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 0ce15781..9371d7fd 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1351,8 +1351,6 @@ void CKeybindManager::focusWindow(std::string regexp) {
Debug::log(LOG, "Focusing to window name: %s", PWINDOW->m_szTitle.c_str());
- changeworkspace("[internal]" + std::to_string(PWINDOW->m_iWorkspaceID));
-
g_pCompositor->focusWindow(PWINDOW);
const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f;