Skip to content

add a toast for uinput errors#494

Open
shocktail39 wants to merge 3 commits intowayvr-org:mainfrom
shocktail39:uinput-toast
Open

add a toast for uinput errors#494
shocktail39 wants to merge 3 commits intowayvr-org:mainfrom
shocktail39:uinput-toast

Conversation

@shocktail39
Copy link
Copy Markdown

this makes it more obvious if missing uinput permissions are the reason your keyboard and mouse aren't working.

this message shows up in wayvr's log, but the log can be a bit overwhelming for people who aren't experienced in reading logs. a simple wayvr >>test 2>>test followed by a sigterm as soon as i saw something, generated a 16K log file according to ls. this toast puts the error front-and-center as soon as wayvr starts, so when the user notices their keyboard overlay is busted, they already have a hint as to why it might be.

this makes it more obvious if missing uinput permissions are the reason your keyboard and mouse aren't working.
@shocktail39
Copy link
Copy Markdown
Author

got any feedback? i know i changed the signatures of two public functions (specifically their return types) which isn't really ideal, but as far as i can tell, doing so was necessary to make the error live long enough to be displayed in a toast. i also am not entirely familiar with wayvr's codebase, so i might have missed a better way to do this.

@galister
Copy link
Copy Markdown
Collaborator

i think maybe raise the timeout, 10s might not be enough for such long text.

@shocktail39
Copy link
Copy Markdown
Author

shocktail39 commented Apr 20, 2026

yeah that's fair. i'm in class right now and can't test before pushing, but i'll change it when i get home.

also, i noticed that quite a few of the setup functions give similar log warnings. i kinda want to display some of them too, but i'm not sure how to best display them to a user who doesn't know how to read logs. just spamming every error at once would be overwhelming, but a queue of errors one-after-the other might be overwhelming too, in a "oh god when the hell will it end" sorta way.

edit. actually, instead of a timer, is there a way to create a text display with an "ok" button at the bottom?

@oo8dev
Copy link
Copy Markdown
Collaborator

oo8dev commented Apr 21, 2026

edit. actually, instead of a timer, is there a way to create a text display with an "ok" button at the bottom?

Not such thing exists yet in the code, so let's stick to the notification delay at least for now

@galister
Copy link
Copy Markdown
Collaborator

i think just bump it to 30s and call it a day.

@galister
Copy link
Copy Markdown
Collaborator

or without timeout, even

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.

3 participants