Skip to content

Port to xcffib - #1868

Draft
user202729 wants to merge 1 commit into
opensteno:mainfrom
user202729:xcffib-port
Draft

user202729 wants to merge 1 commit into
opensteno:mainfrom
user202729:xcffib-port

Conversation

@user202729

@user202729 user202729 commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Requires tych0/xcffib#205 . DO NOT MERGE until new xcffib version available.

Though, as mentioned in that pull request, it might be possible to use xkbcommon instead, which Plover already depends on.


Summary of changes

Delete dependency on python-xlib, depend on xcffib instead.

Reason: python-xlib is not very active nowadays, and it has a few bugs/missing features that I come across.

With a nontrivial amount of LLM assistance. Changes look relatively mechanical (some magic constants come from X11/X.h that xcffib doesn't include, such as tych0/xcffib#206), but I should test it first.

Pull Request Checklist

  • Changes have tests
  • News fragment added in news.d. See documentation for details

@user202729

user202729 commented Sep 19, 2026 •

Copy link
Copy Markdown
Member Author

Build failure is puzzling. I'd expect a import failure but...?

missing URL for zsync2

Edit: looks like transient failure, passes now.

@user202729
user202729 force-pushed the xcffib-port branch 2 times, most recently from ceffbfc to d7a1dd1 Compare September 19, 2026 04:20
@user202729

user202729 commented Sep 19, 2026 •

Copy link
Copy Markdown
Member Author

Fixed LLM hallucinations and tested by hand the keyboard capture/uncapture part.

I'm not entirely sure what the wmctrl part is about (tests done on a window manager that doesn't support that feature, so it returns None…?), but it at least doesn't error out. Second force-push is to fit code in (restrictive) 80-column limit.

Update: wmctrl also manually (programmatically) tested now.

@user202729
user202729 marked this pull request as ready for review September 19, 2026 04:25
@user202729
user202729 marked this pull request as draft September 19, 2026 04:25

This branch has not been deployed

No deployments
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