aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-05-04 18:48:34 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-05-04 18:48:34 +0800
commit86579ed008210dcdd95b0e0f92ab1648b0fd9494 (patch)
tree474a39a1e4d2196316bcc9d48ade96734c788000 /src
parent05e3181257bc2664f462879467850d522450d48d (diff)
downloadgsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar.gz
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar.bz2
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar.lz
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar.xz
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.tar.zst
gsoc2013-empathy-86579ed008210dcdd95b0e0f92ab1648b0fd9494.zip
Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 43bb74896..0453ed110 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