Bug 451622 - Cursor remains disabled after alt+tabbing a window that disables it
Summary: Cursor remains disabled after alt+tabbing a window that disables it
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Manjaro Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-17 13:11 UTC by Lorenzo Rutayisire
Modified: 2024-06-12 10:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Rutayisire 2022-03-17 13:11:50 UTC
SUMMARY
***
I'm running an application that disables the cursor on startup through the GLFW call:
```
glfwSetInputMode(g_window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
```
If I switch window using alt+tab the cursor remains disabled, the only choice I have to enable it back is to kill the application that disabled it.
***

STEPS TO REPRODUCE
1. Run any application that disables the cursor
2. Alt+tab to another window
3. The cursor is still disabled!

OBSERVED RESULT
The cursor remains disabled after switching window through alt+tab.

EXPECTED RESULT
The cursor should appear back...

SOFTWARE/OS VERSIONS
Manjaro Linux 21.2.4 KDE

ADDITIONAL INFORMATION
I don't know if it can be of any interest, but I'm using multiple monitors (3 monitors right now).

I'm not sure if this is a bug or an expected behavior, however this is really unhandy when debugging GLFW applications (games) using an IDE. In this situation I used to alt+tab frequently to switch from the window to the code, put breakpoints, interact with IDE's UI and having the cursor disabled doesn't permit me to do nearly anything.
Comment 1 Lorenzo Rutayisire 2022-03-18 14:40:40 UTC
I've made a minimalistic C++ application that grabs the cursor (through GLFW) and then goes to sleep(100) after some iterations.
If I alt+tab the application the cursor does not get ungrabbed.
Comment 2 Vlad Zahorodnii 2024-06-12 10:15:27 UTC
Are you running X11 or Wayland? On Wayland, it seems to work fine.

Please reset the bug report status back to REPORTED after providing the requested information.
Comment 3 Lorenzo Rutayisire 2024-06-12 10:19:22 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Are you running X11 or Wayland? On Wayland, it seems to work fine.
> 
> Please reset the bug report status back to REPORTED after providing the
> requested information.

Oh I'm sorry, this report was from a long time ago and I don't have Manjaro installed anymore. I think it was xorg though (i.e. X11).

Setting the status back to REPORTED.
Comment 4 Vlad Zahorodnii 2024-06-12 10:38:11 UTC
Okay, I cannot reproduce the issue on X11 either. Perhaps it was fixed somewhere upstream