[Gambas-user] Trouble with X11.GetWindowProperty()
Martin Fischer
martin.fischer6 at web.de
Sun Sep 24 22:48:02 CEST 2023
Benoit,
I see.
For me, thats OK.
Thanks,
Martin
Am 24. September 2023 21:47:37 MESZ schrieb "Benoît Minisini" <benoit.minisini at gambas-basic.org>:
>Le 24/09/2023 à 21:34, Martin Fischer a écrit :
>> Hi fellow gambassins,
>>
>> I want to read the value of the WM_CLASS X11 atom by using
>> X11.GetWindowProperty(winId, "WM_CLASS")
>>
>> WM_CLASS is a string-atom, so GetWindowProperty should return a Variant
>> containing a String[] (one string for instanceName, one for className).
>>
>> BUT what I get is a Variant containing a single String that contains the
>> NULL bytes that terminate the C-strings.
>> In the debugger such a string (for the Firefox window) looks like:
>> "Navigator\x00firefox\x00"
>>
>> Now: is this a bug or a feature?
>>
>> Sure. I can read this string as stream like so:
>>
>
>It seems that the WM_CLASS property has a special format, as there are special dedicated X11 methods to read or write it.
>
>Apparently it's two null terminated strings sticked, the first one being the application class, the second one the application name.
>
>Regards,
>
>--
>Benoît Minisini.
>
>
>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230924/78c907f5/attachment.htm>
More information about the User
mailing list