Crashes on wayland
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Sakura |
Fix Released
|
High
|
David Gómez | ||
Debian |
Fix Released
|
Unknown
|
Bug Description
Recent sakura versions crash on keypresses when started as native Wayland clients, most probably because of the changes introduced in http://
#0 0x00007ffff4dea064 in XkbUseExtension (dpy=dpy@
#1 0x00007ffff4de0c56 in _XkbLoadDpy (dpy=0x5555557b
#2 0x00007ffff4de14e0 in XKeysymToKeycode (dpy=0x5555557b
#3 0x0000555555561bd8 in ()
#4 0x00007ffff76f4a0c in () at /lib/x86_
#8 0x00007ffff5e51faf in <emit signal ??? on instance 0x5555557cc520 [GtkWindow]> (instance=
at ././gobject/
#5 0x00007ffff5e36f75 in g_closure_invoke (closure=
#6 0x00007ffff5e48f82 in signal_
#7 0x00007ffff5e5166f in g_signal_
at ././gobject/
#9 0x00007ffff78413bc in () at /lib/x86_
#10 0x00007ffff76f1ba9 in () at /lib/x86_
#11 0x00007ffff76f3b4e in gtk_main_do_event () at /lib/x86_
#12 0x00007ffff7204bf5 in () at /lib/x86_
#13 0x00007ffff7260622 in () at /lib/x86_
#14 0x00007ffff5b5d7f7 in g_main_dispatch (context=
#15 0x00007ffff5b5d7f7 in g_main_
#16 0x00007ffff5b5da60 in g_main_
#17 0x00007ffff5b5dd82 in g_main_loop_run (loop=0x555555a
#18 0x00007ffff76f2cb5 in gtk_main () at /lib/x86_
#19 0x000055555555c464 in main ()
Related branches
- No reviews requested
Changed in sakura: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in debian: | |
status: | Unknown → Confirmed |
Changed in debian: | |
status: | Confirmed → Fix Released |
Changed in sakura: | |
status: | Fix Committed → Fix Released |
I have a potential fix but it has only received very light testing. First, we need to replace the sakura_tokeycode macro with a function:
static guint get_default( );
sakura_tokeycode (guint key) {
GdkKeymap *keymap = gdk_keymap_
GdkKeymapKey *keys;
gint n_keys;
guint res = 0;
if (gdk_keymap_ get_entries_ for_keyval( keymap, key,
&keys, &n_keys)) {
g_free( keys);
if (n_keys > 0) {
res = keys[0].keycode;
}
}
return res;
}
We then have to remove the X11 includes:
#include <X11/Xlib.h>
#include <gdk/gdkx.h> -> #include <gdk/gdk.h>
We also have to remove the dpy member from the sakura structure.
Hope it helps