diff --git a/src/Backends/SDLBackend.cpp b/src/Backends/SDLBackend.cpp index 87842e1e7..d030ef51a 100644 --- a/src/Backends/SDLBackend.cpp +++ b/src/Backends/SDLBackend.cpp @@ -706,7 +706,7 @@ namespace gamescope if ( event.type == SDL_KEYUP && ( event.key.keysym.mod & KMOD_LGUI ) ) { auto shortcut = g_shortcutHandler.GetShortcut( key ); - bool handled = g_shortcutHandler.HandleShortcut( shortcut ); + g_shortcutHandler.HandleShortcut( shortcut ); switch ( shortcut ) { @@ -724,7 +724,7 @@ namespace gamescope default: break; } - if ( handled ) + if ( shortcut != GAMESCOPE_SHORTCUT_NONE ) { break; } diff --git a/src/shortcut.cpp b/src/shortcut.cpp index 688802130..158cf9bef 100644 --- a/src/shortcut.cpp +++ b/src/shortcut.cpp @@ -51,7 +51,7 @@ namespace gamescope return GAMESCOPE_SHORTCUT_NONE; } - bool ShortcutHandler::HandleShortcut( GamescopeShortcut shortcut ) + void ShortcutHandler::HandleShortcut( GamescopeShortcut shortcut ) { switch ( shortcut ) { @@ -82,11 +82,8 @@ namespace gamescope g_bGrabbed = !g_bGrabbed; break; default: - return false; break; } - - return true; } static const char* ShortcutNames[GAMESCOPE_SHORTCUT_COUNT] = { diff --git a/src/shortcut.h b/src/shortcut.h index 649e13ec2..eebfcfaea 100644 --- a/src/shortcut.h +++ b/src/shortcut.h @@ -34,7 +34,7 @@ namespace gamescope GamescopeShortcut GetShortcut( uint32_t key ); - bool HandleShortcut( GamescopeShortcut shortcut ); + void HandleShortcut( GamescopeShortcut shortcut ); private: std::map m_binds;