diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/totem-fullscreen.c | 25 |
2 files changed, 30 insertions, 4 deletions
@@ -1,5 +1,14 @@ 2007-09-19 Bastien Nocera <hadess@hadess.net> + * src/totem-fullscreen.c: (totem_fullscreen_set_cursor), + (totem_fullscreen_motion_notify), + (totem_fullscreen_parent_window_notify), (totem_fullscreen_new): + Only show the popup on motion notifies if the window is active, show + the cursor on the video window when it's not active, or when it becomes + active, includes patch from bug #439269 (Closes: #471381) + +2007-09-19 Bastien Nocera <hadess@hadess.net> + * data/fullscreen.ui: * src/totem-fullscreen.c: (totem_fullscreen_popup_timeout_add), (totem_fullscreen_is_volume_popup_visible), diff --git a/src/totem-fullscreen.c b/src/totem-fullscreen.c index cc2fcfc88..d8cb5c551 100644 --- a/src/totem-fullscreen.c +++ b/src/totem-fullscreen.c @@ -198,7 +198,8 @@ totem_fullscreen_popup_timeout_remove (TotemFullscreen *fs) static void totem_fullscreen_set_cursor (TotemFullscreen *fs, gboolean state) { - bacon_video_widget_set_show_cursor (fs->priv->bvw, state); + if (fs->priv->bvw != NULL) + bacon_video_widget_set_show_cursor (fs->priv->bvw, state); } static gboolean @@ -244,7 +245,7 @@ gboolean totem_fullscreen_motion_notify (GtkWidget *widget, GdkEventMotion *event, TotemFullscreen *fs) { - GtkWidget * item; + GtkWidget *item; if (totem_fullscreen_is_fullscreen (fs) == FALSE) return FALSE; @@ -252,6 +253,9 @@ totem_fullscreen_motion_notify (GtkWidget *widget, GdkEventMotion *event, if (fs->priv->popup_in_progress != FALSE) return FALSE; + if (gtk_window_is_active (GTK_WINDOW (fs->priv->parent_window)) == FALSE) + return FALSE; + fs->priv->popup_in_progress = TRUE; totem_fullscreen_popup_timeout_remove (fs); @@ -291,6 +295,19 @@ totem_fullscreen_set_fullscreen (TotemFullscreen *fs, fs->is_fullscreen = fullscreen; } +static void +totem_fullscreen_parent_window_notify (GtkWidget *parent_window, + GParamSpec *property, + TotemFullscreen *fs) +{ + if (parent_window == fs->priv->parent_window && + gtk_window_is_active (GTK_WINDOW (parent_window)) == FALSE) { + totem_fullscreen_force_popup_hide (fs); + totem_fullscreen_set_cursor (fs, TRUE); + } else { + totem_fullscreen_set_cursor (fs, FALSE); + } +} TotemFullscreen * totem_fullscreen_new (GtkWindow *toplevel_window) @@ -323,8 +340,8 @@ totem_fullscreen_new (GtkWindow *toplevel_window) G_CALLBACK (totem_fullscreen_window_realize_cb), fs); g_signal_connect (fs->priv->parent_window, "unrealize", G_CALLBACK (totem_fullscreen_window_unrealize_cb), fs); - g_signal_connect_swapped (G_OBJECT (fs->priv->parent_window), "notify::is-active", - G_CALLBACK (totem_fullscreen_popup_hide), fs); + g_signal_connect (G_OBJECT (fs->priv->parent_window), "notify::is-active", + G_CALLBACK (totem_fullscreen_parent_window_notify), fs); /* Volume */ fs->volume = GTK_WIDGET (gtk_builder_get_object (priv->xml, "tcw_volume_button")); |