Hello all, I was very pleased to find that Age of Empires II works so well in wine. Now, one hobby of mine is to create custom AI scripts for the game (see www.aiscripters.com for examples), and let different scripts (mine and other people's) play against each other, mostly unattended. The problem is, that the running AoEII game still tracks the position of the mouse pointer whenever I move the mouse (and focus) away from the wine window. The game view then scrolls to show just one black corner of the map which is not very informative or entertaining. Therefore, in this use case, I'd prefer to let the pointer position to be reported to the game "as a constant" (preferably the center of the wine window) while the focus is away from the game. Can this be done without tweaking wine source code, for example with some X window manager (btw. I use fvwm) mechanism, or by some already existing wine configuration means? Or, if tweaking of wine code is needed... I'm no X11 guru but started to educate myself by compiling both wine 1.0 and 1.1.3... but noticed that there's quite a lot of stuff to delve in there ... So I'd be grateful if anyone knowledgeable could evaluate this whole idea and maybe jump-start me a bit by pointing me to the right source files? Or, in your opinion, does such functionality belong elsewhere -- like in the window manager -- rather than in wine? Or, could my configuration be somehow erratic and this out-of-focus "mouse tracking" doesn't happen anywhere else? --laut
vitamin
2008-Sep-02 13:30 UTC
[Wine] Re: Disabling mouse tracking when X11 focus leaves wine?
laut wrote:> The problem is, that the running AoEII game still tracks the position of the mouse > pointer whenever I move the mouse (and focus) away from the wine window. > The game view then scrolls to show just one black corner of the map > which is not very informative or entertaining. > > Therefore, in this use case, I'd prefer to let the pointer position to be reported > to the game "as a constant" (preferably the center of the wine window) > while the focus is away from the game. > > Can this be done without tweaking wine source code,No, you have to modify Wine code for this.
vitamin
2008-Sep-04 16:41 UTC
[Wine] Re: Disabling mouse tracking when X11 focus leaves wine?
felix wrote:> > Does that also remain true if you Alt+Tab focus away from the wine > window? or does it continue to get mouse movement updates once focus is > gone?Wine does not send any updates because it does not receive any. But program can always request current cursor position. And Wine will report it, clamped to the Wine window coordinates. Also don't forget that if you running virtual desktop programs might not ever loose focus. This is a bug and a feature.