From ebfbd4f7c302f80032476e65937575a2d6ff0882 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 14 Apr 2022 18:16:09 +0200 Subject: fix focus not applying sometimes to the active window --- src/Compositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 2f1746c9..45e2444b 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -366,7 +366,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { return; } - if (m_pLastWindow == pWindow) + if (m_pLastWindow == pWindow && m_sSeat.seat->keyboard_state.focused_surface == pSurface) return; if (windowValidMapped(m_pLastWindow) && m_pLastWindow->m_bIsX11) { -- cgit v1.2.3 From e4d05c90ce755a609cbec229a54d0069f21e7d53 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:30:18 +0200 Subject: fix pointer focus coords in focusWindow --- src/Compositor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 45e2444b..753e61c2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -380,8 +380,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { g_pXWaylandManager->activateWindow(pWindow, true); - // do pointer focus too - wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, 0, 0); + // do pointer focus too + const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition; + wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y); m_pLastWindow = pWindow; } -- cgit v1.2.3 From 05d7afe2ecd69169045248e04bf039bdae2508f6 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:48:12 +0200 Subject: support linux_dmabuf_v1 --- src/Compositor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 753e61c2..95e2ac48 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -54,6 +54,7 @@ CCompositor::CCompositor() { m_sWLRSubCompositor = wlr_subcompositor_create(m_sWLDisplay); m_sWLRDataDevMgr = wlr_data_device_manager_create(m_sWLDisplay); + m_sWLRDmabuf = wlr_linux_dmabuf_v1_create(m_sWLDisplay, m_sWLRRenderer); wlr_export_dmabuf_manager_v1_create(m_sWLDisplay); wlr_screencopy_manager_v1_create(m_sWLDisplay); wlr_data_control_manager_v1_create(m_sWLDisplay); -- cgit v1.2.3