<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Mar 4, 2010 at 12:20 PM, Shachar Shemesh <span dir="ltr">&lt;<a href="mailto:shachar@shemesh.biz">shachar@shemesh.biz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




  
  

<div dir="ltr" bgcolor="#ffffff" text="#000000"><div class="im">
Erez D wrote:
<blockquote type="cite">
  <div dir="ltr"><br>
  <br>
  <div class="gmail_quote">On Wed, Mar 3, 2010 at 5:05 PM, Shachar
Shemesh <span dir="ltr">&lt;<a href="mailto:shachar@shemesh.biz" target="_blank">shachar@shemesh.biz</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr" bgcolor="#ffffff" text="#000000">
    <div>Erez D wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">
      <div class="gmail_quote">
      <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>
        </font></blockquote>
      <div>when i write a program, i expect to get the same behaviour
which
doesn&#39;t depend on the WM.<br>
however: Traditional window managers reparent the window, and add the
titlebar to the parent.<br>
compize on the other hand doesn&#39;t reparent the window, so the behaviour
is different.<br>
      <br>
      </div>
      </div>
      </div>
    </blockquote>
    </div>
Yes, but that&#39;s avoiding Nadav&#39;s question, which was - why is this
something for the program to do?
    <div><br>
    </div>
    </div>
  </blockquote>
  <div>i have two displays i want one to be a copy of the other, so
when i move a window on one display, i want it to move to the same
position in the other. <br>
  </div>
  </div>
  </div>
</blockquote></div>
Then it seems to me that you are trying to move the wrong window. Why
not run XMoveWindow not on the window you opened, but walk up the
parents until you reach the window whose parent is root, and move that
one?</div></blockquote><div><br>if i put the parent at x,y -&gt; it will place it at x,y. but that not what i want.<br>if i put my original toplevel at x,y -&gt; i would expect it to be placed at x,y. but no, it places it&#39;s parent at x,y, which means it is placed in an offset. <br>

<br>the bottom line: it doesn&#39;t matter if i put my window at x,y or it&#39;s parent (that belongs to the WM) at x,y -&gt; i get the same result. which is not the result i want.<br><br>btw. if i use compiz - it doesn&#39;t have a parent. anyway, an app doesn&#39;t need to play it differently if it have or doesn&#39;t have a WM, or to be dependant on which WM it has.<br>

<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr" bgcolor="#ffffff" text="#000000"><div class="im"><br>
<br>
<blockquote type="cite">
  <div dir="ltr">
  <div class="gmail_quote">
  <div></div>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr" bgcolor="#ffffff" text="#000000">
    <div>
    <blockquote type="cite">
      <div dir="ltr">
      <div class="gmail_quote">
      <div>i woudld expext the folowing line:<br>
XTranslateCoordinates(...,win,root,0,0, &amp;x, &amp;y, ...) ;
XMoveWIndow(win,x,y)<br>
to do nothing.<br>
      </div>
      </div>
      </div>
    </blockquote>
    </div>
Then you would be wrong. The &quot;x, y&quot; are supposed to be relative to the
coordinate system in which the window reside. Even without the window
manager override, the above command would not work with reparented
windows.
    <div><br>
    </div>
    </div>
  </blockquote>
  <div>yes it will.<br>
  </div>
  </div>
  </div>
</blockquote></div>
Emmmm. No it won&#39;t?<br>
<br>
The x,y for a reparented window are relative to its parent. If you
treat them as relative to the root window, your XMoveWindow will,
almost always, move your window way too much to the right and down.<br>
<br>
And please, if you think differently, say why.</div></blockquote><div>because it tested it (with my code). <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div dir="ltr" bgcolor="#ffffff" text="#000000"><div class="im"><br>
<blockquote type="cite">
  <div dir="ltr">
  <div class="gmail_quote"><br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div dir="ltr" bgcolor="#ffffff" text="#000000"><font color="#888888"><br>
    </font></div>
  </blockquote>
  <div><br>
why are you so angry ? <br>
  </div>
  </div>
  </div>
</blockquote></div>
I&#39;m sorry if you got that impression. You come with the inside of the
problem which seems unsolvable, instead of explaining what you are
actually trying to do, which can be solved by different means. It can
get frustrating to try and help.<div class="im"><br></div></div></blockquote><div>ok, thanks anyway.<br>erez. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div dir="ltr" bgcolor="#ffffff" text="#000000"><div class="im">
<br>
Shachar<br>
<pre cols="72">-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a href="http://www.lingnu.com" target="_blank">http://www.lingnu.com</a>
</pre>
</div></div>

</blockquote></div><br></div>