[Kde-games-devel] Handling "mouse pointer goes away" in KGoldrunner

Mauricio Piacentini piacentini at kde.org
Mon Jul 13 06:09:03 CEST 2009


On Mon, Jul 13, 2009 at 12:59 AM, Ian Wadham<ianw2 at optusnet.com.au> wrote:
> This problem has been nagging me for about 7 years ...
>
> If someone is playing KGoldrunner and moves the mouse
> away from the playing area, either:
>
>   - into KGoldrunner's border area,
>   - onto the desktop area around the KGoldrunner window,
>   - into another window,
>   - using things like Alt+Tab,
>   - or switching to another desktop completely, ... etc.
>
> the game animation goes on running and "follows" the mouse,
> almost inevitably with disastrous results for the hero.
>
> So how can I detect *all* cases where something like the
> above occurs, so that KGr can temporarily freeze the
> animation (e.g. as it does during dialogs and messages)?

Hum.... I will try a very quick suggestion, untested. Have you
experimented with these?

http://doc.trolltech.com/4.5/qwidget.html#mouseTracking-prop
http://doc.trolltech.com/4.5/qwidget.html#grabMouse

Maybe you could use these and only act on mousemove events you receive
explicitally after mouse tracking is enabled?

Regards,
Mauricio Piacentini


More information about the kde-games-devel mailing list