Skip to content

Conversation

@jayhwkns
Copy link

Intended to fix #1081 but it doesn't quite work. Removed some dead code and moved Wayland's event dispatcher to an Rc instead of cloning twice like before.

  • Added (and commented out) a print statement that helps mitigate the issue Input freezes / hangs when no input for a few seconds #1081
    • This a a heisenbug of sorts. Routinely calling a print statement (in this case in the title update function) mitigates the bug, but only if running from a terminal and printing to stdout (not /dev/null or any other file).
  • Removed unused function prototype for user_event. Unrelated to the issue, but just something that I'd notice.
  • Moved some references to the Wayland event dispatcher to an Rc to prevent cloning.
    • This was intended to be a solution, as I was told (by ChatGPT so take with a grain of salt) that cloning the dispatcher did something to the file descriptors that messed up polling. Still, this should save on resources slightly.

I'd be happy if this got merged, but I mostly intend for this to be a starting point for solving #1081 as it's affecting me. Highly curious about what the actual solution is.

@raphamorim
Copy link
Owner

Very interesting, thanks for the PR! did that fixed for you? I was looking calloop Dispatcher implementation and they have a Rc already. So calling .clone() already does reference counting. So wonder what's going on

@jayhwkns
Copy link
Author

Very interesting, thanks for the PR! did that fixed for you? I was looking calloop Dispatcher implementation and they have a Rc already. So calling .clone() already does reference counting. So wonder what's going on

Sorry for the confusion, it didn't fix it. I'm new to making open source contributions and I see now that this was probably not a PR worth opening. Still no clue what's causing it unfortunately. I had just hoped that the information in this PR helped. If you find a potential fix, please give me a ping and I can test it out for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input freezes / hangs when no input for a few seconds

2 participants