NetBSD-Users archive

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

Re: Listing X11 grabs with XF86LogGrabInfo



On Tue, Mar 26, 2024 at 11:36:48AM +0000, RVP wrote:
> On Tue, 26 Mar 2024, tlaronde%kergis.com@localhost wrote:
> 
> > In current (it has been updated very recently) Xorg xorgproto
> > (https://gitlab.freedesktop.org/xorg/proto/xorgproto), the
> > Keysyms in include/X11/XF86keysym.h are:
> > 
> > #define XF86XK_LogWindowTree         0x1008fe24  /* print window tree to log   */
> > #define XF86XK_LogGrabInfo           0x1008fe25  /* print all active gra bs to log */
> > 
> 
> Yeah, XF86keysym.h is where I fudged my data for the patches. A commit log
> from 2010 says:
> 
> ```
> commit eb023c0f8919e809b8b609e1467b14d20a290aa7
> Author: Daniel Stone <daniel%fooishbar.org@localhost>
> Date:   Tue Jun 15 18:49:43 2010 +0100
> 
>     Delete now-redundant XKeysymDB
> 
>     Since XStringToKeysym now supports all the vendor keysyms, just delete
>     our XKeysymDB, which was incomplete at best, misleading at worst, and
>     always an annoyance.
> ```
> 
> and, that looks to be true from reading `libX11-1.8.8/src/StrKeysym.c' quickly.
> Don't know why it's still needed on NetBSD and why both
> 
> 	XStringToKeysym("XF86LogGrabInfo")
> and
> 	XStringToKeysym("XF86_LogGrabInfo")
> 
> don't return the same keysym when they should--according to the comments.
> They are equivalent on Linux and FreeBSD.
> 

It seems to me that when the XKeysymDB is not existing, it uses the
_XkeyTable generated by util/makekeys.c.

But if I read the code correctly, the problem is that util/makekeys.c
is retaining the prefix, that is the string is "XF86XK_" (with the trailing XK_) prefixed
and that does not match the strings passed.

This doesn't explain, though, why "XF86LogGrabInfo" and
"XF86_LogGrabInfo" return differing values (even supposing one comes
from XKeysymDB and the other from another source, if the different
strings are defined with the same val, how do they end up returning
differing values?).
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index