summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmang Jain <umang@endlessm.com>2019-03-09 12:11:59 +0530
committerBastien Nocera <hadess@hadess.net>2019-05-06 15:56:56 +0000
commit73611ba00134747e8cbda731a82cfb8a79cf5dc1 (patch)
tree7a9fe529e7c9cfc1223bea4e6ae4c5eaea625d36 /src
parent7f4d62e4e4707bf08e6f76643a68ca8d87bfebd8 (diff)
downloadtotem-73611ba00134747e8cbda731a82cfb8a79cf5dc1.tar.gz
main: Present application window if already open
This raises the application window on the top of the stack of all the open windows and present it to the user. See gtk_window_present_with_time() documentation for more details.
Diffstat (limited to 'src')
-rw-r--r--src/totem-object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/totem-object.c b/src/totem-object.c
index 3a02c7e61..93be4fa86 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -140,11 +140,14 @@ totem_object_app_open (GApplication *application,
const char *hint)
{
GSList *slist = NULL;
+ Totem *totem = TOTEM_OBJECT (application);
int i;
optionstate.had_filenames = (n_files > 0);
g_application_activate (application);
+ gtk_window_present_with_time (GTK_WINDOW (totem->win),
+ gtk_get_current_event_time ());
totem_object_set_main_page (TOTEM_OBJECT (application), "player");