How do I get the Wine *WINDOW* to grab control of my mouse?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
lostandfound
Level 2
Level 2
Posts: 20
Joined: Sun Oct 05, 2008 7:38 am

How do I get the Wine *WINDOW* to grab control of my mouse?

Post by lostandfound »

Hi,

For some (most?) games the screen edges are used for scrolling/turning, etc. Running them in Wine is no problem in full-screen, but in Windowed mode the mouse just moves off, and if the mouse has been 'jerked' fast enough, it is left within the window some distance away from the screen edge. Meaning the window doesn't scroll/your character doesn't turn.

Is there any way for Wine itself to grab the mouse such that it cannot escape the Wine window? Dosbox does this, for example, and a certain key combination releases the lock.

I know that there's a "allow DirectX app to stop the mouse leaving their window" option, but most games won't be run using DirectX because of speed issues, and it doesn't work, for example, when running Warcraft III in OpenGL.

Thanks for the help
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How do I get the Wine *WINDOW* to grab control of my mou

Post by vitamin »

lostandfound wrote:I know that there's a "allow DirectX app to stop the mouse leaving their window" option
This option been broken for past 5 years you can ignore it.

Wine does not grab pointer(XGrabPointer) so there is no way to prevent it from leaving Wine window.
lostandfound
Level 2
Level 2
Posts: 20
Joined: Sun Oct 05, 2008 7:38 am

Re: How do I get the Wine *WINDOW* to grab control of my mou

Post by lostandfound »

Ah, I was afraid of that :( .

Seems like it would be pretty useful for windowed games at least. Should I file a bug/improvement report against this? It affects people who use dual/more-screen setups, even a fullscreen game will have one 'side' which can't be scrolled into. It also affects older games which can't be played in widescreen and are being played on a widescreen monitor, when the mouse goes into the 'dead' area.
M.Kiesel

How do I get the Wine *WINDOW* to grab control of my mouse?

Post by M.Kiesel »

On Fri, 12 Dec 2008, lostandfound wrote:
For some (most?) games the screen edges are used for scrolling/turning,
etc. Running them in Wine is no problem in full-screen, but in Windowed
mode the mouse just moves off, and if the mouse has been 'jerked' fast
enough, it is left within the window some distance away from the screen
edge. Meaning the window doesn't scroll/your character doesn't turn.
See
http://bugs.winehq.org/show_bug.cgi?id=6971#c172
- this is the second most popular bug in Wine. :-)

Someone should change the bug's description to better reflect that it also
refers to "edge-scrollers".

Regards
lostandfound
Level 2
Level 2
Posts: 20
Joined: Sun Oct 05, 2008 7:38 am

Re: How do I get the Wine *WINDOW* to grab control of my mou

Post by lostandfound »

M.Kiesel wrote: See
http://bugs.winehq.org/show_bug.cgi?id=6971#c172
- this is the second most popular bug in Wine. :-)

Someone should change the bug's description to better reflect that it also
refers to "edge-scrollers".

Regards
Thanks, I did see that bug before but didn't think it referred to the same thing. After all their problem is that the mouse is not warped to always be in the middle of the screen, not that the mouse should be constrained not to cross the edge of the screen.

Anyway, I worked out a workaround. Wrote a HOWTO for that here, http://ubuntuforums.org/showthread.php?t=1011515
Locked