Resource_base - Xwindows

This is a discussion on Resource_base - Xwindows ; Hi What is "resource base" ? On google I found that it "identifies client". Can someone shed more light on this please? How can I get application window XID from resource base? -- Regards Mariusz...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Resource_base

  1. Resource_base

    Hi
    What is "resource base" ? On google I found that it "identifies
    client". Can someone shed more light on this please? How can I get
    application window XID from resource base?

    --
    Regards
    Mariusz


  2. Re: Resource_base

    mg wrote:
    > Hi
    > What is "resource base" ? On google I found that it "identifies
    > client". Can someone shed more light on this please? How can I get
    > application window XID from resource base?
    >


    Consult the X sources.

    The answer is that it varies based on the number of clients.

    _XAllocID allocates XIDs using this:

    The dpy->resource_shift that is uses is based on the maximum number of
    clients for the X server (typically 256 IIRC). I think it's 9 bits
    usually. Consult the Xserver/dix/* code for more info.

    I have my window manager (Whim) optionally group windows by their
    resource base. I use the first 3 characters in the window-id, and
    search a list for similar windows on the same desktop. I find the base
    by using the lowest numeric id with the same 3 hexadecimal character
    prefix. It works quite well, especially with funky GTK+ apps that don't
    set WM_TRANSIENT_FOR.

    -GPS

+ Reply to Thread