summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-05 18:29:58 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-05 18:29:58 +0200
commitddcd4fb767afe8490a239ab019012a78d368eb5e (patch)
tree6739da91be9e642d269c9c9e2775413315696e7e /src/managers
parentdcb6fc269a1360f6d46836d34db4964779ce5879 (diff)
Mostly fixes #5
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/InputManager.cpp6
-rw-r--r--src/managers/XWaylandManager.cpp10
2 files changed, 10 insertions, 6 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index 32f4aca6..56efd695 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -101,14 +101,14 @@ void CInputManager::mouseMoveUnified(uint32_t time) {
Vector2D surfaceLocal = surfacePos == Vector2D(-1337, -1337) ? surfaceCoords : Vector2D(g_pCompositor->m_sWLRCursor->x, g_pCompositor->m_sWLRCursor->y) - surfacePos;
- wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
- wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y);
-
if (pFoundWindow)
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
else
g_pCompositor->focusSurface(foundSurface);
+ wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
+ wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y);
+
g_pLayoutManager->getCurrentLayout()->onMouseMove(getMouseCoordsInternal());
}
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp
index 0e419c0f..09ac6a72 100644
--- a/src/managers/XWaylandManager.cpp
+++ b/src/managers/XWaylandManager.cpp
@@ -32,17 +32,21 @@ wlr_surface* CHyprXWaylandManager::getWindowSurface(CWindow* pWindow) {
void CHyprXWaylandManager::activateSurface(wlr_surface* pSurface, bool activate) {
if (wlr_surface_is_xdg_surface(pSurface))
wlr_xdg_toplevel_set_activated(wlr_xdg_surface_from_wlr_surface(pSurface)->toplevel, activate);
-
- else if (wlr_surface_is_xwayland_surface(pSurface))
+ else if (wlr_surface_is_xwayland_surface(pSurface)) {
wlr_xwayland_surface_activate(wlr_xwayland_surface_from_wlr_surface(pSurface), activate);
+ wlr_xwayland_surface_restack(wlr_xwayland_surface_from_wlr_surface(pSurface), NULL, XCB_STACK_MODE_ABOVE);
+ }
+
}
void CHyprXWaylandManager::activateWindow(CWindow* pWindow, bool activate) {
if (pWindow == g_pCompositor->m_pLastWindow)
return;
- if (pWindow->m_bIsX11)
+ if (pWindow->m_bIsX11) {
wlr_xwayland_surface_activate(pWindow->m_uSurface.xwayland, activate);
+ wlr_xwayland_surface_restack(pWindow->m_uSurface.xwayland, NULL, XCB_STACK_MODE_ABOVE);
+ }
else
wlr_xdg_toplevel_set_activated(pWindow->m_uSurface.xdg->toplevel, activate);