[gnome-mines] Do not save size when tiled.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Do not save size when tiled.
- Date: Mon, 16 Feb 2015 16:40:16 +0000 (UTC)
commit 1ffba87baf9a41c6002e6881e4f98d324021180d
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Feb 2 04:56:01 2015 +0100
Do not save size when tiled.
src/gnome-mines.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 1e5540f..58de877 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -54,6 +54,7 @@ public class Mines : Gtk.Application
private int window_width;
private int window_height;
private bool is_maximized;
+ private bool is_tiled;
/* true when the user has requested the game to pause. */
private bool pause_requested;
@@ -386,7 +387,7 @@ public class Mines : Gtk.Application
private void size_allocate_cb (Gtk.Allocation allocation)
{
- if (!is_maximized && !window_skip_configure)
+ if (!is_maximized && !is_tiled && !window_skip_configure)
{
window_width = allocation.width;
window_height = allocation.height;
@@ -399,6 +400,9 @@ public class Mines : Gtk.Application
{
if ((event.changed_mask & Gdk.WindowState.MAXIMIZED) != 0)
is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0;
+ /* We don’t save this state, but track it for saving size allocation */
+ if ((event.changed_mask & Gdk.WindowState.TILED) != 0)
+ is_tiled = (event.new_window_state & Gdk.WindowState.TILED) != 0;
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]