XCreateWindow position fail - Linux

This is a discussion on XCreateWindow position fail - Linux ; 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, ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: XCreateWindow position fail

  1. 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)


  2. Re: XCreateWindow position fail

    cmk128@hotmail.com wrote:
    > 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?


    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

  3. Re: XCreateWindow position fail

    cmk128 wrote:

    Please do not crosspost without setting followup. Corrected, Fup2cwx.

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


    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

  4. Re: XCreateWindow position fail

    cmk128@hotmail.com wrote:

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


    After the XCreateWindow(), use XMoveWindow() to force it to a specific
    position.


+ Reply to Thread