From: Sjoerd Simons Date: Tue, 4 May 2010 10:48:34 +0000 (+0100) Subject: Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=86579ed008210dcdd95b0e0f92ab1648b0fd9494 Consider G_MAXIN64 as a secred code for GDK_CURRENT_TIME --- diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 43bb7489..0453ed11 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