LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-29-2006, 11:27 PM   #1
FnordPerfect
Member
 
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Rep: Reputation: 15
[X11] How to get mouse movement back after SDL crash


Hello everybody,

this one is bugging me for ages now, but I have never stumbled upon a solution:

From time to time a fullscreen SDL application crashes or hangs and has to be killed. However, afterwards I often cannot move the mouse cursor anymore and sometimes cannot change resolution with Ctrl-'+' / Ctrl-'-'

What I do as a workaround is to start another SDL application which graps the mouse, and quit it sanely.
But is there a proper way to let X reassign the Pointer device or whatever?

I played around with xsetpointer, but could not let it do something useful.

Thanks again

fabian
 
Old 12-30-2006, 01:26 AM   #2
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 31
This is probably because SDL still has a hold on the mouse, despite the fact that you killed the app. xsetpointer will have no effect if this is the case, because SDL is still interfering with the pointer. You may have to look at the running processes and kill any SDL-related programs that may still be running, and/or restart X. Make sure to file a bug report against the unstable app.
 
Old 12-30-2006, 11:27 PM   #3
FnordPerfect
Member
 
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Original Poster
Rep: Reputation: 15
Yeah, that's the problem. But I am sure there are no other processes running which utilize SDL.
So I guess when the application crashed it had still grabbed the mouse, but without calling SDL_Quit() it stays that way and X does not care to re-grab it without being told so.

Restarting X is not necessary, since everything is fine after I started another SDL app as a workaround.

Maybe I'll just hack together a small C program which does nothing but initializing SDL, grabbing the mouse, relasing it and quitting sanely.
I am not a programmer at all, but I had a look at a tutorial and it didn't look to hard...

Anyway, if there is a prober way to solve that with X11's own utilities, I'd like to know it!

cheers
fabian
 
Old 12-31-2006, 12:52 AM   #4
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 31
Unfortunately, running a program that starts and sanely stops SDL *is* the "proper" way to fix this--SDL's lock on the pointer involves a lot of low-level system interfacing that X was never designed to know to repair in the event of a crash, and only a call to SDL_Quit() can undo SDL's interference (short of killing X). Again, make sure to file a bug report with the developers so they can fix this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse movement idgeitman Mandriva 3 09-30-2006 03:46 AM
Mouse pointer - no movement Twister512 Slackware 5 05-23-2006 04:07 PM
My mouse movement ><!! Whereeeeee codvx Slackware 2 04-18-2006 03:38 AM
erratic mouse movement jnev Ubuntu 2 12-22-2005 04:20 PM
error message: Couldn't initialize SDL: Found no sufficiently capable X11 visuals JimBass Linux - Software 2 03-05-2004 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration