[empathy: 12/16] Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 12/16] Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME
- Date: Tue, 4 May 2010 12:23:24 +0000 (UTC)
commit 86579ed008210dcdd95b0e0f92ab1648b0fd9494
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date: Tue May 4 11:48:34 2010 +0100
Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME
src/empathy-chat-window.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 43bb748..0453ed1 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -2307,24 +2307,28 @@ empathy_chat_window_present_chat (EmpathyChat *chat,
if (timestamp == EMPATHY_DISPATCHER_NON_USER_ACTION)
return;
- x_timestamp = CLAMP (timestamp, 0, G_MAXUINT32);
-
priv = GET_PRIV (window);
- /* Don't present or switch tab if the action was earlier then the
- * last actions X time, accounting for overflow and the first ever
- * presentation */
+ if (timestamp == G_MAXINT64) {
+ x_timestamp = GDK_CURRENT_TIME;
+ } else {
+ x_timestamp = CLAMP (timestamp, 0, G_MAXUINT32);
+ /* Don't present or switch tab if the action was earlier then the
+ * last actions X time, accounting for overflow and the first ever
+ * presentation */
- if (priv->x_user_action_time != 0
- && X_EARLIER_OR_EQL (x_timestamp, priv->x_user_action_time))
- return;
+ if (priv->x_user_action_time != 0
+ && X_EARLIER_OR_EQL (x_timestamp, priv->x_user_action_time))
+ return;
+
+ priv->x_user_action_time = x_timestamp;
+ }
empathy_chat_window_switch_to_chat (window, chat);
empathy_window_present_with_time (GTK_WINDOW (priv->dialog),
x_timestamp);
gtk_widget_grab_focus (chat->input_text_view);
- priv->x_user_action_time = x_timestamp;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]