Erez D wrote:


On Wed, Mar 3, 2010 at 5:05 PM, Shachar Shemesh <shac...@shemesh.biz <mailto:shac...@shemesh.biz>> wrote:

    Erez D wrote:


    when i write a program, i expect to get the same behaviour which
    doesn't depend on the WM.
    however: Traditional window managers reparent the window, and add
    the titlebar to the parent.
    compize on the other hand doesn't reparent the window, so the
    behaviour is different.

    Yes, but that's avoiding Nadav's question, which was - why is this
    something for the program to do?

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.
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?

    i woudld expext the folowing line:
    XTranslateCoordinates(...,win,root,0,0, &x, &y, ...) ;
    XMoveWIndow(win,x,y)
    to do nothing.
    Then you would be wrong. The "x, y" 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.

yes it will.
Emmmm. No it won't?

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.

And please, if you think differently, say why.



why are you so angry ?
I'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.

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to