PDA

View Full Version : XBMC traps mouse on display 1


babazoid
2007-08-29, 22:30
Hey folks,

I am running a dual head set up. I have just got XBMC working ALMOST perfectly. My last no-so-little detail is that when XBMC is full-screen on my HDTV I can't get the mouse back over to display 0. Anyone gotten around this or is this just something we have to live with for the time-being?

Thanks

dgege
2008-05-19, 00:44
I'm having the exact same problem! While searching, I came upon this post that has no fix :( So I'm bumping it, hoping someone can answer it!
So I start XBMC on my secondary display (:0.1) but it takes the mouse with it. I want it to leave the mouse alone (I control with my remote through LIRC).
Anyway I can do that?

dgege
2008-05-24, 06:32
I tried disabling the mouse support in xbmc but it still insists on moving the mouse to its display. This is a big problem in my setup :( I'm sitll hoping someone knows how I can disable that "feature"...

Topfs2
2008-05-24, 09:45
This is from what I know how SDL works (which we use for mouse and to create windows) and there's no way around this. I have tried to do something about it but all my searches have come up that it's no possible, although for those with dualscreen it would be good.

dgege
2008-05-24, 19:00
Damn, that sucks big time. I'll try and see if there's something I can figure out. Thing is, I don't need the mouse for xbmc (i even disable it in the settings).

Topfs2
2008-05-24, 20:30
I've put a question on SDL mailing list about it in case some off them knows anything about it, still I doubt it unfortunately.
Perhaps it's possible with a patch which they might point me to which we could use but don't get your hopes up :)

dgege
2008-05-24, 20:32
Hey, I just appreciate the effort :) Let us know either way.

dgege
2008-05-28, 08:30
I found an ugly (but working) hack while waiting for an official fix (hopefully!). I used the program switchscreen 0.1.1 (http://users.tkk.fi/~spniskan/switchscreen/) which letsyou switch the mouse between screens. You have to disable the window borders on XBMC (easily done with KDE) or else you'll see the title bar appear.
I hope that helps someone and I now have a fully working setup :) Finally!

bdallen
2008-06-27, 16:16
What about setting SDL_WM_GrabInput(SDL_GRAB_OFF)?

Topfs2
2008-07-01, 10:04
What about setting SDL_WM_GrabInput(SDL_GRAB_OFF)?

IIRC I tried that which didnt work, if you have it working then a patch would be most welcome, But only when the mouse isnt enabled or with an advanced setting IMO.

/Topfs2

bdallen
2008-07-03, 04:26
IIRC I tried that which didnt work, if you have it working then a patch would be most welcome, But only when the mouse isnt enabled or with an advanced setting IMO.

/Topfs2
Too bad - I wonder if it's the use of OpenGL? I can't find any calls to SDL_GrabInput(SDL_GRAB_ON), so I guess it makes since that calling GRAB_OFF doesn't work - some other mechanism is used to achieve a similar effect (unless a call to GrabInput is hiddin within another SDL call).

I'm going to try to create a simple shell that uses the same video and mouse access and has the same grabbing behavior, and then try to get free mouse working for that. Any recommendations on what files to look in? I've zeroed in on these so far:

SDL_Init in: xbmc/Application.cpp
Map SDL mouse to input layer API?: guilib/common/SDLMouse.cpp
Setting up GL surfaces through SDL in: guilib/Surface.cpp

Of course I could run XBMC in a separate X-session with no mouse device, but that wouldn't be inconvenient...