Re: decoding the wm-spec page...



On Sunday 05 September 2004 16:06, Michael Boccara wrote:
> Hi all,
>
> I'm new here.
> I am reading the following page:
> http://freedesktop.org/Standards/wm-spec/1.3/
>
> ... and I am trying to understand how to connect this doc with
> XGetWindowProperty 's man page.
>
> I am interested specially in the _NET_WM_WINDOW_TYPE and _NET_WM_STATE
> sections.
>
> For example:
>
> How should I use XGetWindowProperty, together with _NET_WM_WINDOW_TYPE and
> _NET_WM_WINDOW_TYPE_MENU, in order to know whether a window is a WM menu
> window ?

 The data in the property is an array of atoms specifying the window types 
(the real one and fallbacks). So for your specific case you just read the 
property, cast the data to long, and loop over it until you either find the 
atom value for the window type you want or until you reach the end of the 
data.

 If you grep for 'dirty & WMWindowType' in this file
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdecore/netwm.cpp?rev=1.136&content-type=text/x-cvsweb-markup , 
that's the KDE code for reading the _NET_WM_WINDOW_TYPE property, if that 
helps you. 'WMState' is for _NET_WM_STATE.

>
> How should I use XGetWindowProperty, together with _NET_WM_STATE and
> _NET_WM_STATE_HIDDEN, in order to get the window id of the maybe-iconic
> state of a hidden window ?

 What exactly is supposed to be 'window id of the maybe-iconic state'?

-- 
 Lubos Lunak
 KDE Developer



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]