[Xfce4-commits] <postler:master> Update column layout when maximised or fullscreen

Christian Dywan noreply at xfce.org
Thu Dec 30 06:00:05 CET 2010


Updating branch refs/heads/master
         to f32c57b276224fb03922d1b61067d72162d0f9f7 (commit)
       from 4395e01387c48cbccef3587791128686e32bb587 (commit)

commit f32c57b276224fb03922d1b61067d72162d0f9f7
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Dec 28 23:28:12 2010 +0100

    Update column layout when maximised or fullscreen

 postler/postler-bureau.vala |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 9d0fcd5..715c53d 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -313,17 +313,27 @@ public class Postler.Bureau : Gtk.Window {
     }
 
     void action_fullscreen () {
+        if ((window.get_state () & Gdk.WindowState.FULLSCREEN) == 0
+         || (window.get_state () & Gdk.WindowState.MAXIMIZED) == 0) {
+            fullscreen ();
+        } else {
+            unfullscreen ();
+        }
+        window_state_event (new Gdk.EventWindowState ());
+    }
+
+    override bool window_state_event (Gdk.EventWindowState event) {
         Gtk.Orientation orientation;
-        if ((window.get_state () & Gdk.WindowState.FULLSCREEN) == 0) {
+        if ((window.get_state () & Gdk.WindowState.FULLSCREEN) != 0
+         || (window.get_state () & Gdk.WindowState.MAXIMIZED) != 0) {
             /* 3 vertical columns */
             orientation = Gtk.Orientation.HORIZONTAL;
-            fullscreen ();
         } else {
             /* 1 : 2 layout */
             orientation = Gtk.Orientation.VERTICAL;
-            unfullscreen ();
         }
         (messages.parent.parent.parent as Gtk.Orientable).set_orientation (orientation);
+        return true;
     }
 
     void action_view_source () {



More information about the Xfce4-commits mailing list