[Xfce4-commits] <parole:master> Better support for window manager fullscreen command.

Sean Davis noreply at xfce.org
Sat Feb 2 15:58:01 CET 2013


Updating branch refs/heads/master
         to 7fce58809707e9722b39bd9da62cbac8f865f3c3 (commit)
       from 8cc4f64055ee5a4439ef55a99d962a5b579c7b21 (commit)

commit 7fce58809707e9722b39bd9da62cbac8f865f3c3
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Feb 2 09:56:37 2013 -0500

    Better support for window manager fullscreen command.

 src/parole-player.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/parole-player.c b/src/parole-player.c
index 3f8d007..f5e5762 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -1868,6 +1868,22 @@ parole_player_move_fs_window (ParolePlayer *player)
 		     rect.height + rect.y - player->priv->play_box->allocation.height);
 }
 
+gboolean
+parole_player_window_state_event (GtkWidget *widget, 
+                                  GdkEventWindowState *event,
+                                  ParolePlayer *player)
+{
+    gboolean fullscreen = FALSE;
+
+    if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
+        fullscreen = TRUE;
+    
+    if ( player->priv->full_screen != fullscreen )
+        parole_player_reset_controls( player, fullscreen );
+        
+    return TRUE;
+}
+
 /**
  * parole_player_reset_controls:
  * @player     : the #ParolePlayer instance.
@@ -2893,6 +2909,11 @@ parole_player_init (ParolePlayer *player)
     
     player->priv->window = GTK_WIDGET (gtk_builder_get_object (builder, "main-window"));
     
+    g_signal_connect(   G_OBJECT(player->priv->window), 
+                        "window-state-event", 
+                        G_CALLBACK(parole_player_window_state_event), 
+                        PAROLE_PLAYER(player) );
+    
     recent_menu = GTK_WIDGET (gtk_builder_get_object (builder, "recent_menu"));
     
     player->priv->recent_menu = gtk_recent_chooser_menu_new_for_manager (player->priv->recent);


More information about the Xfce4-commits mailing list