[gnome-klotski] Do not save size when tiled.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-klotski] Do not save size when tiled.
- Date: Mon, 2 Feb 2015 03:49:49 +0000 (UTC)
commit a27ad9a54d58970b34f602ed3afdb9ebc15e24d1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Feb 2 04:47:08 2015 +0100
Do not save size when tiled.
src/gnome-klotski.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-klotski.vala b/src/gnome-klotski.vala
index 4178d5b..4d8717d 100644
--- a/src/gnome-klotski.vala
+++ b/src/gnome-klotski.vala
@@ -32,6 +32,7 @@ public class Klotski : Gtk.Application
private int window_width;
private int window_height;
private bool is_maximized;
+ private bool is_tiled;
private Gtk.Box puzzles_panel;
@@ -693,7 +694,7 @@ public class Klotski : Gtk.Application
private void size_allocate_cb (Gtk.Allocation allocation)
{
- if (is_maximized)
+ if (is_maximized || is_tiled)
return;
window_width = allocation.width;
window_height = allocation.height;
@@ -703,6 +704,9 @@ public class Klotski : 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]