patch for xfce-shortcuts-grabber.c which wrongly ungrabs keys when updating grabbed ones
Submitted by Guido Falsi
Assigned to Xfce Bug Triage
Description
Created attachment 9800 Proposed patch
Hi,
In FreeBSD a bug has been reported with XFCE wrongly managing keyboard shortcuts [1].
The problem has been identified as xfce-shortcuts-grabber.c, when renewing grabbed keys on keyboard change wrongly ungrabbing the new key instead of the old one.
A fellow FreeBSD committer sent a patch which teaches xfce-shortcuts-grabber.c to remember old keys and ungrab them correctly. His original submission (which is what we are using in our ports tree at present) can be viewed here [2]
On his suggestion I slightly cleaned up his patch and am posting it here. I'd like to have it included in the official tree, and will listen for any suggestions to make it better.
The patch uses a fixed buffer with size 8 for old keys, to keep the patch simple, avoiding the complications of memory allocation/deallocation.
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244290
[2] https://reviews.freebsd.org/D24338
Patch 9800, "Proposed patch":
libxfce4ui.diff
Version: 4.14.0