From a6f556ee0f3d66f3337cdc513b3e8ac3edd79842 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Tue, 14 Jan 2025 16:02:12 +0200 Subject: KXkb: Catch and process changes to Xkb layouts and options The XKBExtension class reports likely configuration changes to the main app which then updates its internal options object accordingly and marks some option sets as 'tainted'. A notification is produced to inform the user that an external application such as setxkbmap has changed some options. The next time the keyboard layout configuration module opens a dialog box asks the user to select to load either the KXkb configuration on disk or the currently active Xkb options. In both cases the user can then save and apply the preferred version of the configuration. Other significant changes: * Make XKBExtension a singleton so that only one instance of the class exists. The extension is initialized on first use. * Add mutex to XKBExtension to prevent it from processing configuration changes likely caused by KXkb * XKBExtension::getServerOptions() now also returns layout and variant information in a XkbOptions struct * New KxkbConfig::setFromXkbOptions() member can update current configuration from a XkbOptions struct * Add proper copyright header to extension.* Signed-off-by: Mavridis Philippe --- kxkb/eventsrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kxkb/eventsrc') diff --git a/kxkb/eventsrc b/kxkb/eventsrc index 1e06d70c3..e80332fbe 100644 --- a/kxkb/eventsrc +++ b/kxkb/eventsrc @@ -10,4 +10,9 @@ default_presentation=16 [Error] Name=Keyboard layout switching error Comment=Error while attempting to switch the keyboard layout +default_presentation=16 + +[ExternalChange] +Name=External configuration change +Comment=An external application has modified the active keyboard configuration default_presentation=16 \ No newline at end of file -- cgit v1.2.1