window initial position
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > window initial position




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    window initial position  
hagit


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-07 12:21 AM

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.

To make it short: after the window is created I wait on its events
with XNextEvent() and sometimes I get the event of the correct window
location and sometime I dont get it (the location I get is in the left
corner of the screen and not in the updated location of the window)

How can I be sure the coor. I receive are the correct ones?
Any suggestion? Did I miss something?

Please help.
Thanks in advance.





[ Post a follow-up to this message ]



    Re: window initial position  
Måns Rullgård


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-07 12:21 AM

hagit <hagit_guy@hotmail.com> writes:

> [...]

Please do not multi-post.  I have already answered your question in
another group.

--
Måns Rullgård
mans@mansr.com





[ Post a follow-up to this message ]



    Re: window initial position  
lg..


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-07 06:24 PM

On Dec 26, 4:50 pm, hagit <hagit_...@hotmail.com> wrote:
> 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.
>
> To make it short: after the window is created I wait on its events
> with XNextEvent() and sometimes I get the event of the correct window
> location and sometime I dont get it (the location I get is in the left
> corner of the screen and not in the updated location of the window)
>
> How can I be sure the coor. I receive are the correct ones?
> Any suggestion? Did I miss something?
>
> Please help.
> Thanks in advance.

Could be that the window manager automatically displays it in other
position.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:11 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register