After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741718 - Use click-released instead of click to show the mines
Use click-released instead of click to show the mines
Status: RESOLVED FIXED
Product: gnome-mines
Classification: Applications
Component: general
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-mines-maint
gnome-mines-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-18 13:15 UTC by medeoTL
Modified: 2015-11-04 07:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.12 KB, patch)
2015-10-31 11:08 UTC, Isaac Lenton
committed Details | Review

Description medeoTL 2014-12-18 13:15:24 UTC
When i play gnome-mines I sometimes click on a tile, then discover there is a mine there and move the mouse away in a safe place (i.e. a free tile), then release the mouse button.

Expected behavior:
Nothing happen: I'm free. I'm safe. I can continue my journey on the magic world of gnome-mines.

Actual behavior:
Gnome-mines doesn't care of my repentance and even if i've moved away from the evil-tile-with-a-mine-inside(TM) it show the mine and put the game-over screen in top of my astonished face.

HELP!
Comment 1 Garrick 2015-03-19 17:17:56 UTC
Fedora21, Gnome-Mines: 3.14.1
Per your title, I don't think the tile should be SHOWN before click+release, when it is marked 'active'; no sneak previews! This is how it is working for me, so I'm not experiencing your bug. (Otherwise I'm willing to look at it). As to click+drag:

(My)Expected Behavior: 
"The user changed their mind" and clicked the wrong tile. If Click+Drag+Release,  don't activate any tile. Don't show the contents of any tile.

Actual Behavior:
The original clicked tile is still activated on release.

Actual Behavior: Mines2.30.2, Gnome2.30.2
After Click+Drag+Release, the final tile under the mouse before release is activated. (This still applies if mouse is dragged off window entirely).
Comment 2 medeoTL 2015-03-19 19:10:32 UTC
Yeah Garrick, my expected behavior is similar to your and it's the reason why I've filed this bug.
With "discover there is a mine there" I mean "I understand that click that tile is wrong because there is an HIDDEN mine down".

Sorry for my bad english.
Comment 3 Garrick 2015-03-19 20:35:39 UTC
@medeoTL, no worries, I misunderstood what you meant but your English is very good. :)  I'm going to take a quick look at this.
Comment 4 Isaac Lenton 2015-10-31 11:08:16 UTC
Created attachment 314533 [details] [review]
Proposed patch

This seems to have been a regression.  There was already code to implement the desired functionality.  It seems that Gdk grabs event focus for the clicked button.

The attached patch implements functionality for only revealing tiles when the mouse button is released above the same tile.  If the mouse is moved outside the square the operation is cancelled.
Comment 5 Robert Roth 2015-11-03 13:50:49 UTC
Review of attachment 314533 [details] [review]:

The patch looks ok, and it indeed fixes the problem by only revealing the tile if mouse is pressed and released over the same tile.
Comment 6 Robert Roth 2015-11-04 07:29:42 UTC
Thanks for the patch, committed, and being a bugfix, should appear in 3.18.2 next week.