From 9f104ba2f9ab2f05cc2d296cb1abbfd1011c6b25 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 28 Jul 2020 00:35:34 +0200 Subject: Revert "Add alt+f1 keybind on target window to reset window rotation" This reverts commit cf0a94502a791f2b8a64cc6449b1e9dcaa3e3874. --- README.md | 2 +- src/main.cpp | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 36dfc64..082bc89 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ if you want to watch a regular non-stereoscopic video, then run: ``` and click on your video player. -The video might not be in front of you, so to move the video in front of you, you can pull the trigger on the vr controller or press the "Alt + F1" key while the target window is focused, or press the "W" key while the vr-video-player is focused or press the select/back button on an xbox controller while the vr-video-player is focused. You can also send the SIGUSR1 signal to the application, using the following command: +The video might not be in front of you, so to move the video in front of you, you can pull the trigger on the vr controller or press the "W" key while the vr-video-player is focused or press the select/back button on an xbox controller while the application is focused. You can also send the SIGUSR1 signal to the application, using the following command: ``` killall -USR1 vr-video-player` ``` diff --git a/src/main.cpp b/src/main.cpp index 80b1f50..62450ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -608,8 +608,6 @@ bool CMainApplication::BInit() window_resized = false; XSelectInput(x_display, src_window_id, StructureNotifyMask); - if(!XGrabKey(x_display, AnyKey, AnyModifier, src_window_id, True, GrabModeAsync, GrabModeAsync)) - fprintf(stderr, "Failed to grab alt + f1 keybind\n"); if(!XFixesQueryExtension(x_display, &x_fixes_event_base, &x_fixes_error_base)) { fprintf(stderr, "Your x11 server is missing the xfixes extension\n"); @@ -897,8 +895,6 @@ void CMainApplication::Shutdown() XCloseDisplay(x_display); } -#define CLEANMASK(mask) ((mask) & (ShiftMask|ControlMask|Mod1Mask|Mod4Mask|Mod5Mask)) - //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- @@ -959,12 +955,6 @@ bool CMainApplication::HandleInput() } } - if (XCheckTypedWindowEvent(x_display, src_window_id, KeyPress, &xev)) { - KeySym pressed_keysym = XKeycodeToKeysym(x_display, xev.xkey.keycode, 0); - if(pressed_keysym == XK_F1 && CLEANMASK(xev.xkey.state) == Mod1Mask) - m_bResetRotation = true; - } - if(XCheckTypedWindowEvent(x_display, src_window_id, x_fixes_event_base + XFixesCursorNotify, &xev)) { XFixesCursorNotifyEvent *cursor_notify_event = (XFixesCursorNotifyEvent*)&xev; if(cursor_notify_event->subtype == XFixesDisplayCursorNotify && cursor_notify_event->window == src_window_id) { -- cgit v1.2.3