[wayland] Do not show layout override warning when override is disabled#1390
[wayland] Do not show layout override warning when override is disabled#1390wengxt merged 2 commits intofcitx:masterfrom
Conversation
|
The meaning of such option is not what you think. For sway case it's like to run swaymsg input type:keyboard xkb_layout override xkb please show ~/.config/fcitx5/profile if you think this is not correct. |
|
Thank you for the explanation! After thinking more carefully about this behavior, I believe the root of the confusion lies in conflating two separate concepts:
Currently, even when the override feature is explicitly disabled, Fcitx still shows the notification:
This message may give users the impression that something is wrong or misconfigured — even though in reality, they've intentionally disabled override setting and expect layout switching to be handled themself or internally by Fcitx. To improve clarity and avoid misleading users, I’d like to suggest refining the logic slightly:
This way, the notification serves its original purpose — helping users configure things correctly — without confusing those who already know what they’re doing. Let me know if this sounds reasonable. I’d be happy to help with a patch or further discussion if needed! |
|
Sorry I misunderstand the overrideXkb here, it's the wayland's config, not the global config one. I think the change makes sense, but just FYI the notification service, that support "action', it should have a button says "don't show this again'. It is actually supported by your notification service, but it can only be shown in a not very straight forward way. Check the manual of your notification. |
This pull request consists of two commits:
Prevents the Wayland self-diagnose routine from issuing layout override warnings when "allow overriding system XKB settings" is disabled by the user. Previously, users would receive a confusing message about "sending keyboard layout configuration" even if layout override was explicitly disabled.
Refactors the layout diversity check logic in the same routine by replacing
std::unordered_set<std::string>withstd::optional<std::string>, which improves performance and clarity.These changes improve both user experience and internal structure consistency, especially on non-KDE/GNOME compositors (e.g., Hyprland).
Tested with Fcitx5 under Arch Linux with Hyprland and verified the warning is correctly suppressed when override is disabled.