aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-16 21:48:35 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-16 21:48:35 +0100
commit14b0d376a8191a8873b1f866a3cfe777bbe091ce (patch)
tree6fc370efbb84ea2585cf867da4137c9a39561472 /src
parenteb3660a4d81ede493943c13cba959ea061f2d536 (diff)
Prevent focused application from receiving global hotkey keys on wayland as well (massive hack)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c7a47c5..c210033 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -203,17 +203,17 @@ int main(void) {
auto overlay = std::make_unique<gsr::Overlay>(resources_path, std::move(gsr_info), std::move(capture_options), egl_funcs);
//overlay.show();
- std::unique_ptr<gsr::GlobalHotkeys> global_hotkeys = nullptr;
- if(display_server == gsr::DisplayServer::X11) {
- global_hotkeys = register_x11_hotkeys(overlay.get());
- if(!global_hotkeys) {
- fprintf(stderr, "Info: failed to register some x11 hotkeys because they are registered by another program. Will use linux hotkeys instead that can clash with keys used by other applications\n");
- global_hotkeys = register_linux_hotkeys(overlay.get());
- }
- } else {
- fprintf(stderr, "Info: Global linux hotkeys are used which can clash with keys used by other applications. Use X11 instead if this is an issue for you\n");
- global_hotkeys = register_linux_hotkeys(overlay.get());
- }
+ // std::unique_ptr<gsr::GlobalHotkeys> global_hotkeys = nullptr;
+ // if(display_server == gsr::DisplayServer::X11) {
+ // global_hotkeys = register_x11_hotkeys(overlay.get());
+ // if(!global_hotkeys) {
+ // fprintf(stderr, "Info: failed to register some x11 hotkeys because they are registered by another program. Will use linux hotkeys instead\n");
+ // global_hotkeys = register_linux_hotkeys(overlay.get());
+ // }
+ // } else {
+ // global_hotkeys = register_linux_hotkeys(overlay.get());
+ // }
+ std::unique_ptr<gsr::GlobalHotkeys> global_hotkeys = register_linux_hotkeys(overlay.get());
// TODO: Add hotkeys in Overlay when using x11 global hotkeys. The hotkeys in Overlay should duplicate each key that is used for x11 global hotkeys.