how do I get my Window id - Xwindows

This is a discussion on how do I get my Window id - Xwindows ; Hi! I have to manipulate a window what is created by proprietary code. As of this I do not know the Window ID of this window from creation. How do I get this? Is there something equivalent to a "void ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: how do I get my Window id

  1. how do I get my Window id

    Hi!

    I have to manipulate a window what is created by proprietary code. As
    of this I do not know the Window ID of this window from creation. How
    do I get this? Is there something equivalent to a "void
    GetMyID(*window);" thing?

    I am trying to find it in Xlib docs but to no avail - I've found
    interactive examples (like to catch a mouseevent), but I need a
    noninteractive one.

    Regards,
    HTE

  2. Re: how do I get my Window id

    In comp.windows.x, HTE

    wrote
    on 18 Aug 2003 07:57:34 -0700
    :
    > Hi!
    >
    > I have to manipulate a window what is created by proprietary code. As
    > of this I do not know the Window ID of this window from creation. How
    > do I get this? Is there something equivalent to a "void
    > GetMyID(*window);" thing?


    Pedant point: Window GetMyID(*window) is presumably what you meant.

    >
    > I am trying to find it in Xlib docs but to no avail - I've found
    > interactive examples (like to catch a mouseevent), but I need a
    > noninteractive one.
    >
    > Regards,
    > HTE


    XQueryTree() of the root might work but the main
    danger is that it returns all windows underneath, which
    might give one pause regarding sorting through them.
    Also, a modern window manager likes to reparent, which
    means one might get the windows from the window manager,
    not the windows actually wanted.

    XQueryPointer() returns the window under the pointer.
    This requires the pointer be over the window one wants.
    XWarpPointer() is considered bad form (it yanks the pointer
    away from the user, which may confuse him) but could be used
    in a pinch.

    Since you've not mentioned what '*window' is, I'm assuming
    it's a proprietary widget hierarchy of some sort. There
    is a possibility of getting the Window ID from that, if
    you've not already studied the documentation and/or
    #include files therefor. Xt Intrinsics provides a
    XtWindow(widget) but has fallen into disuse unless
    you're using Motif or Athena; neither Gtk nor Qt use it
    as a basis.

    --
    #191, ewill3@earthlink.net
    It's still legal to go .sigless.

  3. Re: how do I get my Window id

    The Ghost In The Machine wrote in message news:<8rk911-n54.ln1@lexi2.athghost7038suus.net>...

    > > I have to manipulate a window what is created by proprietary code. As
    > > of this I do not know the Window ID of this window from creation. How
    > > do I get this? Is there something equivalent to a "void
    > > GetMyID(*window);" thing?

    >
    > Pedant point: Window GetMyID(*window) is presumably what you meant.


    Sorry, it's a mistake. Either void GetMyID(Window *window) or
    Window[*] GetMyID(void) or such.

    > XQueryTree() of the root might work but the main
    > danger is that it returns all windows underneath, which
    > might give one pause regarding sorting through them.
    > Also, a modern window manager likes to reparent, which
    > means one might get the windows from the window manager,
    > not the windows actually wanted.


    Yes. This is one of the viable solution I could come up by reading the
    available Xlib docs. This is more ugly as it seem, since I have to
    change some of the available properties (like size, position) for a
    short time to be able to recognize the actual window. (As there are
    several processes with the same properties running, each has it's own
    window.)

    > XQueryPointer() returns the window under the pointer.
    > This requires the pointer be over the window one wants.
    > XWarpPointer() is considered bad form (it yanks the pointer
    > away from the user, which may confuse him) but could be used
    > in a pinch.


    Interesting idea. Maybe it the practice simpler than the previous.
    Saving cursorpos, yank, grab event, restore cursorpos... will try it
    later.

    > Since you've not mentioned what '*window' is, I'm assuming
    > it's a proprietary widget hierarchy of some sort. There
    > is a possibility of getting the Window ID from that, if
    > you've not already studied the documentation and/or
    > #include files therefor. Xt Intrinsics provides a
    > XtWindow(widget) but has fallen into disuse unless
    > you're using Motif or Athena; neither Gtk nor Qt use it
    > as a basis.


    Well, being vague is not a virtue. It goes like this: I have some
    Kylix application (C++ by K3). The Kylix is neat for most GUI stuff
    but I have to do some real-time videos and so far I am convinced that
    the best solution would be using Xv. For [nearly] every Xv call you
    need the Window id - something Kylix does not know about. (Or I were
    too quick to flip through the 1500+ page manuals they gave.)

    Actually any YUV420P (x30323449) accelerated overlay function would be
    sufficient - be it Xv or not, especially if it's hw accelerated. So
    far I still estimate that the display speed in itself will not be a
    problem, but just in case it will use a GF4 (where I420 is supposedly
    hw accelerated).

    Aside the rambling, I am still curious whats the idea behind this
    whole setup... I mean why I can not get my own Window id, while I can
    modify any other application just by knowing it's Window id. [Oh yeah,
    the newbies are here you see? ]

    Regards,
    HTE

+ Reply to Thread