[gnome-sudoku] Do not save size when tiled.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku] Do not save size when tiled.
- Date: Mon, 2 Feb 2015 03:06:05 +0000 (UTC)
commit d041d77fa40c568e52547d902268753b75287b41
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Jan 31 13:27:03 2015 +0100
Do not save size when tiled.
src/gnome-sudoku.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index feae0bc..555cdfa 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -25,6 +25,7 @@ public class Sudoku : Gtk.Application
{
private GLib.Settings settings;
private bool is_maximized;
+ private bool is_tiled;
private int window_width;
private int window_height;
private Gtk.Button play_pause_button;
@@ -244,7 +245,7 @@ public class Sudoku : Gtk.Application
private void size_allocate_cb (Allocation allocation)
{
- if (is_maximized)
+ if (is_maximized || is_tiled)
return;
window_width = allocation.width;
window_height = allocation.height;
@@ -254,6 +255,9 @@ public class Sudoku : 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]