[Kde-games-devel] Review Request 109475: Pause Kbounce game when focus is lost

Ashwin Rajeev ashwin_rajeev at hotmail.com
Thu Mar 14 21:49:44 UTC 2013



> On March 14, 2013, 6:46 p.m., Albert Astals Cid wrote:
> > mainwindow.cpp, line 263
> > <http://git.reviewboard.kde.org/r/109475/diff/2/?file=119698#file119698line263>
> >
> >     Do we really need this one here? Shouldn't the one in KBounceGameWidget::focusOutEvent  be enough?
> 
> Ashwin Rajeev wrote:
>     The game wont pause if the focus was in KBounceMainWindow and not in KBounceGameWidget.(click near toolbar and then click outside)
> 
> Albert Astals Cid wrote:
>     That's because you specifically filter them out at if (event->reason() == Qt::ActiveWindowFocusReason), no?
>     
>     Why you need that?
> 
> Ashwin Rajeev wrote:
>     Else it will also pauses if clicked near toolbar
> 
> Albert Astals Cid wrote:
>     You lost me now, you've given me the same example "click near toolbar" for needing the code in KBounceMainWindow::focusOutEvent and for needing the else in KBounceGameWidget::focusOutEvent, aren't you contradicting yourself?

In first case without KBounceMainWindow::focusOutEvent game wont pause if click near toolbar and then click outside.
In second case the games pauses if clicked in toolbar. Also it will pause on mouse click inside KBounceGameWidget if previous focus was not in KBounceGameWidget and in KBounceMainWindow


- Ashwin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109475/#review29221
-----------------------------------------------------------


On March 14, 2013, 7:16 a.m., Ashwin Rajeev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109475/
> -----------------------------------------------------------
> 
> (Updated March 14, 2013, 7:16 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Description
> -------
> 
> The game will be paused when Mainwindow loses focus or when menubar is clicked.
> 
> 
> Diffs
> -----
> 
>   gamewidget.cpp e0bbb86 
>   mainwindow.cpp f39ad6e 
>   gamewidget.h 91f3642 
> 
> Diff: http://git.reviewboard.kde.org/r/109475/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ashwin Rajeev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130314/02e9efa8/attachment.html>


More information about the kde-games-devel mailing list