XCreateWindow position fail
Hi
XCreateWindow(display, RootWindow(display, screen_number), 100, 100,
640, 480, 0, XDefaultDepth(display, screen_number), InputOutput,
visual, attributemask, &attributes);
I am using Debian 3.1R3 with KDE, i try to use XCreateWindow to create
a window with a startup position 100,100, it is not working, the window
init position at 0,0
how to?
thanks
from Peter (cmk128@hotmail.com)
Re: XCreateWindow position fail
[email]cmk128@hotmail.com[/email] wrote:[color=blue]
> Hi
> XCreateWindow(display, RootWindow(display, screen_number), 100, 100,
> 640, 480, 0, XDefaultDepth(display, screen_number), InputOutput,
> visual, attributemask, &attributes);
>
> I am using Debian 3.1R3 with KDE, i try to use XCreateWindow to create
> a window with a startup position 100,100, it is not working, the window
> init position at 0,0
> how to?[/color]
hello
I remember, that the position values you specify in XCreateWindow () are
ignored by the most window managers. Because they have the control about
where and how to position windows.
btw: there exist a group called : comp.os.linux.x
hth
Marco
Re: XCreateWindow position fail
cmk128 wrote:
Please do not crosspost without setting followup. Corrected, Fup2cwx.
[color=blue]
> I am using Debian 3.1R3 with KDE, i try to use XCreateWindow to create
> a window with a startup position 100,100, it is not working, the window
> init position at 0,0
> how to?[/color]
The position is only a hint, the window manager can honour or ignore it.
Try static gravity for your window (then the position relates to your
window, not the decoration frame of the window manager) or setting the
override redirect attribute for your window (then your window will have no
decoration).
Daniel
Re: XCreateWindow position fail
[email]cmk128@hotmail.com[/email] wrote:
[color=blue]
> I am using Debian 3.1R3 with KDE, i try to use XCreateWindow to create
> a window with a startup position 100,100, it is not working, the window
> init position at 0,0
> how to?[/color]
After the XCreateWindow(), use XMoveWindow() to force it to a specific
position.