Author Topic: Mouse problem  (Read 4374 times)

asc

  • Posts: 7
  • Turrets: +0/-0
Mouse problem
« on: December 02, 2007, 04:47:15 pm »
I have recently encountered a peculiar issue which is somehow related to using multiple monitors. I've been using two monitors for a number of months with no problems, but after changing my configuration (swapping out the CRT for a non-grody monitor) I became unable to use the mouse.

When I start the game, the cursor is in the upper left hand corner of the screen; if I move the mouse at all, it disappears. It is not just invisible, as I am unable to highlight navigation items. If I join a game (using the keyboard to navigate) then upon moving the mouse, the camera points down and spins rapidly. The keyboard and mouse buttons work normally.

This problem is easily fixed by disabling the second monitor and restarting X; however, it would be nice not to have to do this. If anybody can help, it would be greatly appreciated.

OS: Ubuntu 7.10
Game version: The one from http://tremulous.tjw.org/backport/linux/ (upgrading from the version in repositories did not help)
xorg.conf files: http://pastebin.com/m654a4cf1 (both monitors) http://pastebin.com/m76a1f169 (one monitor)

ams

  • Posts: 4
  • Turrets: +1/-0
Re: Mouse problem
« Reply #1 on: December 17, 2007, 08:41:19 pm »
I'm experiencing the same problem with dual monitor setup.

Seems like SDL (the game input/graphics library trem uses) messes up the motion events when using SDL_WM_GrabInput(SDL_GRAB_ON) to capture mouse events. It works ok as long as that setting is left disabled. This is most likely a bug in the SDL lib or the backend it uses.

Caveman

  • Guest
Re: Mouse problem
« Reply #2 on: December 18, 2007, 12:07:13 pm »
Downgrade SDL by one minor number :)

ams

  • Posts: 4
  • Turrets: +1/-0
Re: Mouse problem
« Reply #3 on: December 27, 2007, 04:56:54 am »
I finally found a way to fix the input problem.

Run the following command before running tremulous (or any other sdl using game):
Code: [Select]
export SDL_VIDEO_X11_DGAMOUSE=0

asc

  • Posts: 7
  • Turrets: +0/-0
Re: Mouse problem
« Reply #4 on: December 29, 2007, 11:17:49 am »
Hey, nifty. Thanks a lot. *platonic hug*

blubman

  • Posts: 6
  • Turrets: +0/-0
Re: Mouse problem
« Reply #5 on: May 01, 2008, 07:53:02 pm »
Iv got this problem aswell, but that code doesnt seem to fix it...

cef

  • Posts: 1
  • Turrets: +0/-0
Re: Mouse problem
« Reply #6 on: June 07, 2008, 03:09:44 am »
I finally found a way to fix the input problem.

Run the following command before running tremulous (or any other sdl using game):
Code: [Select]
export SDL_VIDEO_X11_DGAMOUSE=0

You can also add the following to your xorg.conf (the subsection bit is the important part, but it goes in the "Module" section). This disables the DGA mouse extension in xorg, which I've not missed at all since doing it myself.
Code: [Select]
Section "Module"
    ...
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    ...
EndSection

Note: I tripped over this as a resolution for plain mouse weirdness with the effects of variable lag and occasional backwards behaviour, particularly with the mouse scroll wheel under Xorg 7.3. Note that I was NOT using multiple monitors.

PS: Credit goes to lloeki on the ArchLinux forums for his post in the thread: http://bbs.archlinux.org/viewtopic.php?id=43873