[quadrapassel] Do not save size when tiled.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel] Do not save size when tiled.
- Date: Mon, 2 Feb 2015 04:15:05 +0000 (UTC)
commit 31d0899a4a9f414db1e74ab6a3c495b04ea30ea2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Feb 2 05:11:57 2015 +0100
Do not save size when tiled.
src/quadrapassel.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 5885cfb..80de027 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -18,6 +18,7 @@ public class Quadrapassel : Gtk.Application
private int window_width;
private int window_height;
private bool is_maximized;
+ private bool is_tiled;
/* Game being played */
private Game? game = null;
@@ -204,7 +205,7 @@ public class Quadrapassel : 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;
@@ -214,6 +215,9 @@ public class Quadrapassel : 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]