[Mono-list] pointer coordinates

Sven bender@impala.mine.nu
Wed, 19 May 2004 18:04:37 +0200


Hi!

I'm trying to find an easy way to retrieve the x and y coordinates for
the mouse pointer. I've tried this:

Screen scrn = Gdk.Screen.Default;
Display disp = scrn.Display;
disp.GetPointer (scrn, out x, out y, out mod);

It seems to work fine, but i get this message everytime i run it:

(TestingTesting:6309): Gdk-CRITICAL **: file gdkscreen-x11.c: line 122
(gdk_screen_get_display): assertion `GDK_IS_SCREEN (screen)' failed

It seems to me that I'm propably missing something important? If not,
are there some other more smarter ways to achive what I'm trying to do?

BR
/S