# SDL: x11: Don't suppress slave mouse buttons when lacking keyboard focus

**URL:** <https://discourse.libsdl.org/t/sdl-x11-dont-suppress-slave-mouse-buttons-when-lacking-keyboard-focus/69266>\
**Category:** SDL Commits\
**Created:** [September 9, 2026, 5:41pm UTC](https://discourse.libsdl.org/t/sdl-x11-dont-suppress-slave-mouse-buttons-when-lacking-keyboard-focus/69266 "2026-09-09T17:41:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [September 9, 2026, 5:41pm UTC](https://discourse.libsdl.org/t/sdl-x11-dont-suppress-slave-mouse-buttons-when-lacking-keyboard-focus/69266/1 "2026-09-09T17:41:26Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/9adf3ff6d357d022f2c3c18d1261afe79775e11a>
>
> The window may not have keyboard focus when using remote control tools, so drop …the keyboard focus requirement. Tested not to regress clickthrough suppression.

```diff
From 9adf3ff6d357d022f2c3c18d1261afe79775e11a Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 9 Sep 2026 13:20:25 -0400
Subject: [PATCH] x11: Don't suppress slave mouse buttons when lacking keyboard
 focus

The window may not have keyboard focus when using remote control tools, so drop the keyboard focus requirement. Tested not to regress clickthrough suppression.
---
 src/video/x11/SDL_x11xinput2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c
index 7c7cefd12adb5..c095af1cbe453 100644
--- a/src/video/x11/SDL_x11xinput2.c
+++ b/src/video/x11/SDL_x11xinput2.c
@@ -629,7 +629,7 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
                 /* Ignore slave button events on non-focused windows, as they can arrive before FocusIn events,
                  * or result in focus being incorrectly set while a grab is active.
                  */
- if (SDL_GetMouseFocus() != windowdata->window || SDL_GetKeyboardFocus() != windowdata->window) {
+ if (SDL_GetMouseFocus() != windowdata->window) {
                     break;
                 }
 

```
