makeout's picture

Getting display under Linux

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


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

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.

makeout's picture

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?

makeout's picture

Alright I sorted it out. It was obviously my mistake.