landronimirc at gmail.com
Sat Jul 28 12:01:20 CEST 2012
On Sat, Jul 28, 2012 at 8:12 AM, Igor Slepchin <igor.slepchin at gmail.com> wrote:
> So I've finally gotten tired of xfce4-xkb-plugin losing its config (there
> are quite a few open bugs about this) and decided to take a look into it.
> This ended up in some reworking of the way plugin behaves...
> The root cause of losing the layout config is X resetting keyboard
> configuration to system defaults (normally in /etc/defaults/keyboard)
> whenever a new keyboard is detected. xkb-plugin listens to keyboard config
It's great that you took time to hunt down this bug! Thanks.
> updates from libxklavier and quietly updates its own settings whenever a
> config change happens; these new settings are then saved to .rc file when
> the panel issues the "save" signal.
> Forgetting about xkb-plugin for a moment, somebody needs to reset the
> configured keyboard settings whenever X changes them underneath. xkb-plugin
> could do that itself but it seems to make more sense to make xfsettingsd
> responsible for that since it's always there and xkb-plugin may or may not
> be used; besides, xfce4-keyboard-settings already allows setting up keyboard
> layouts and xkb-plugin effectively duplicates that.
Good remark. I always thought that this duplication was unnecessary
and confusing, and that the user should change the settings in one
> My changes follow along these lines. Keyboard layout settings are now fully
> controlled by xfce4-keyboard-settings; xfsettingsd listens to system
> keyboard config changes (through xklavier) and resets them if necessary (it
> also takes care to only update the parts of the config it controls, unlike
> the old xkb-plugin). The "new" xkb-plugin acts mostly as just a keyboard
> layout indicator, i.e., layouts are set up through xfce4-keyboard-settings
> only (xkb-plugin still controls changing layout per window/app atm but it
> learns about the configured set from xklavier rather than its own config).
> I've also made a number of other fixes/improvements while at it - the commit
> messages are hopefully fairly self-explanatory so I won't duplicate them
I'm no expert, but it seems to me that this is a good way to approach
this: xfce4-keyboard-settings for defining all the XKB related
settings, and xkb-plugin for switching layouts.
> I'd appreciate if you guys could take a look at
> https://github.com/igors/xfce4-settings and
> https://github.com/igors/xfce4-xkb-plugin and
Unfortunately I'm still using the out-dated Xfce 4.6 and thus cannot
test your branches.
> let me if you're ok with these
> changes or prefer any of them done differently. And please let me know if
> you'd rather have me submit the patches in a different form.
I think it would make sense for you to make a request to become the
new maintainer of the plugin (after checking up with the current
maintainer). You will likely need to create a devel account as
indicated here . It will also be useful if you posted the patches
to Bugzilla. 
More information about the Xfce4-dev