Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hyprctl switchxkblayout not actually changing layout #7070

Merged

Conversation

MahouShoujoMivutilde
Copy link
Contributor

Describe your PR, what does it fix/add?

This fixes #7044

Emits SModifiersEvent in updateModifiers()

Before the patch:

Changing layout with hyprctl switchxkblayout ... results in:

  • active keymap in hyprctl devices is changed
  • no ipc event
  • no layout is actually changed util you press one of the mod keys (Alt | Shift | Super | Ctrl) - then event is emitted, and layout is changed for real

After:

  • active keymap in hyprctl devices is changed
  • activelayout IPC event emitted
  • layout is changed

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

It works for me and @coffebar , it doesn't seem to break anything.

Video demo #7044 (comment)

Is it ready for merging, or does it need work?

Ready

Emits `SModifiersEvent` in `updateModifiers()`

Before the patch:

Changing layout with `hyprctl switchxkblayout ...` results in:
    * active keymap in `hyprctl devices` is changed
    * no event
    * no layout is actually changed UNTIL you press one of the mod keys
      (Alt | Shift | Super | Ctrl)

After:
    * active keymap in `hyprctl devices` changed
    * activelayout IPC event emitted
    * layout is changed

This fixes hyprwm#7044
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks!

@vaxerski vaxerski merged commit 84227eb into hyprwm:main Jul 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hyprctl switchxkblayout lagging
2 participants