[gnome-photos/wip/search: 16/18] application: Use an activation timestamp
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/search: 16/18] application: Use an activation timestamp
- Date: Wed, 19 Feb 2014 18:28:08 +0000 (UTC)
commit 3eb07935ed36bfcceeb343d7c45eb65d0e637422
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 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index d30cf50..18fb920 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -72,6 +72,7 @@ struct _PhotosApplicationPrivate
PhotosModeController *mode_cntrlr;
PhotosSearchContextState *state;
PhotosSearchProvider *search_provider;
+ guint32 activation_timestamp;
};
static void photos_application_search_context_iface_init (PhotosSearchContextInterface *iface);
@@ -500,7 +501,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;
}
@@ -755,6 +757,7 @@ photos_application_init (PhotosApplication *self)
self);
priv->state = photos_search_context_state_new (PHOTOS_SEARCH_CONTEXT (self));
+ priv->activation_timestamp = GDK_CURRENT_TIME;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]