[Xfce4-commits] <parole:master> Don't hide the controls in full screen when cursor is above the popup window.

Ali Abdallah noreply at xfce.org
Thu Nov 26 10:16:03 CET 2009


Updating branch refs/heads/master
         to 6dfca392c16a4afe1726307a59a7ee5411578c5e (commit)
       from 98f1e9b7f29116b6fabf9030fc05fd5df79841c8 (commit)

commit 6dfca392c16a4afe1726307a59a7ee5411578c5e
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Thu Nov 26 08:52:33 2009 +0100

    Don't hide the controls in full screen when cursor is above
    the popup window.

 src/parole-player.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/parole-player.c b/src/parole-player.c
index e615d9a..77d52cf 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -135,7 +135,7 @@ void            parole_player_volume_up 		(GtkWidget *widget,
 void            parole_player_volume_down 		(GtkWidget *widget, 
 							 ParolePlayer *player);
 
-void            parole_player_volume_muted 		(GtkWidget *widget, 
+void            parole_player_volume_mute 		(GtkWidget *widget, 
 							 ParolePlayer *player);
 
 void		parole_player_open_preferences_cb	(GtkWidget *widget,
@@ -429,7 +429,7 @@ parole_player_media_cursor_changed_cb (ParoleMediaList *list, gboolean media_sel
 }
 
 static void
-parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, gdouble value, ParolePlayer *player)
+parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, gint64 value, ParolePlayer *player)
 {
 #ifdef DEBUG
     g_return_if_fail (value > 0);
@@ -525,7 +525,7 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
 {
     GdkPixbuf *pix = NULL;
     
-    gdouble duration;
+    gint64 duration;
     gboolean seekable;
     gboolean live;
     
@@ -767,11 +767,11 @@ parole_player_stop_clicked (GtkButton *button, ParolePlayer *player)
 /*
  * Seek 5%
  */
-static gdouble
+static gint64
 parole_player_get_seek_value (ParolePlayer *player)
 {
-    gdouble val;
-    gdouble dur;
+    gint64 val;
+    gint64 dur;
     
     dur = parole_gst_get_stream_duration (PAROLE_GST (player->priv->gst));
     
@@ -1173,11 +1173,21 @@ parole_player_gst_widget_button_release (GtkWidget *widget, GdkEventButton *ev,
 static gboolean parole_player_hide_fs_window (gpointer data)
 {
     ParolePlayer *player;
+    gint x, y, w, h;
     
     player = PAROLE_PLAYER (data);
     
     if ( GTK_WIDGET_VISIBLE (player->priv->fs_window) )
     {
+	/* Don't hide the popup if the pointer is above it*/
+	w = player->priv->fs_window->allocation.width;
+	h = player->priv->fs_window->allocation.height;
+	
+	gtk_widget_get_pointer (player->priv->fs_window, &x, &y);
+	
+	if ((x >= 0) && (x <= w) && (y >= 0) && (y <= h))
+	    return TRUE;
+
 	gtk_widget_hide (player->priv->fs_window);
     }
 
@@ -1320,7 +1330,7 @@ parole_player_volume_down (GtkWidget *widget, ParolePlayer *player)
     gtk_range_set_value (GTK_RANGE (player->priv->volume), value - 0.1);
 }
 
-void parole_player_volume_muted (GtkWidget *widget, ParolePlayer *player)
+void parole_player_volume_mute (GtkWidget *widget, ParolePlayer *player)
 {
     gtk_range_set_value (GTK_RANGE (player->priv->volume), 0);
 }
@@ -1485,7 +1495,7 @@ parole_player_key_press (GtkWidget *widget, GdkEventKey *ev, ParolePlayer *playe
 	    parole_player_volume_down (NULL, player);
 	    return TRUE;
 	case XF86XK_AudioMute:
-	    parole_player_volume_muted (NULL, player);
+	    parole_player_volume_mute (NULL, player);
 	    return TRUE;
 	case XF86XK_AudioPrev:
 	    if ( !parole_disc_menu_seek_prev (player->priv->disc_menu))



More information about the Xfce4-commits mailing list