Registered Member
|
Hi everyone!
At the moment i am playing the game Trine2 natively on Linux (yay!) but i have a certain problem with the window management: First my setup: KDE 4.9.5 on Kubuntu 12.10 Nvidia 313.18 2 Monitors side by side via Twin View. Trine2 works, i even managed to make it run semi-fullscreen on one monitor. Problem now is, that each time i move my mouse out of the gamewindow (and then click) the game pauses. This happens frequently. The game resumes as soon as i re-enter the game-window and click again. This is not an optimal solution and the game already crashed once when it could not resume. Unfortunately Trine does not let me run it properly as a true fullscreen-app (meaning to set it as "fullscreen" in Trine2's Option-menu). It then stretches over both monitors in a resolution with about 1024x768. Which is pretty ugly and hardly playable.. So my questions are: - How can i force a window in KDE4 to grab the mouse so that the pointer cannot leave it? OR - How can i force the mouse cursor to stay in a certain area indepentant of a target-application? (which would be my left monitor, say [0-1920, 0-1080] Best regards! Hauke |
KDE Developer
|
that's even more stupid than the flash player exiting fullscreen when losing focus.
Oh well, I don't see a solution to that problem. I don't think grabbing mouse pointer would help anything as it looks like it listens to mouse leave events. What you could try is running it in a Xephyr session, you could create a Xephyr window which has the same size as the game window. That way it should never notice when the mouse leaves the window. |
Registered Member
|
Hi thanks for your answer. Yeah, that flashplayer-thing is pretty weird, too
My problem now is when i open a Xephyr-window and use shift+ctrl to grab keyboard/mouse they are not avaible for Trine2 to use. The options i used were: Xephyr :1 -ac -br -screen 1920x1080 How can i use Xephyr as a barrier without it having grab my mouse? Thanks in advance! |
KDE Developer
|
maybe you need to start a window manager in Xephyr?
|
Registered Member
|
Hi!
I managed to start openbox inside Xephyr......Problem now seems to be that Xephyr does not have proper GLX (which steam needs) - it only has software rendering, which is not enough for a 3D-Game. Guess i'll just go back to booting my Windows for Trine2 then Thanks for your time and patience! |
|
Sounds more like the game would pause whenever the window looses the input focus (can you alt+tab away?)
Preventing a window from loosing the input focus is not possible (would probably be abused immediately), just like forcing a certain window to grab the mouse is not (mouse is grabbed by client, ie process, not window), but unless trine grabs the pointer, it is possible to a) constrain the mouse into a certain area b) place a window under the trine window which does not accept focus (so whenver you click there, the focus remains at trine) Taking (a) more interesting, i could hack a Qt application to do that in no time if you can compile it Also there's [1] and [2] (latter invokes xdotool to do this, no compile, but likely more sys loading) [1] http://www.cs.kent.ac.uk/~sm244/Jail.tar.gz [2] http://pastebin.com/SuQrcSx0 |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft