[gnome-mines] Fix resizing issue when switching from large minefield to small.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Fix resizing issue when switching from large minefield to small.
- Date: Sat, 17 Aug 2013 20:02:14 +0000 (UTC)
commit 8ca806059ba8ce4159284852bc5cb2fa33f018bb
Author: Isaac Lenton <isaac isuniversal com>
Date: Sun Feb 17 03:44:38 2013 +1000
Fix resizing issue when switching from large minefield to small.
https://bugzilla.gnome.org/show_bug.cgi?id=678268
src/gnome-mines.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index e70807f..984917f 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -47,6 +47,9 @@ public class Mines : Gtk.Application
/* true when the user has requested the game to pause. */
private bool pause_requested;
+
+ /* true when the next configure event should be ignored. */
+ private bool window_skip_configure;
/* Game history */
private History history;
@@ -367,12 +370,14 @@ public class Mines : Gtk.Application
private bool window_configure_event_cb (Gdk.EventConfigure event)
{
- if (!is_maximized && !is_fullscreen)
+ if (!is_maximized && !is_fullscreen && !window_skip_configure)
{
window_width = event.width;
window_height = event.height;
}
+ window_skip_configure = false;
+
return false;
}
@@ -559,6 +564,7 @@ public class Mines : Gtk.Application
new_game_screen.show ();
flag_label.set_text("");
set_face_image (smile_face_image);
+ window.resize (window_width, window_height);
new_game_action.set_enabled (false);
repeat_size_action.set_enabled (false);
@@ -570,6 +576,7 @@ public class Mines : Gtk.Application
{
is_new_game_screen = false;
custom_game_screen.hide ();
+ window_skip_configure = true;
minefield_view.show ();
minefield_view.has_focus = true;
new_game_screen.hide ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]