From aaf35b9f1f0ce49080f2a0b1e7943336b1ba6057 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 4 May 2024 19:14:35 -0700 Subject: protocols: add hyprland_focus_grab_v1 implementation (#5850) * protocols: add hyprland_focus_grab_v1 implementation * protocols/focus_grab: fix keyboard focus staying on unlisted windows When creating a focus grab with layershell surfaces, the last active toplevel kept keyboard focus. * protocols/focus_grab: fix formatting * protocols/focus_grab: try to pick surface for keyboard focus * focus_grab: update keyboard focus to match spec * Revert "protocols/focus_grab: try to pick surface for keyboard focus" This reverts commit 090358d0d19cc65208641eaefa0a905e99145730. * protocols/focus_grab: fix issues and match new spec * kde-server-decoration: move to new impl * protocols/focus_grab: review fixup * Update hyprland-protocols --------- Co-authored-by: Vaxry --- src/managers/ProtocolManager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/managers/ProtocolManager.cpp') diff --git a/src/managers/ProtocolManager.cpp b/src/managers/ProtocolManager.cpp index 47372d01..ee27d35d 100644 --- a/src/managers/ProtocolManager.cpp +++ b/src/managers/ProtocolManager.cpp @@ -24,6 +24,7 @@ #include "../protocols/VirtualPointer.hpp" #include "../protocols/OutputManagement.hpp" #include "../protocols/ServerDecorationKDE.hpp" +#include "../protocols/FocusGrab.hpp" CProtocolManager::CProtocolManager() { @@ -51,6 +52,7 @@ CProtocolManager::CProtocolManager() { PROTO::virtualPointer = std::make_unique(&zwlr_virtual_pointer_manager_v1_interface, 2, "VirtualPointer"); PROTO::outputManagement = std::make_unique(&zwlr_output_manager_v1_interface, 4, "OutputManagement"); PROTO::serverDecorationKDE = std::make_unique(&org_kde_kwin_server_decoration_manager_interface, 1, "ServerDecorationKDE"); + PROTO::focusGrab = std::make_unique(&hyprland_focus_grab_manager_v1_interface, 1, "FocusGrab"); // Old protocol implementations. // TODO: rewrite them to use hyprwayland-scanner. -- cgit v1.2.3