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

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

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 ?

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