Bug #281

Unimplemented methods in openGL driver under linux

Added by kishan over 9 years ago. Updated almost 8 years ago.

Status:Closed Start date:01/11/2009
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:OS: GNU/Linux
Target version:Version 0.7.0

Description

Some methods of the openGL driver are not implemented under Linux.
They are generally denoted by "TODO for Linux".

unimplemented_methods_linux.diff - implementation of getCurrentScreenMode() and adding some TODO (2.5 kB) Magnifier kishan, 01/11/2009 08:20 pm

setCapture.diff - implementation of setCapture(bool b) (8.2 kB) Magnifier kishan, 06/07/2009 05:26 pm

set_capture.c - simple XGrabPointer() test application. Compile with gcc -lX11 set_capture.c (2 kB) Magnifier Spex, 09/06/2009 01:35 am

History

#1 Updated by kishan over 9 years ago

  • Category set to 3d - OpenGL

#2 Updated by kervala over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r752.

#3 Updated by kervala over 9 years ago

  • Assignee set to kishan
  • Target version set to Version 0.7.0

#4 Updated by sfb over 9 years ago

  • Status changed from Resolved to Assigned

setCapture still needs to be implemented.

#5 Updated by kishan over 9 years ago

sfb wrote:

setCapture still needs to be implemented.

I have begun to implement it. I have strange things with the window position. I go on it asap.

#6 Updated by kishan about 9 years ago

The setCapture() now works fine. The XGetWindowAttributes does not seem to give the window position correctly I did not understood why. Anyway, I retrieved it from the "Configure" events (move/resize window) to know how to move the mouse when it goes outside of the window.

#7 Updated by Spex about 9 years ago

kishan wrote:

The setCapture() now works fine. The XGetWindowAttributes does not seem to give the window position correctly I did not understood why. Anyway, I retrieved it from the "Configure" events (move/resize window) to know how to move the mouse when it goes outside of the window.

Why don't you use XGrabPointer() for pointer confinement?

#8 Updated by Spex almost 9 years ago

Made a small test program which relies on XGrabPointer (see attachments for set_capture.c, compile with gcc -lX11 set_capture.c). Enter-key changes between grabbed and ungrabbed pointer state, Escape (or click on window close button / "(X)") exits the program). Also note, that the example application doesn't hide the standard cursor nor implements a user defined cursor, which may or may not affect the outcome.

I have to test it on more platforms, but so far XGrabPointer works fine. The used window manager has an effect on the outcome, i.e. with a window size of 640x480, fvwm2 gave coordinates from (0,0) to (639,479), while awesome returned (-1,-1) to (640,480). Tests with other window managers are open, still, but I guess they will give similar results. Tests with multiscreen etc. are left open, too. A non-working XGrabPointer is most likely a window manager issue, and should be reported as such; I don't see any reason to implement the setCapture() method any more complicated than necessary, unless it doesn't work properly with a hidden/"soft-cursor" replacement.

#9 Updated by sfb almost 9 years ago

  • Status changed from Assigned to Resolved

Applied in changeset r1718.

#10 Updated by sfb almost 9 years ago

  • Status changed from Resolved to Closed

I'm going to call this good. Testing on a couple platforms revealed that XGrabPointer and XUngrabPointer works on the common distributions default Window Managers but that the Window Manager itself can override this behavior. Kishan's patch with the events works around this but after discussion we decided that coding around the short-comings of uncommon upstream window managers is a wasted endeavor.

This is tested and working on Fedora and Ubuntu at this point in time. Tested with Snowballs.

Thank you Kishan and Spex!

#11 Updated by kervala almost 8 years ago

  • Project changed from NeL to Ryzom
  • Category deleted (3d - OpenGL)
  • Target version deleted (Version 0.7.0)

#12 Updated by kervala almost 8 years ago

  • Category set to OS: GNU/Linux
  • Assignee deleted (kishan)
  • Target version set to Version 0.7.0

Also available in: Atom PDF