Created attachment 175206 [details] Video of Blender not focusing SUMMARY In KDE Wayland post Plasma 6.2.0, if I use the Lockscreen or Sleep keyboard shortcuts to lock the screen, Blender will more often than not stop responding to keyboard or mouse inputs if it loses and regains focus, see video attached. The window still gains focus, but Blender itself doesn't register the keys. When this happens, this is repeatedly printed in the journal > blender[41890]: WARN (ghost.wl.keyboard.depressed): intern/ghost/intern/GHOST_SystemWayland.cc:7501 getModifierKeys: modifier (OS) state is inconsistent (GHOST released keys do not match XKB) It only happens if I use the keyboard shortcuts. If I manually go to the application launcher and sleep/lockscreen, it doesn't happen. Other keyboard shortcuts, like ALT+TAB also don't cause any issues. To fix it, i have to log out and log in, or do a kwin_wayland --replace. Restarting Blender doesn't fix it. Relocking the screen again reintroduces the issue. This bug started happening in Plasma 6.2.0. STEPS TO REPRODUCE 1. Open Blender (Bug happens even if Blender is closed while locking/sleep) 2. Lock Screen/Sleep through keyboard shortcut 3. Unlock screen, and try to click on the Blender viewport, or try to zoom in/out using scrollwheel. 4. Try unfocusing Blender window, then refocusing and try to click or scroll in the blender window. OBSERVED RESULT Blender will sometimes not respond to mouse clicks/scrolls and keyboard input EXPECTED RESULT Blender should respond to mouse clicks/scrolls and keyboard input when focused SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 6.2.2 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 ADDITIONAL INFORMATION Tested with Blender 4.2.3 Binary from the blender website, as well as Blender 4.2.2 LTS from the flatpak repos. Does not happen in KDE X11. A possibly related bug with Sway on the Blender bugtracker https://projects.blender.org/blender/blender/issues/117225
Created attachment 175207 [details] Select 3D cursor mode
I have the exact same issue in Blender, but a similar one in Krita as well, which is most likely related. Only the lmb input works there, so I can draw but I can't zoom and press some other keys.
Created attachment 175216 [details] Can't zoom in/out on Krita after locking screen Can confirm it affects Krita as well. Drawing using left click works, but can't zoom in/out using the middle mouse scroll. Strangely, it works when its a background window, but bringing it into focus breaks it again.
Same issue here. You can fix it temporarily by mashing Ctrl + Meta or Alt + Meta.
Git commit c1e3dc0e083dee84aa24f8fb0a42dc112270645d by Vlad Zahorodnii, on behalf of Adam Nydahl. Committed on 14/11/2024 at 13:02. Pushed by vladz into branch 'master'. Ensure active window isn't focused when screen is locked If the screen is locked, but the lockscreen isn't ready for painting, pickFocus() returns the active window. This somehow leads to the meta key getting "stuck" if you lock the screen with Meta+L. M +1 -0 src/keyboard_input.cpp https://invent.kde.org/plasma/kwin/-/commit/c1e3dc0e083dee84aa24f8fb0a42dc112270645d
Git commit f90ffedf14dff85c55030c2c465d166c30c7be14 by Vlad Zahorodnii. Committed on 14/11/2024 at 16:23. Pushed by vladz into branch 'Plasma/6.2'. Ensure active window isn't focused when screen is locked If the screen is locked, but the lockscreen isn't ready for painting, pickFocus() returns the active window. This somehow leads to the meta key getting "stuck" if you lock the screen with Meta+L. (cherry picked from commit c1e3dc0e083dee84aa24f8fb0a42dc112270645d) Co-authored-by: Adam Nydahl <loginer@loginer.net> M +1 -0 src/keyboard_input.cpp https://invent.kde.org/plasma/kwin/-/commit/f90ffedf14dff85c55030c2c465d166c30c7be14