Now pressing a modifier key in one keyboard and a normal key in another works. Fixes#2362
Don't rebuild keymaps on new keyboard events that only change geometry. Fixes#2787
Better handling of multiple keyboards with incompatible layouts (this is for free from the above fixes). Fixes#2726
Use the GLX 1.3 API function to choose the best framebuffer config
instead of doing it ourselves. Reduces the number fo getpid() calls by
a further ~15K
On my system reduces the number of getpid() calls from 67982 to 17327
I dont know why get framebuffer config attributes requires getpid() and
why it is so slow, probably a driver bug. Fixes#2754
Previously, the mouse back and forward buttons sent the same codes as
scroll up and down. Now they instead send the same codes as xterm. Mouse
button 10 (in X11 numbering) also now sends the same as xterm, instead
of not sending anything.
This also changes the `send_mouse_event` function which can be called
from kittens to use X11 numbering for mouse buttons instead of what it
previously used, which turns out to be a hybrid of X11 and GLFW. It was
documented to use GLFW numbering, but GLFW doesn't have numbers for
scroll events (that's separate events with x/y offsets) and 4 and 5 in
GLFW is actually back and forward, while `send_mouse_event` interpreted
it as scroll up and down.
That means that this is a breaking change for `send_mouse_event` because
it swaps the number for the middle and right button to be consistent
with X11. I did this because I think it's better to use one consistent
numbering scheme for the function, and because people probably know X11
numbering better than GLFW numbering and GLFW doesn't have numbers for
the scroll buttons.
When a modifier key is pressed, that modifier is not included in mods.
When it is released, it is included. Therefore, we have to special case
the modifier keys when storing the modifiers that are active. When a
modifier key is pressed, we add the modifier to
mods_at_last_key_or_button_event, and when it is released, we remove it.
This fixes an issue where move and drag events would still be sent to
the terminal program after pressing shift, but would stop being sent
after releasing shift until another key or button was pressed.