https://bugs.kde.org/show_bug.cgi?id=458929

            Bug ID: 458929
           Summary: Cursor stays hidden when gdb break point is triggered
                    using GLFW3
           Product: kwin
           Version: 5.25.4
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: kwin-bugs-n...@kde.org
          Reporter: abdulalze...@gmail.com
  Target Milestone: ---

Created attachment 151951
  --> https://bugs.kde.org/attachment.cgi?id=151951&action=edit
Minimal project to reproduce the bug

SUMMARY
When debugging a c/c++ project with gdb, if a break point is triggered in a
specific way, cursor will stay hidden even if the window loses focus. This
makes the user unable to use the mouse whenever a breakpoint is hit.
Essentially making debugging apps in plasma DE a nightmare.

I believe this is a kwin issue because if I understand correctly, kwin doesn't
let apps hide the cursor from all windows, just from the windows created from
host app's process.

The function for hiding the cursor from GLFW is  
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); 

I tried producing a minimal example to reproduce the bug. It is a cmake project
attached to this issue. It might need some tinkering to make it work on your
setup, I'm using vs code, so I left the configuration files there in case it is
useful for anyone.

STEPS TO REPRODUCE
1. Install GLFW3 and download attached project
2. Generate CMake project with "cmake -DCMAKE_BUILD_TYPE=Debug ."
3. Place breakpoint on line 18 (end bracket) on main.c
4. Start debugging and exit the app(Alt + F4 for me), without making the window
lose focus
5. Break point is hit, app loses focus but cursor still doesn't show 

OBSERVED RESULT
Cursor is hidden even when focusing other apps

EXPECTED RESULT
Cursor should be visible (shouldn't it?)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to