Bug 169260 - Behaviour change after the first time you change difficulty
Summary: Behaviour change after the first time you change difficulty
Status: RESOLVED FIXED
Alias: None
Product: kblocks
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Mauricio Piacentini
URL:
Keywords:
: 169481 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-16 20:58 UTC by Richard Hartmann
Modified: 2009-03-27 03:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Hartmann 2008-08-16 20:58:29 UTC
Version:           0.1 (using 4.1.00 (KDE 4.1.0), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.26-1-686

Initially, when you enter any menu, the game will be paused automagically. As soon as you use the lower right difficulty selection to change the difficulty, this will no longer be the case.
Also, when trying to change the difficulty, kblocks will warn you after the first time you did it.
Comment 1 Mauricio Piacentini 2008-08-18 15:44:35 UTC
If a game is active, then KBlocks will always show the message when a new difficulty is selected. This is by design. If the game is not running, then the message will not be shown.
There is apparently a bug however in KGameDifficulty, in that paused games are considered finished. I will see if this can be changed, so this bug will remain opened for now.

As for the pause behavior, the game is also always paused when the window looses the focus, such as when a menu is selected. This is also by design, and it will be restored when the focus is restored.
Comment 2 Richard Hartmann 2008-08-20 14:07:15 UTC
Again, we are misunderstanding each other. Let me try to rephrase:

1) Start kblocks
2) Click on any menu item, game pauses. Click playing area to resume
3) Click outside of bklocks, game pauses. Click playing area to resume
4) Click lower right difficulty selection, game pauses.
5) Select different difficulty
6) Click on any menu item, game does _not_ pause
7) Click outside of kblocks, game does _not_ pause
8) Click lower right difficulty selection, game does _not_ pause

I split off the other issue into http://bugs.kde.org/show_bug.cgi?id=169481 to make tracking the individual issues easier :)
Comment 3 Dirk 2009-03-27 00:52:21 UTC
The first time after changing the difficulty the focusOutEvent from kblocksview doesn't get called. 
Without that the game cannot pause. 
After that everything is normal.
Comment 4 Mauricio Piacentini 2009-03-27 01:19:02 UTC
But is this a bug in KBlocks, or in KGameDifficulty, or in Qt? Did you manage to trace it?
Comment 5 Mauricio Piacentini 2009-03-27 03:40:13 UTC
*** Bug 169481 has been marked as a duplicate of this bug. ***
Comment 6 Mauricio Piacentini 2009-03-27 03:41:28 UTC
SVN commit 945173 by piacentini:

Thanks to Dirk Leifeld. This fixes one bug, but 
another one is identified and opened, related to the 
pause behavior
BUG:169260


 M  +1 -1      kblocksscene.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=945173