Skip to content

fix: persist settings on exit and watch every keyboard#2

Open
Austin-Metke wants to merge 1 commit into
Poke711:mainfrom
Austin-Metke:fix/persistence-and-multi-keyboard
Open

fix: persist settings on exit and watch every keyboard#2
Austin-Metke wants to merge 1 commit into
Poke711:mainfrom
Austin-Metke:fix/persistence-and-multi-keyboard

Conversation

@Austin-Metke

Copy link
Copy Markdown

Summary

  • Drop the winxp OSVersion override. It was added to fix a Save dialog crash under older Wine, but it also disables the WinForms FormClosing event chain — which is why nothing written on app exit (RecentSplits, RecentLayouts, window size, GlobalHotkeysEnabled) was persisting. Verified with current wine.AppImage: Save Splits/Layout As work fine without the override, and on-close persistence is restored. Run.sh now strips any leftover override on launch instead of installing one.
  • Watch every keyboard. The previous ls /dev/input/by-path/*-event-kbd | head -n 1 approach only fed the bridge the first keyboard, so global hotkeys silently failed for users typing on a different one. Now enumerates all *-event-kbd entries and dedupes by resolved real path (each USB keyboard appears under both -usb- and -usbv2- aliases).
  • Extends WINEDLLOVERRIDES with gdiplus, winhttp, and msxml6 set to native-then-builtin, and shortens the bridge startup delay from 4s → 1s.

Test plan

  • Settings dialog hotkey changes persist across restart
  • GlobalHotkeysEnabled=True survives close
  • RecentSplits / RecentLayouts populate after File → Open Splits / Save Splits As and survive restart
  • Window size persists after File → Save Layout
  • File → Save Splits As… and File → Save Layout As… no longer crash
  • Global hotkeys fire from a non-focused window with multiple keyboards plugged in
  • Run.sh passes bash -n syntax check

🤖 Generated with Claude Code

Drop the per-app winxp OSVersion override. It was added to dodge a
Save dialog crash under older Wine, but it also disabled the WinForms
FormClosing event chain, so RecentSplits, RecentLayouts, window size,
and GlobalHotkeysEnabled never persisted on exit. Newer Wine handles
IFileDialog correctly, so the workaround is obsolete; Run.sh now
strips any leftover override on launch instead of installing one.

Enumerate every *-event-kbd device under /dev/input/by-path/ instead
of taking only the first match, deduped by resolved real path (the
same USB keyboard appears under both -usb- and -usbv2- aliases).
Fixes global hotkeys for setups with multiple keyboards where the
primary one isn't first in the by-path listing.

Also extends WINEDLLOVERRIDES with gdiplus, winhttp, and msxml6
native-then-builtin, and shortens the bridge startup delay from 4s
to 1s.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant