[gnome-sudoku/gnome-3-16: 13/14] Do not save size when tiled.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/gnome-3-16: 13/14] Do not save size when tiled.
- Date: Mon, 16 Feb 2015 21:13:18 +0000 (UTC)
commit 2af40bf179b88a9a6c6fe3b11af44f511eb04efa
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 49a02d8..1c37995 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;
@@ -234,7 +235,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;
@@ -244,6 +245,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]