summaryrefslogtreecommitdiff
path: root/src/totem-object.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2019-02-14 03:18:58 +0100
committerBastien Nocera <hadess@hadess.net>2019-02-14 02:24:34 +0000
commitbaac90aa2f3cbb162ae1720be9de6fb1a90e3f91 (patch)
tree83d4da247630edc9c85902ba61574ce76476d7b1 /src/totem-object.c
parent9750e1312178d158ff54917f31067bef5e8b2c33 (diff)
downloadtotem-baac90aa2f3cbb162ae1720be9de6fb1a90e3f91.tar.gz
main: Don't allow --fullscreen when not playing
When running "totem --fullscreen" (whether already running or not), only go fullscreen if playing, not when navigating content, as there's no way to get out of that mode easily. If you relied on this bug for something, use window manager keyboard shortcuts to set the fullscreen state instead. Closes: #197
Diffstat (limited to 'src/totem-object.c')
-rw-r--r--src/totem-object.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/totem-object.c b/src/totem-object.c
index 46d9d79e1..f55514f19 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -197,12 +197,8 @@ totem_object_app_activate (GApplication *app)
grilo_widget_setup (totem);
/* Show ! */
- if (optionstate.fullscreen == FALSE) {
- gtk_widget_show (totem->win);
- g_application_mark_busy (G_APPLICATION (totem));
- } else {
- gtk_widget_realize (totem->win);
- }
+ gtk_widget_show (totem->win);
+ g_application_mark_busy (G_APPLICATION (totem));
totem->controls_visibility = TOTEM_CONTROLS_UNDEFINED;
@@ -217,12 +213,6 @@ totem_object_app_activate (GApplication *app)
gtk_widget_grab_focus (GTK_WIDGET (totem->bvw));
- if (optionstate.fullscreen != FALSE) {
- gtk_widget_show (totem->win);
- gdk_flush ();
- totem_object_set_fullscreen (totem, TRUE);
- }
-
/* The prefs after the video widget is connected */
totem->prefs_xml = totem_interface_load ("preferences.ui", TRUE, NULL, totem);
totem->prefs = GTK_WIDGET (gtk_builder_get_object (totem->prefs_xml, "totem_preferences_window"));
@@ -253,11 +243,15 @@ totem_object_app_activate (GApplication *app)
optionstate.had_filenames = FALSE;
+ if (optionstate.fullscreen != FALSE) {
+ if (g_strcmp0 (totem_object_get_main_page (totem), "player") == 0)
+ totem_object_set_fullscreen (totem, TRUE);
+ }
+
/* Set the logo at the last minute so we won't try to show it before a video */
bacon_video_widget_set_logo (totem->bvw, "org.gnome.Totem");
- if (optionstate.fullscreen == FALSE)
- g_application_unmark_busy (G_APPLICATION (totem));
+ g_application_unmark_busy (G_APPLICATION (totem));
gtk_window_set_application (GTK_WINDOW (totem->win), GTK_APPLICATION (totem));
}
@@ -2826,7 +2820,8 @@ totem_object_remote_command (TotemObject *totem, TotemRemoteCommand cmd, const c
totem_object_seek_previous (totem);
break;
case TOTEM_REMOTE_COMMAND_FULLSCREEN:
- totem_object_action_fullscreen_toggle (totem);
+ if (g_strcmp0 (totem_object_get_main_page (totem), "player") == 0)
+ totem_object_action_fullscreen_toggle (totem);
break;
case TOTEM_REMOTE_COMMAND_QUIT:
totem_object_exit (totem);