Re: window initial position



hagit <hagit_guy@xxxxxxxxxxx> writes:

Hi all,

I had noticed very strange behaviour while trying to get the x,y coor.
of a created window.
I use the standard XCreateSimpleWindow(...) library call to create my
window - right after I create it - I "Map" it using XMapWindow().
Now, all I want is to query the created window's initial x,y coor. -
and for this I use XTranslateCoordinates(). For some reason sometimes
the x,y coor. I receive differ from the window's actual position.

Also, after creating the window and querying its initial location I
subscirbe to its events - I had noticed that sometimes the window
receives a non-interactive initial move event (which I don't always
catch) - that changes its original initial location.

That would be the window manager reparenting your window into the
decoration window. If you select the proper event mask
(StructureNotifyMask?) before mapping the window, you should get all
notifications.

That said, you should probably think again about why you need to know
the location of the window. A well-behaved application should not
normally care where its windows are.

--
Måns Rullgård
mans@xxxxxxxxx
.



Relevant Pages

  • Re: window initial position
    ... I had noticed very strange behaviour while trying to get the x,y coor. ... I use the standard XCreateSimpleWindowlibrary call to create my ... after creating the window and querying its initial location I ...
    (comp.graphics.api.opengl)
  • Re: window initial position
    ... I had noticed very strange behaviour while trying to get the x,y coor. ... I use the standard XCreateSimpleWindowlibrary call to create my ... after creating the window and querying its initial location I ... with XNextEventand sometimes I get the event of the correct window ...
    (comp.windows.x.motif)
  • window initial position
    ... I had noticed very strange behaviour while trying to get the x,y coor. ... I use the standard XCreateSimpleWindowlibrary call to create my ... after creating the window and querying its initial location I ... with XNextEventand sometimes I get the event of the correct window ...
    (comp.os.linux.development.apps)
  • window initial position
    ... I had noticed very strange behaviour while trying to get the x,y coor. ... I use the standard XCreateSimpleWindowlibrary call to create my ... after creating the window and querying its initial location I ... with XNextEventand sometimes I get the event of the correct window ...
    (comp.unix.programmer)
  • window initial position
    ... I had noticed very strange behaviour while trying to get the x,y coor. ... I use the standard XCreateSimpleWindowlibrary call to create my ... after creating the window and querying its initial location I ... with XNextEventand sometimes I get the event of the correct window ...
    (comp.graphics.api.opengl)