[gnome-photos/wip/search: 16/23] application: Use an activation timestamp
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/search: 16/23] application: Use an activation timestamp
- Date: Tue, 18 Feb 2014 19:16:33 +0000 (UTC)
commit 13bca64f88d1e6b922612881ecb71479df5a501a
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 18 14:28:59 2014 +0100
application: Use an activation timestamp
This would be used to forward the shell's timestamp when launching
from the search provider so that the window will get the WM focus.
src/photos-application.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 9fb9b6d..a3f78de 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -71,6 +71,7 @@ struct _PhotosApplicationPrivate
PhotosCameraCache *camera_cache;
PhotosModeController *mode_cntrlr;
PhotosSearchProvider *search_provider;
+ guint32 activation_timestamp;
};
@@ -486,7 +487,8 @@ photos_application_activate (GApplication *application)
photos_mode_controller_set_window_mode (priv->mode_cntrlr, PHOTOS_WINDOW_MODE_OVERVIEW);
}
- gtk_window_present (GTK_WINDOW (priv->main_window));
+ gtk_window_present_with_time (GTK_WINDOW (priv->main_window), priv->activation_timestamp);
+ priv->activation_timestamp = GDK_CURRENT_TIME;
}
@@ -735,6 +737,8 @@ photos_application_init (PhotosApplication *self)
"launch-search",
G_CALLBACK (photos_application_launch_search),
self);
+
+ priv->activation_timestamp = GDK_CURRENT_TIME;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]