
Getting display under Linux
Posted Wednesday, 9 November, 2011 - 22:34 by makeout inHi guys,
I need to use XWarpPointer in my game. To do this, I need to get the game's display.
I was wondering if it's possible to get the Display from a GameWindow?
From my understanding, the WindowInfo is what I'm looking for. But there doesn't seem to be a way to use X11WindowInfo. There's no reference in the dll. Am I missing something?


Comments
Re: Getting display under Linux
The latest nightly build supports pointer warping in a cross-platform manner (check out the methods in OpenTK.Input.Mouse). This will be part of the upcoming 1.1 release.
There is no supported way of retrieving the display connection. The information is stored in GameWindow.WindowInfo, so you could use reflection to access it (check the source for X11WindowInfo), but I would advise against that approach.
Re: Getting display under Linux
Thanks for the reply.
I tried using a nightly build but I still can't get it to work.
Do I need build Opentk.dll under Linux for it to work?
Re: Getting display under Linux
Alright I sorted it out. It was obviously my mistake.