NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xsrc/58153: Listing grabs with XF86LogGrabInfo



>Number:         58153
>Category:       xsrc
>Synopsis:       Listing grabs with XF86LogGrabInfo
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 15 03:55:00 +0000 2024
>Originator:     Robert Whitlock
>Release:        10.0
>Organization:
>Environment:
NetBSD 10.0, amd64, GENERIC
>Description:
The Internet suggests performing

xdotool key XF86LogGrabInfo

in order to list grabs that are currently running on the server, however it outputs

(symbol) No such key name 'XF86LogGrabInfo'. Ignoring it.
(symbol) No such key name 'XF86LogGrabInfo'. Ignoring it.

and does not print anything to the log file. I ran it through a debugger and it seems like it's failing because XStringToKeysym is returning NoSymbol when passed "XF86LogGrabInfo", as illustrated by the following code:

0 thinkpad$ cat m.c
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>

int main() {
       Display *dpy = XOpenDisplay(NULL);
       if (dpy == NULL) {
               fprintf(stderr, "XOpenDisplay failed.\n");
               exit (1);
       }

       KeySym ksym = XStringToKeysym("XF86LogGrabInfo");
       printf("Keysym: %lu\n", (unsigned long)ksym);

       XCloseDisplay(dpy);
}
0 thinkpad$ cat Makefile                                                       
a.out: m.c
       cc -I/usr/X11R7/include -L/usr/X11R7/lib m.c -lX11 -Wl,-R/usr/X11R7/lib
0 thinkpad$ make
cc -I/usr/X11R7/include -L/usr/X11R7/lib m.c -lX11 -Wl,-R/usr/X11R7/lib
0 thinkpad$ ./a.out                                                            
Keysym: 0
0 thinkpad$

In a message on netbsd-users@, RVP suggested applying the patch below, which did correct the problem. (see [1])

diff -urN a/xsrc/external/mit/libX11/dist/src/XKeysymDB b/xsrc/external/mit/libX11/dist/src/XKeysymDB
--- a/xsrc/external/mit/libX11/dist/src/XKeysymDB	2010-11-28 07:34:33.000000000 +0000
+++ b/xsrc/external/mit/libX11/dist/src/XKeysymDB	2024-03-25 21:36:39.970222356 +0000
@@ -370,6 +370,9 @@
XF86_ClearGrab		:1008FE21
XF86_Next_VMode		:1008FE22
XF86_Prev_VMode		:1008FE23
+XF86LogWindowTree	:1008FE24
+XF86LogGrabInfo	:1008FE25
+

usldead_acute		:100000A8
usldead_grave		:100000A9

...although the other suggestion that was made did not work, which was

xdotool key Ctrl+Alt+F11

and which just reported "Failed to switch from vt05 to vt11: Invalid argument" in /var/log/Xorg.0.log.

[1] https://mail-index.netbsd.org/netbsd-users/2024/03/25/msg030829.html
>How-To-Repeat:
See above.
>Fix:
Apply the patch.



Home | Main Index | Thread Index | Old Index