Hi Henry, see my replies to your code review below:
You could also query the exact scale factor with a spin button.
xkb.h: No need to #include "ev.h" anymore.
xkb-plugin.c:269: There already is a variable called "fp" in this
function. I would prefer not to override that definition.
xkb-plugin.c:544,646,848: Do trampolines work everywhere we care? The
gcc(1) manpage says:
> A trampoline is a small piece of data or code that is created at run
> time on the stack when the address of a nested function is taken, and
> is used to call the nested function indirectly. For some targets, it
> is made up of data only and thus requires no special treatment. But,
> for most targets, it is made up of code and thus requires the stack to
> be made executable in order for the program to work properly.
Sofar xkb is the only plugin that requires an executable stack (see
execstack(8)). Ubuntu seems to prefer avoiding it:
and I don't think the C standard allows them. Opinions?
xkb-plugin.c:926-928: If the system() calls fail, an
ERR("xkb: blah, blah failed\n");
message should be returned. And perhaps replace the g_printf() with
LOG(LOG_INFO, "xkb: blah, blah %s\n", str);
to be consistent.
xkb-plugin.c: Instead of 5 times on_radiobutton_flag_size_5_toggled()
you could pass the flag_size in the p_data, preferably using
GINT_TO_POINTER() and GPOINTER_TO_INT(), see
But I am nitpicking. :)
xkb-plugin.c:478:13: warning: 'on_hscale_flag_size_value_changed'
defined but not used [-Wunused-function]
Black text on dark background doesn't work too well. It would be nice to
have that configurable. (Or is there a better way?)
And one bug: The plugin correctly identifies my keyboard layout as "de",
but until it is configured the config dialog only shows "us" in the
"Keyboard Layouts" section.