summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/terminal-app.c1
-rw-r--r--src/terminal-util.c4
-rw-r--r--src/terminal-window.c7
-rw-r--r--src/terminal.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 8c938a9..d54da49 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -40,7 +40,6 @@
#include "terminal-encoding.h"
#include <string.h>
#include <stdlib.h>
-#include <time.h>
#ifdef HAVE_SMCLIENT
#include "eggsmclient.h"
diff --git a/src/terminal-util.c b/src/terminal-util.c
index ce97f41..3ef9040 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <stdlib.h>
-#include <time.h>
#include <unistd.h>
#include <sys/types.h>
@@ -49,7 +48,8 @@ terminal_util_set_unique_role (GtkWindow *window, const char *prefix)
{
char *role;
- role = g_strdup_printf ("%s-%d-%d-%d", prefix, getpid (), g_random_int (), (int) time (NULL));
+ role = g_strdup_printf ("%s-%d-%d-%" G_GINT64_FORMAT, prefix, getpid (), g_random_int (),
+ g_get_real_time () / G_USEC_PER_SEC);
gtk_window_set_role (window, role);
g_free (role);
}
diff --git a/src/terminal-window.c b/src/terminal-window.c
index c690dd2..0d3d1e9 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -106,7 +106,10 @@ struct _TerminalWindowPrivate
guint disposed : 1;
guint present_on_insert : 1;
- time_t focus_time;
+ /* Workaround until gtk+ bug #535557 is fixed */
+ guint icon_title_set : 1;
+
+ gint64 focus_time;
/* should we copy selection to clibpoard */
int copy_selection;
@@ -2430,7 +2433,7 @@ terminal_window_focus_in_event (GtkWidget *widget,
TerminalWindowPrivate *priv = window->priv;
if (event->in)
- priv->focus_time = time(NULL);
+ priv->focus_time = g_get_real_time () / G_USEC_PER_SEC;
return FALSE;
}
diff --git a/src/terminal.c b/src/terminal.c
index 0be68cf..b4efd39 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -25,7 +25,6 @@
#include <errno.h>
#include <locale.h>
#include <stdlib.h>
-#include <time.h>
#include <unistd.h>
#include <glib.h>
@@ -525,7 +524,8 @@ main (int argc, char **argv)
if (options->startup_id == NULL)
{
- options->startup_id = g_strdup_printf ("_TIME%lu", g_get_monotonic_time () / 1000);
+ options->startup_id = g_strdup_printf ("_TIME%" G_GINT64_FORMAT,
+ g_get_monotonic_time () / 1000);
}
gdk_init (&argc, &argv);