Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: X11 resoulutions & mouse

  1. #1
    Guest

    X11 resoulutions & mouse

    hi there,
    I know, this is actually a more X11 related question than a gl-one, but I stll think that it could be of interest for many guys doing gl-linux-development.
    So here come those questions:

    1.) how to change the resulution of X11 ?
    2.) how to change the position of the mouse-courser ,
    and how to make it invisible?

    (actually 3 questions, oops
    I think the answers to this questions are really useful for everyone.

    Regards, abductee

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2000
    Posts
    16

    Re: X11 resoulutions & mouse

    Hi,

    Originally posted by abductee:

    1.) how to change the resulution of X11 ?
    2.) how to change the position of the mouse-courser ,
    and how to make it invisible?
    [/B]
    I have answers to 1.) and 2.1):

    1.) At least recent Xfree86 Xservers come with the XF86VidModeExtension which provides functions for changing resolutions. These are covered in the xfree86 api-reference...
    With other xservers i have no experience but they perhaps come with similar extensions...

    2.1) To move the mouse pointer you can use the function XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width, src_height, dest_x, dest_y).

    have fun...

    bxe Miq

  3. #3
    Guest

    Re: X11 resoulutions & mouse

    1st of all thanks miq
    here's the complete answer:

    include the XF86VidModeExtension (as miq told us before)
    and then you can use

    XF86VidModeGetAllModeLines

    to get all availible X-modes
    and then you can set one of these modes using

    XF86VidModeSwitchToMode

    Regards, abductee

    P.S. Still no Ideas about hiding the mouse-cursor ?

  4. #4
    Guest

    Re: X11 resoulutions & mouse

    More answers:
    for letting the cursor disappear:
    set a PixMapCursor with a "transparent" content.
    then use
    XDefineCursor(display,window,cursor);
    ..
    and don't forget to restore the old one before You quit
    XUndefineCursor(display,window);

    so, happy coding everyone

    Regards, abductee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •