Skip to content

Commit

Permalink
Try fixing cursor glitch on my Arch - mouse doesnt move when any button
Browse files Browse the repository at this point in the history
is pressed after tabbing back into the game, though it's fixed when I
just press ESC
  • Loading branch information
geneotech committed Jun 25, 2024
1 parent 2db0ecd commit 481f861
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/pages/todo/todo_bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ permalink: todo_bugs
summary: Just a hidden scratchpad.
---

- strange glitch that doesnt allow moving mouse when button pressed on linux
- happens when changing tab/workspace, but mostly tab
- need to reinvoke clip cursor on activate likely
- somehow fixed when we press escape or even tilde (!!) so maybe it's enough to call set_cursor_clipping_impl again

- WebRTC crash on dedicated server disconnect (happened when browser was connecting though)
[20:27:54] server disconnected client 0

Expand Down
10 changes: 10 additions & 0 deletions src/augs/window_framework/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ namespace augs {
|| ch.msg == message::click_activate
) {
active = true;

#if PLATFORM_LINUX
/*
Refresh to fix cursor misbehaving
after focusing the window back on my Arch i3.
*/

set_cursor_clipping_impl(cursor_clipping);
set_cursor_visible_impl(cursor_visible);
#endif
}

if (ch.msg == message::deactivate) {
Expand Down

0 comments on commit 481f861

Please sign in to comment.