protocols: Move globalshortcuts impl (#7102)
* move global shortcuts to hyprwayland-scanner * remove wayland-scanner from deps * fix the thing
This commit is contained in:
parent
8ec3dc4c09
commit
3b9b5346b8
8 changed files with 84 additions and 212 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "../managers/SeatManager.hpp"
|
||||
#include "../protocols/LayerShell.hpp"
|
||||
#include "../protocols/ShortcutsInhibit.hpp"
|
||||
#include "../protocols/GlobalShortcuts.hpp"
|
||||
#include "../render/decorations/CHyprGroupBarDecoration.hpp"
|
||||
#include "../devices/IKeyboard.hpp"
|
||||
#include "KeybindManager.hpp"
|
||||
|
|
@ -2664,10 +2665,10 @@ void CKeybindManager::global(std::string args) {
|
|||
if (NAME.empty())
|
||||
return;
|
||||
|
||||
if (!g_pProtocolManager->m_pGlobalShortcutsProtocolManager->globalShortcutExists(APPID, NAME))
|
||||
if (!PROTO::globalShortcuts->isTaken(APPID, NAME))
|
||||
return;
|
||||
|
||||
g_pProtocolManager->m_pGlobalShortcutsProtocolManager->sendGlobalShortcutEvent(APPID, NAME, g_pKeybindManager->m_iPassPressed);
|
||||
PROTO::globalShortcuts->sendGlobalShortcutEvent(APPID, NAME, g_pKeybindManager->m_iPassPressed);
|
||||
}
|
||||
|
||||
void CKeybindManager::moveGroupWindow(std::string args) {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
#include "../protocols/Screencopy.hpp"
|
||||
#include "../protocols/ToplevelExport.hpp"
|
||||
#include "../protocols/TextInputV1.hpp"
|
||||
#include "../protocols/GlobalShortcuts.hpp"
|
||||
|
||||
#include "../protocols/core/Seat.hpp"
|
||||
#include "../protocols/core/DataDevice.hpp"
|
||||
|
|
@ -148,6 +149,7 @@ CProtocolManager::CProtocolManager() {
|
|||
PROTO::xwaylandShell = std::make_unique<CXWaylandShellProtocol>(&xwayland_shell_v1_interface, 1, "XWaylandShell");
|
||||
PROTO::screencopy = std::make_unique<CScreencopyProtocol>(&zwlr_screencopy_manager_v1_interface, 3, "Screencopy");
|
||||
PROTO::toplevelExport = std::make_unique<CToplevelExportProtocol>(&hyprland_toplevel_export_manager_v1_interface, 2, "ToplevelExport");
|
||||
PROTO::globalShortcuts = std::make_unique<CGlobalShortcutsProtocol>(&hyprland_global_shortcuts_manager_v1_interface, 1, "GlobalShortcuts");
|
||||
|
||||
for (auto& b : g_pCompositor->m_pAqBackend->getImplementations()) {
|
||||
if (b->type() != Aquamarine::AQ_BACKEND_DRM)
|
||||
|
|
@ -164,10 +166,6 @@ CProtocolManager::CProtocolManager() {
|
|||
PROTO::linuxDma = std::make_unique<CLinuxDMABufV1Protocol>(&zwp_linux_dmabuf_v1_interface, 5, "LinuxDMABUF");
|
||||
} else
|
||||
Debug::log(WARN, "ProtocolManager: Not binding linux-dmabuf and MesaDRM: DMABUF not available");
|
||||
|
||||
// Old protocol implementations.
|
||||
// TODO: rewrite them to use hyprwayland-scanner.
|
||||
m_pGlobalShortcutsProtocolManager = std::make_unique<CGlobalShortcutsProtocolManager>();
|
||||
}
|
||||
|
||||
CProtocolManager::~CProtocolManager() {
|
||||
|
|
@ -220,6 +218,7 @@ CProtocolManager::~CProtocolManager() {
|
|||
PROTO::xwaylandShell.reset();
|
||||
PROTO::screencopy.reset();
|
||||
PROTO::toplevelExport.reset();
|
||||
PROTO::globalShortcuts.reset();
|
||||
|
||||
PROTO::lease.reset();
|
||||
PROTO::sync.reset();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "../defines.hpp"
|
||||
#include "../protocols/GlobalShortcuts.hpp"
|
||||
#include "../helpers/Monitor.hpp"
|
||||
#include "../helpers/memory/Memory.hpp"
|
||||
#include "../helpers/signal/Signal.hpp"
|
||||
|
|
@ -12,9 +11,6 @@ class CProtocolManager {
|
|||
CProtocolManager();
|
||||
~CProtocolManager();
|
||||
|
||||
// TODO: rewrite to use the new protocol framework
|
||||
std::unique_ptr<CGlobalShortcutsProtocolManager> m_pGlobalShortcutsProtocolManager;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, CHyprSignalListener> m_mModeChangeListeners;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue