Index: src/common.h
===================================================================
RCS file: /cvs/gnome/metacity/src/common.h,v
retrieving revision 1.40
diff -p -u -r1.40 common.h
--- src/common.h	26 May 2006 00:16:52 -0000	1.40
+++ src/common.h	11 Sep 2006 20:56:12 -0000
@@ -74,7 +74,7 @@ typedef struct _MetaWindowMenu MetaWindo
 typedef void (* MetaWindowMenuFunc) (MetaWindowMenu *menu,
                                      Display        *xdisplay,
                                      Window          client_xwindow,
-				     Time	     timestamp,
+                                     guint32         timestamp,
                                      MetaMenuOp      op,
                                      int             workspace,
                                      gpointer        data);
Index: src/core.c
===================================================================
RCS file: /cvs/gnome/metacity/src/core.c,v
retrieving revision 1.49
diff -p -u -r1.49 core.c
--- src/core.c	28 Apr 2006 16:54:52 -0000	1.49
+++ src/core.c	11 Sep 2006 20:56:12 -0000
@@ -199,7 +199,7 @@ meta_core_user_raise (Display *xdisplay,
 void
 meta_core_user_lower_and_unfocus (Display *xdisplay,
                                   Window   frame_xwindow,
-                                  Time     timestamp)
+                                  guint32  timestamp)
 {
   MetaWindow *window = get_window (xdisplay, frame_xwindow);
   
@@ -242,7 +242,7 @@ meta_core_user_lower_and_unfocus (Displa
 void
 meta_core_user_focus (Display *xdisplay,
                       Window   frame_xwindow,
-                      Time     timestamp)
+                      guint32  timestamp)
 {
   MetaWindow *window = get_window (xdisplay, frame_xwindow);
   
@@ -441,7 +441,7 @@ meta_core_show_window_menu (Display *xdi
                             int      root_x,
                             int      root_y,
                             int      button,
-                            Time     timestamp)
+                            guint32  timestamp)
 {
   MetaWindow *window = get_window (xdisplay, frame_xwindow);
   
@@ -587,7 +587,7 @@ meta_core_begin_grab_op (Display    *xdi
                          int         event_serial,
                          int         button,
                          gulong      modmask,
-                         Time        timestamp,
+                         guint32     timestamp,
                          int         root_x,
                          int         root_y)
 {
@@ -609,7 +609,7 @@ meta_core_begin_grab_op (Display    *xdi
 
 void
 meta_core_end_grab_op (Display *xdisplay,
-                       Time     timestamp)
+                       guint32  timestamp)
 {
   MetaDisplay *display;
   
Index: src/core.h
===================================================================
RCS file: /cvs/gnome/metacity/src/core.h,v
retrieving revision 1.27
diff -p -u -r1.27 core.h
--- src/core.h	19 Nov 2005 14:58:50 -0000	1.27
+++ src/core.h	11 Sep 2006 20:56:12 -0000
@@ -66,11 +66,11 @@ void meta_core_user_raise   (Display *xd
                              Window   frame_xwindow);
 void meta_core_user_lower_and_unfocus (Display *xdisplay,
                                        Window   frame_xwindow,
-                                       Time     timestamp);
+                                       guint32  timestamp);
 
 void meta_core_user_focus   (Display *xdisplay,
                              Window   frame_xwindow,
-                             Time     timestamp);
+                             guint32  timestamp);
 
 /* get position of client, same coord space expected by move */
 void meta_core_get_position (Display *xdisplay,
@@ -127,7 +127,7 @@ void meta_core_show_window_menu (Display
                                  int      root_x,
                                  int      root_y,
                                  int      button,
-                                 Time     timestamp);
+                                 guint32  timestamp);
 
 void meta_core_get_menu_accelerator (MetaMenuOp           menu_op,
                                      int                  workspace,
@@ -141,11 +141,11 @@ gboolean   meta_core_begin_grab_op (Disp
                                     int         event_serial,
                                     int         button,
                                     gulong      modmask,
-                                    Time        timestamp,
+                                    guint32     timestamp,
                                     int         root_x,
                                     int         root_y);
 void       meta_core_end_grab_op   (Display    *xdisplay,
-                                    Time        timestamp);
+                                    guint32     timestamp);
 MetaGrabOp meta_core_get_grab_op     (Display    *xdisplay);
 Window     meta_core_get_grab_frame  (Display   *xdisplay);
 int        meta_core_get_grab_button (Display  *xdisplay);
Index: src/delete.c
===================================================================
RCS file: /cvs/gnome/metacity/src/delete.c,v
retrieving revision 1.13
diff -p -u -r1.13 delete.c
--- src/delete.c	14 Dec 2005 12:47:35 -0000	1.13
+++ src/delete.c	11 Sep 2006 20:56:12 -0000
@@ -39,7 +39,7 @@ static void meta_window_present_delete_d
 static void
 delete_ping_reply_func (MetaDisplay *display,
                         Window       xwindow,
-                        Time         timestamp,
+                        guint32      timestamp,
                         void        *user_data)
 {
   meta_topic (META_DEBUG_PING,
@@ -292,7 +292,7 @@ io_from_ping_dialog (GIOChannel   *chann
 static void
 delete_ping_timeout_func (MetaDisplay *display,
                           Window       xwindow,
-                          Time         timestamp,
+                          guint32      timestamp,
                           void        *user_data)
 {
   MetaWindow *window = user_data;
@@ -318,7 +318,7 @@ delete_ping_timeout_func (MetaDisplay *d
   window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
 
   sprintf (numbuf, "%d", window->screen->number);
-  sprintf (timestampbuf, "%lu", timestamp);
+  sprintf (timestampbuf, "%lu", (unsigned long)timestamp);
   
   argv[0] = METACITY_LIBEXECDIR"/metacity-dialog";
   argv[1] = "--screen";
@@ -364,7 +364,7 @@ delete_ping_timeout_func (MetaDisplay *d
 
 void
 meta_window_delete (MetaWindow  *window,
-                    Time         timestamp)
+                    guint32      timestamp)
 {
   meta_error_trap_push (window->display);
   if (window->delete_window)
Index: src/display.c
===================================================================
RCS file: /cvs/gnome/metacity/src/display.c,v
retrieving revision 1.290
diff -p -u -r1.290 display.c
--- src/display.c	10 Sep 2006 04:29:14 -0000	1.290
+++ src/display.c	11 Sep 2006 20:56:12 -0000
@@ -76,12 +76,12 @@
 typedef struct 
 {
   MetaDisplay *display;
-  Window xwindow;
-  Time timestamp;
+  Window       xwindow;
+  guint32      timestamp;
   MetaWindowPingFunc ping_reply_func;
   MetaWindowPingFunc ping_timeout_func;
-  void *user_data;
-  guint ping_timeout_id;
+  void        *user_data;
+  guint        ping_timeout_id;
 } MetaPingData;
 
 typedef struct 
@@ -116,7 +116,7 @@ static void    prefs_changed_callback   
                                           void          *data);
 
 static void    sanity_check_timestamps   (MetaDisplay *display,
-                                          Time         known_good_timestamp);
+                                          guint32      known_good_timestamp);
 
 MetaGroup*     get_focussed_group (MetaDisplay *display);
 
@@ -233,7 +233,7 @@ meta_display_open (void)
   GSList *screens;
   GSList *tmp;
   int i;
-  Time timestamp;
+  guint32 timestamp;
   /* Remember to edit code that assigns each atom to display struct
    * when adding an atom name here.
    */
@@ -3170,7 +3170,7 @@ meta_display_set_grab_op_cursor (MetaDis
                                  MetaGrabOp   op,
                                  gboolean     change_pointer,
                                  Window       grab_xwindow,
-                                 Time         timestamp)
+                                 guint32      timestamp)
 {
   Cursor cursor;
 
@@ -3215,14 +3215,14 @@ meta_display_set_grab_op_cursor (MetaDis
         {
           display->grab_have_pointer = TRUE;
           meta_topic (META_DEBUG_WINDOW_OPS,
-                      "XGrabPointer() returned GrabSuccess time 0x%lu\n",
-                      timestamp);
+                      "XGrabPointer() returned GrabSuccess time %lu\n",
+                      (unsigned long)timestamp);
         }
       else
         {
           meta_topic (META_DEBUG_WINDOW_OPS,
-                      "XGrabPointer() failed time 0x%lu\n",
-                      timestamp);
+                      "XGrabPointer() failed time %lu\n",
+                      (unsigned long)timestamp);
         }
       meta_error_trap_pop (display, TRUE);
     }
@@ -3242,7 +3242,7 @@ meta_display_begin_grab_op (MetaDisplay 
                             int          event_serial,
                             int          button,
                             gulong       modmask,
-                            Time         timestamp,
+                            guint32      timestamp,
                             int          root_x,
                             int          root_y)
 {
@@ -3519,7 +3519,7 @@ meta_display_begin_grab_op (MetaDisplay 
 
 void
 meta_display_end_grab_op (MetaDisplay *display,
-                          Time         timestamp)
+                          guint32      timestamp)
 {
   meta_topic (META_DEBUG_WINDOW_OPS,
               "Ending grab op %u at time %lu\n", display->grab_op,
@@ -3611,14 +3611,15 @@ meta_display_end_grab_op (MetaDisplay *d
     {
       meta_topic (META_DEBUG_WINDOW_OPS,
                   "Ungrabbing pointer with timestamp %lu\n",
-                  timestamp);
+                  (unsigned long)timestamp);
       XUngrabPointer (display->xdisplay, timestamp);
     }
 
   if (display->grab_have_keyboard)
     {
       meta_topic (META_DEBUG_WINDOW_OPS,
-                  "Ungrabbing all keys timestamp %lu\n", timestamp);
+                  "Ungrabbing all keys timestamp %lu\n", 
+                  (unsigned long)timestamp);
       if (display->grab_window)
         meta_window_ungrab_all_keys (display->grab_window, timestamp);
       else
@@ -4028,7 +4029,7 @@ meta_display_ping_timeout (gpointer data
 
   meta_topic (META_DEBUG_PING,
               "Ping %lu on window %lx timed out\n",
-              ping_data->timestamp, ping_data->xwindow);
+              (unsigned long)ping_data->timestamp, ping_data->xwindow);
   
   (* ping_data->ping_timeout_func) (ping_data->display, ping_data->xwindow,
                                     ping_data->timestamp, ping_data->user_data);
@@ -4044,7 +4045,7 @@ meta_display_ping_timeout (gpointer data
 void
 meta_display_ping_window (MetaDisplay       *display,
 			  MetaWindow        *window,
-			  Time               timestamp,
+			  guint32            timestamp,
 			  MetaWindowPingFunc ping_reply_func,
 			  MetaWindowPingFunc ping_timeout_func,
 			  gpointer           user_data)
@@ -4080,7 +4081,7 @@ meta_display_ping_window (MetaDisplay   
 
   meta_topic (META_DEBUG_PING,
               "Sending ping with timestamp %lu to window %s\n",
-              timestamp, window->desc);
+              (unsigned long)timestamp, window->desc);
   meta_window_send_icccm_message (window,
                                   display->atom_net_wm_ping,
                                   timestamp);
@@ -4160,19 +4161,20 @@ process_pong_message (MetaDisplay    *di
                       XEvent         *event)
 {
   GSList *tmp;
+  guint32 timestamp = event->xclient.data.l[1];
 
   meta_topic (META_DEBUG_PING, "Received a pong with timestamp %lu\n",
-              (Time) event->xclient.data.l[1]);
+              event->xclient.data.l[1]);
   
   for (tmp = display->pending_pings; tmp; tmp = tmp->next)
     {
       MetaPingData *ping_data = tmp->data;
 			  
-      if ((Time)event->xclient.data.l[1] == ping_data->timestamp)
+      if (timestamp == ping_data->timestamp)
         {
           meta_topic (META_DEBUG_PING,
                       "Matching ping found for pong %lu\n",
-                      ping_data->timestamp);
+                      (unsigned long)ping_data->timestamp);
 
           /* Remove the ping data from the list */
           display->pending_pings = g_slist_remove (display->pending_pings,
@@ -4870,7 +4872,7 @@ meta_display_focus_sentinel_clear (MetaD
 
 static void
 sanity_check_timestamps (MetaDisplay *display,
-                         Time         timestamp)
+                         guint32      timestamp)
 {
   if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
     {
@@ -4878,7 +4880,8 @@ sanity_check_timestamps (MetaDisplay *di
                     "timestamp (%lu).  This most likely represents a buggy "
                     "client sending inaccurate timestamps in messages such as "
                     "_NET_ACTIVE_WINDOW.  Trying to work around...\n",
-                    display->last_focus_time, (unsigned long)timestamp);
+                    (unsigned long)display->last_focus_time,
+                    (unsigned long)timestamp);
       display->last_focus_time = timestamp;
     }
   if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_user_time))
@@ -4890,7 +4893,8 @@ sanity_check_timestamps (MetaDisplay *di
                     "timestamp (%lu).  This most likely represents a buggy "
                     "client sending inaccurate timestamps in messages such as "
                     "_NET_ACTIVE_WINDOW.  Trying to work around...\n",
-                    display->last_user_time, (unsigned long)timestamp);
+                    (unsigned long)display->last_user_time,
+                    (unsigned long)timestamp);
       display->last_user_time = timestamp;
 
       windows = meta_display_list_windows (display);
@@ -4903,7 +4907,8 @@ sanity_check_timestamps (MetaDisplay *di
             {
               meta_warning ("%s appears to be one of the offending windows "
                             "with a timestamp of %lu.  Working around...\n",
-                            window->desc, window->net_wm_user_time);
+                            window->desc, 
+                            (unsigned long)window->net_wm_user_time);
               window->net_wm_user_time = timestamp;
             }
           
@@ -4917,7 +4922,7 @@ sanity_check_timestamps (MetaDisplay *di
 static gboolean
 timestamp_too_old (MetaDisplay *display,
                    MetaWindow  *window,
-                   Time        *timestamp)
+                   guint32     *timestamp)
 {
   /* FIXME: If Soeren's suggestion in bug 151984 is implemented, it will allow
    * us to sanity check the timestamp here and ensure it doesn't correspond to
@@ -4942,9 +4947,9 @@ timestamp_too_old (MetaDisplay *display,
                       "Ignoring focus request for %s since %lu "
                       "is less than %lu and %lu.\n",
                       window ? window->desc : "the no_focus_window",
-                      *timestamp,
-                      (unsigned long) display->last_user_time,
-                      (unsigned long) display->last_focus_time);
+                      (unsigned long)*timestamp,
+                      (unsigned long)display->last_user_time,
+                      (unsigned long)display->last_focus_time);
           return TRUE;
         }
       else
@@ -4955,9 +4960,9 @@ timestamp_too_old (MetaDisplay *display,
                       "last_focus_time (%lu < %lu < %lu); adjusting "
                       "accordingly.  (See bug 167358)\n",
                       window ? window->desc : "the no_focus_window",
-                      display->last_user_time,
-                      *timestamp,
-                      display->last_focus_time);
+                      (unsigned long)display->last_user_time,
+                      (unsigned long)*timestamp,
+                      (unsigned long)display->last_focus_time);
           *timestamp = display->last_focus_time;
           return FALSE;
         }
@@ -4970,7 +4975,7 @@ void
 meta_display_set_input_focus_window (MetaDisplay *display, 
                                      MetaWindow  *window,
                                      gboolean     focus_frame,
-                                     Time         timestamp)
+                                     guint32      timestamp)
 {
   if (timestamp_too_old (display, window, &timestamp))
     return;
@@ -4990,7 +4995,7 @@ meta_display_set_input_focus_window (Met
 void
 meta_display_focus_the_no_focus_window (MetaDisplay *display, 
                                         MetaScreen  *screen,
-                                        Time         timestamp)
+                                        guint32      timestamp)
 {
   if (timestamp_too_old (display, NULL, &timestamp))
     return;
Index: src/display.h
===================================================================
RCS file: /cvs/gnome/metacity/src/display.h,v
retrieving revision 1.153
diff -p -u -r1.153 display.h
--- src/display.h	21 Aug 2006 18:38:21 -0000	1.153
+++ src/display.h	11 Sep 2006 20:56:12 -0000
@@ -62,7 +62,7 @@ typedef struct MetaEdgeResistanceData Me
 
 typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
 				     Window       xwindow,
-				     Time         timestamp,
+				     guint32      timestamp,
 				     gpointer     user_data);
 
 
@@ -194,10 +194,10 @@ struct _MetaDisplay
   MetaWindow *expected_focus_window;
 
   /* last timestamp passed to XSetInputFocus */
-  Time last_focus_time;
+  guint32 last_focus_time;
 
   /* last user interaction time in any app */
-  Time last_user_time;
+  guint32 last_user_time;
 
   /* whether we're using mousenav (only relevant for sloppy&mouse focus modes;
    * !mouse_mode means "keynav mode")
@@ -269,7 +269,7 @@ struct _MetaDisplay
   gboolean    grab_threshold_movement_reached; /* raise_on_click == FALSE.    */
   MetaResizePopup *grab_resize_popup;
   GTimeVal    grab_last_moveresize_time;
-  Time        grab_motion_notify_time;
+  guint32     grab_motion_notify_time;
   int         grab_wireframe_last_display_width;
   int         grab_wireframe_last_display_height;
   GList*      grab_old_window_stacking;
@@ -283,7 +283,7 @@ struct _MetaDisplay
 
 #ifdef HAVE_XKB
   int         xkb_base_event_type;
-  Time        last_bell_time;
+  guint32     last_bell_time;
 #endif
 #ifdef HAVE_XSYNC
   /* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
@@ -431,7 +431,7 @@ void     meta_display_set_grab_op_cursor
                                           MetaGrabOp   op,
                                           gboolean     change_pointer,
                                           Window       grab_xwindow,
-                                          Time         timestamp);
+                                          guint32      timestamp);
 
 gboolean meta_display_begin_grab_op (MetaDisplay *display,
                                      MetaScreen  *screen,
@@ -441,11 +441,11 @@ gboolean meta_display_begin_grab_op (Met
                                      int          event_serial,
                                      int          button,
                                      gulong       modmask,
-                                     Time         timestamp,
+                                     guint32      timestamp,
                                      int          root_x,
                                      int          root_y);
 void     meta_display_end_grab_op   (MetaDisplay *display,
-                                     Time         timestamp);
+                                     guint32      timestamp);
 
 void    meta_display_check_threshold_reached (MetaDisplay *display,
                                               int          x,
@@ -482,12 +482,12 @@ void meta_display_retheme_all (void);
 void meta_display_set_cursor_theme (const char *theme, 
 				    int         size);
 
-void     meta_display_ping_window              (MetaDisplay        *display,
-						MetaWindow         *window,
-						Time                timestamp,
-						MetaWindowPingFunc  ping_reply_func,
-						MetaWindowPingFunc  ping_timeout_func,
-						void               *user_data);
+void meta_display_ping_window      (MetaDisplay        *display,
+                                    MetaWindow         *window,
+                                    guint32             timestamp,
+                                    MetaWindowPingFunc  ping_reply_func,
+                                    MetaWindowPingFunc  ping_timeout_func,
+                                    void               *user_data);
 gboolean meta_display_window_has_pending_pings (MetaDisplay        *display,
 						MetaWindow         *window);
 
@@ -546,7 +546,7 @@ gboolean meta_display_focus_sentinel_cle
 void meta_display_set_input_focus_window   (MetaDisplay *display, 
                                             MetaWindow  *window,
                                             gboolean     focus_frame,
-                                            Time         timestamp);
+                                            guint32      timestamp);
 
 /* meta_display_focus_the_no_focus_window is called when the
  * designated no_focus_window should be focused, but is otherwise the
@@ -554,7 +554,7 @@ void meta_display_set_input_focus_window
  */
 void meta_display_focus_the_no_focus_window (MetaDisplay *display, 
                                              MetaScreen  *screen,
-                                             Time         timestamp);
+                                             guint32      timestamp);
 
 void meta_display_queue_autoraise_callback  (MetaDisplay *display,
                                              MetaWindow  *window);
Index: src/keybindings.c
===================================================================
RCS file: /cvs/gnome/metacity/src/keybindings.c,v
retrieving revision 1.133
diff -p -u -r1.133 keybindings.c
--- src/keybindings.c	9 Sep 2006 20:19:56 -0000	1.133
+++ src/keybindings.c	11 Sep 2006 20:56:12 -0000
@@ -1209,7 +1209,7 @@ grab_status_to_string (int status)
 static gboolean
 grab_keyboard (MetaDisplay *display,
                Window       xwindow,
-               Time         timestamp)
+               guint32      timestamp)
 {
   int result;
   int grab_status;
@@ -1250,19 +1250,19 @@ grab_keyboard (MetaDisplay *display,
 }
 
 static void
-ungrab_keyboard (MetaDisplay *display, Time timestamp)
+ungrab_keyboard (MetaDisplay *display, guint32 timestamp)
 {
   meta_error_trap_push (display);
 
   meta_topic (META_DEBUG_KEYBINDINGS,
               "Ungrabbing keyboard with timestamp %lu\n",
-              timestamp);
+              (unsigned long)timestamp);
   XUngrabKeyboard (display->xdisplay, timestamp);
   meta_error_trap_pop (display, FALSE);
 }
 
 gboolean
-meta_screen_grab_all_keys (MetaScreen *screen, Time timestamp)
+meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp)
 {
   gboolean retval;
 
@@ -1284,7 +1284,7 @@ meta_screen_grab_all_keys (MetaScreen *s
 }
 
 void
-meta_screen_ungrab_all_keys (MetaScreen *screen, Time timestamp)
+meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp)
 {
   if (screen->all_keys_grabbed)
     {
@@ -1300,7 +1300,7 @@ meta_screen_ungrab_all_keys (MetaScreen 
 
 gboolean
 meta_window_grab_all_keys (MetaWindow  *window,
-                           Time         timestamp)
+                           guint32      timestamp)
 {
   Window grabwindow;
   gboolean retval;
@@ -1335,7 +1335,7 @@ meta_window_grab_all_keys (MetaWindow  *
 }
 
 void
-meta_window_ungrab_all_keys (MetaWindow *window, Time timestamp)
+meta_window_ungrab_all_keys (MetaWindow *window, guint32 timestamp)
 {
   if (window->all_keys_grabbed)
     {
@@ -2627,7 +2627,7 @@ error_on_generic_command (const char *ke
                           const char *command,
                           const char *message,
                           int         screen_number,
-                          Time        timestamp)
+                          guint32     timestamp)
 {
   GError *err;
   char *argv[10];
@@ -2635,7 +2635,7 @@ error_on_generic_command (const char *ke
   char timestampbuf[32];
   
   sprintf (numbuf, "%d", screen_number);
-  sprintf (timestampbuf, "%lu", timestamp);
+  sprintf (timestampbuf, "%lu", (unsigned long)timestamp);
   
   argv[0] = METACITY_LIBEXECDIR"/metacity-dialog";
   argv[1] = "--screen";
@@ -2671,7 +2671,7 @@ error_on_command (int         command_in
                   const char *command,
                   const char *message,
                   int         screen_number,
-                  Time        timestamp)
+                  guint32     timestamp)
 {
   char *key;
   
@@ -2689,7 +2689,7 @@ static void
 error_on_terminal_command (const char *command,
                            const char *message,
                            int         screen_number,
-                           Time        timestamp)
+                           guint32     timestamp)
 {
   const char *key;
   
Index: src/keybindings.h
===================================================================
RCS file: /cvs/gnome/metacity/src/keybindings.h,v
retrieving revision 1.9
diff -p -u -r1.9 keybindings.h
--- src/keybindings.h	9 Sep 2006 20:19:56 -0000	1.9
+++ src/keybindings.h	11 Sep 2006 20:56:12 -0000
@@ -29,16 +29,16 @@ void     meta_display_init_keys         
 void     meta_display_shutdown_keys         (MetaDisplay *display);
 void     meta_screen_grab_keys              (MetaScreen  *screen);
 void     meta_screen_ungrab_keys            (MetaScreen  *screen);
-gboolean meta_screen_grab_all_keys          (MetaScreen *screen,
-                                             Time timestamp);
-void     meta_screen_ungrab_all_keys        (MetaScreen *screen, 
-                                             Time timestamp);
+gboolean meta_screen_grab_all_keys          (MetaScreen  *screen,
+                                             guint32      timestamp);
+void     meta_screen_ungrab_all_keys        (MetaScreen  *screen, 
+                                             guint32      timestamp);
 void     meta_window_grab_keys              (MetaWindow  *window);
 void     meta_window_ungrab_keys            (MetaWindow  *window);
 gboolean meta_window_grab_all_keys          (MetaWindow  *window,
-                                             Time         timestamp);
+                                             guint32      timestamp);
 void     meta_window_ungrab_all_keys        (MetaWindow  *window,
-                                             Time         timestamp);
+                                             guint32      timestamp);
 void     meta_display_process_key_event     (MetaDisplay *display,
                                              MetaWindow  *window,
                                              XEvent      *event);
Index: src/metacity-dialog.c
===================================================================
RCS file: /cvs/gnome/metacity/src/metacity-dialog.c,v
retrieving revision 1.19
diff -p -u -r1.19 metacity-dialog.c
--- src/metacity-dialog.c	7 Sep 2006 22:57:36 -0000	1.19
+++ src/metacity-dialog.c	11 Sep 2006 20:56:12 -0000
@@ -79,7 +79,7 @@ on_realize (GtkWidget *dialog,
 static int
 kill_window_question (const char *window_name,
                       const char *parent_str,
-                      Time        timestamp)
+                      guint32     timestamp)
 {
   GtkWidget *dialog;
   char *str, *tmp;
@@ -227,8 +227,8 @@ create_lame_apps_list (char **lame_apps)
 }
 
 static int
-warn_about_no_sm_support (char **lame_apps,
-                          Time   timestamp)
+warn_about_no_sm_support (char    **lame_apps,
+                          guint32   timestamp)
 {
   GtkWidget *dialog;
   GtkWidget *list;
@@ -295,7 +295,7 @@ static int
 error_about_command (const char *gconf_key,
                      const char *command,
                      const char *error,
-                     Time        timestamp)
+                     guint32     timestamp)
 {
   GtkWidget *dialog;
 
@@ -350,7 +350,7 @@ int
 main (int argc, char **argv)
 {
   GOptionContext *ctx;
-  Time timestamp = 0;
+  guint32 timestamp = 0;
   gint num_args = 0;
 
   bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
Index: src/screen.c
===================================================================
RCS file: /cvs/gnome/metacity/src/screen.c,v
retrieving revision 1.159
diff -p -u -r1.159 screen.c
--- src/screen.c	7 Aug 2006 17:18:33 -0000	1.159
+++ src/screen.c	11 Sep 2006 20:56:12 -0000
@@ -367,7 +367,7 @@ reload_xinerama_infos (MetaScreen *scree
 MetaScreen*
 meta_screen_new (MetaDisplay *display,
                  int          number,
-                 Time         timestamp)
+                 guint32      timestamp)
 {
   MetaScreen *screen;
   Window xroot;
@@ -378,7 +378,7 @@ meta_screen_new (MetaDisplay *display,
   gboolean replace_current_wm;
   Atom wm_sn_atom;
   char buf[128];
-  Time manager_timestamp;
+  guint32 manager_timestamp;
   gulong current_workspace;
   
   replace_current_wm = meta_get_replace_current_wm ();
@@ -2287,7 +2287,7 @@ meta_screen_minimize_all_on_active_works
 
 void
 meta_screen_show_desktop (MetaScreen *screen, 
-                          Time        timestamp)
+                          guint32     timestamp)
 {
   GList *windows;
 
@@ -2604,7 +2604,7 @@ meta_screen_apply_startup_properties (Me
   if (sequence != NULL)
     {
       int space;
-      Time timestamp;
+      guint32 timestamp;
           
       meta_topic (META_DEBUG_STARTUP,
                   "Found startup sequence for window %s ID \"%s\"\n",
@@ -2629,7 +2629,7 @@ meta_screen_apply_startup_properties (Me
           timestamp = sn_startup_sequence_get_timestamp (sequence);
           meta_topic (META_DEBUG_STARTUP,
                       "Setting initial window timestamp to %lu based on startup info\n",
-                      timestamp);
+                      (unsigned long)timestamp);
               
           window->initial_timestamp_set = TRUE;
           window->initial_timestamp = timestamp;
Index: src/screen.h
===================================================================
RCS file: /cvs/gnome/metacity/src/screen.h,v
retrieving revision 1.70
diff -p -u -r1.70 screen.h
--- src/screen.h	16 Feb 2006 20:26:05 -0000	1.70
+++ src/screen.h	11 Sep 2006 20:56:12 -0000
@@ -87,7 +87,7 @@ struct _MetaScreen
 
   Window wm_sn_selection_window;
   Atom wm_sn_atom;
-  Time wm_sn_timestamp;
+  guint32 wm_sn_timestamp;
   
   MetaXineramaScreenInfo *xinerama_infos;
   int n_xinerama_infos;
@@ -122,7 +122,7 @@ struct _MetaScreen
 
 MetaScreen*   meta_screen_new                 (MetaDisplay                *display,
                                                int                         number,
-                                               Time                        timestamp);
+                                               guint32                     timestamp);
 void          meta_screen_free                (MetaScreen                 *screen);
 void          meta_screen_manage_all_windows  (MetaScreen                 *screen);
 MetaScreen*   meta_screen_for_x_screen        (Screen                     *xscreen);
@@ -197,7 +197,7 @@ void     meta_screen_minimize_all_on_act
 
 /* Show/hide the desktop (temporarily hide all windows) */
 void     meta_screen_show_desktop        (MetaScreen *screen,
-                                          Time        timestamp);
+                                          guint32     timestamp);
 void     meta_screen_unshow_desktop      (MetaScreen *screen);
 
 /* Update whether the destkop is being shown for the current active_workspace */
Index: src/session.c
===================================================================
RCS file: /cvs/gnome/metacity/src/session.c,v
retrieving revision 1.41
diff -p -u -r1.41 session.c
--- src/session.c	20 Jan 2006 22:03:55 -0000	1.41
+++ src/session.c	11 Sep 2006 20:56:12 -0000
@@ -1790,7 +1790,7 @@ warn_about_lame_clients_and_finish_inter
   GError *err;
   GIOChannel *channel;
   LameClientsDialogData *d;
-  Time timestamp;
+  guint32 timestamp;
   char timestampbuf[32];
   
   lame = NULL;
@@ -1855,7 +1855,7 @@ warn_about_lame_clients_and_finish_inter
 
       timestamp = property_event.xproperty.time;
     }
-  sprintf (timestampbuf, "%lu", timestamp);
+  sprintf (timestampbuf, "%lu", (unsigned long)timestamp);
 
   len = g_slist_length (lame);
   len *= 2; /* titles and also classes */
Index: src/window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.447
diff -p -u -r1.447 window.c
--- src/window.c	21 Aug 2006 18:08:04 -0000	1.447
+++ src/window.c	11 Sep 2006 20:56:12 -0000
@@ -1634,7 +1634,7 @@ meta_window_queue_calc_showing (MetaWind
 static gboolean
 intervening_user_event_occurred (MetaWindow *window)
 {
-  Time compare;
+  guint32 compare;
   MetaWindow *focus_window;
 
   focus_window = window->display->focus_window;
@@ -1646,9 +1646,9 @@ intervening_user_event_occurred (MetaWin
               "  initial_timestamp_set: %d\n"
               "  initial_timestamp    : %lu\n",
               window->net_wm_user_time_set,
-              window->net_wm_user_time,
+              (unsigned long)window->net_wm_user_time,
               window->initial_timestamp_set,
-              window->initial_timestamp);
+              (unsigned long)window->initial_timestamp);
   if (focus_window != NULL)
     {
       meta_topic (META_DEBUG_STARTUP,
@@ -1658,7 +1658,7 @@ intervening_user_event_occurred (MetaWin
                   "  fw->net_wm_user_time     : %lu\n",
                   focus_window->desc,
                   focus_window->net_wm_user_time_set,
-                  focus_window->net_wm_user_time);
+                  (unsigned long)focus_window->net_wm_user_time);
     }
 
   /* We expect the most common case for not focusing a new window
@@ -1711,8 +1711,9 @@ intervening_user_event_occurred (MetaWin
     {
       meta_topic (META_DEBUG_STARTUP,
                   "window %s focus prevented by other activity; %lu < %lu\n",
-                  window->desc, compare, 
-                  focus_window->net_wm_user_time);
+                  window->desc,
+                  (unsigned long)compare, 
+                  (unsigned long)focus_window->net_wm_user_time);
       return TRUE;
     }
   else
@@ -2540,7 +2541,7 @@ window_activate (MetaWindow     *window,
       meta_topic (META_DEBUG_FOCUS,
                   "last_user_time (%lu) is more recent; ignoring "
                   " _NET_ACTIVE_WINDOW message.\n",
-                  window->display->last_user_time);
+                  (unsigned long)window->display->last_user_time);
       meta_window_set_demands_attention(window);
       return;
     }
@@ -3737,7 +3738,7 @@ get_modal_transient (MetaWindow *window)
 /* XXX META_EFFECT_FOCUS */
 void
 meta_window_focus (MetaWindow  *window,
-                   Time         timestamp)
+                   guint32      timestamp)
 {  
   MetaWindow *modal_transient;
 
@@ -4122,7 +4123,7 @@ meta_window_lower (MetaWindow  *window)
 void
 meta_window_send_icccm_message (MetaWindow *window,
                                 Atom        atom,
-                                Time        timestamp)
+                                guint32     timestamp)
 {
   /* This comment and code are from twm, copyright
    * Open Group, Evans & Sutherland, etc.
@@ -4354,9 +4355,9 @@ meta_window_configure_request (MetaWindo
                       "user_time %lu); currently active application is %s (with "
                       "user_time %lu).\n",
                       window->desc,
-                      window->net_wm_user_time,
+                      (unsigned long)window->net_wm_user_time,
                       active_window->desc,
-                      active_window->net_wm_user_time);
+                      (unsigned long)active_window->net_wm_user_time);
           if (event->xconfigurerequest.detail == Above)
             meta_window_set_demands_attention(window);
         }
@@ -4411,7 +4412,7 @@ meta_window_client_message (MetaWindow *
   if (event->xclient.message_type ==
       display->atom_net_close_window)
     {
-      Time timestamp;
+      guint32 timestamp;
 
       if (event->xclient.data.l[0] != 0)
 	timestamp = event->xclient.data.l[0];
@@ -6044,7 +6045,7 @@ static void
 menu_callback (MetaWindowMenu *menu,
                Display        *xdisplay,
                Window          client_xwindow,
-	       Time	       timestamp,
+               guint32         timestamp,
                MetaMenuOp      op,
                int             workspace_index,
                gpointer        data)
@@ -6187,7 +6188,7 @@ meta_window_show_menu (MetaWindow *windo
                        int         root_x,
                        int         root_y,
                        int         button,
-                       Time        timestamp)
+                       guint32     timestamp)
 {
   MetaMenuOp ops;
   MetaMenuOp insensitive;
@@ -6919,8 +6920,8 @@ update_resize (MetaWindow *window,
 typedef struct
 {
   const XEvent *current_event;
-  int count;
-  Time last_time;
+  int           count;
+  guint32       last_time;
 } EventScannerData;
 
 static Bool
@@ -7548,7 +7549,7 @@ warp_grab_pointer (MetaWindow          *
 void
 meta_window_begin_grab_op (MetaWindow *window,
                            MetaGrabOp  op,
-                           Time        timestamp)
+                           guint32     timestamp)
 {
   int x, y;
   gulong grab_start_serial;
@@ -7689,7 +7690,7 @@ meta_window_stack_just_below (MetaWindow
 
 void
 meta_window_set_user_time (MetaWindow *window,
-                           Time        timestamp)
+                           guint32     timestamp)
 {
   /* FIXME: If Soeren's suggestion in bug 151984 is implemented, it will allow
    * us to sanity check the timestamp here and ensure it doesn't correspond to
@@ -7703,14 +7704,15 @@ meta_window_set_user_time (MetaWindow *w
       meta_topic (META_DEBUG_STARTUP,
                   "Window %s _NET_WM_USER_TIME not updated to %lu, because it "
                   "is less than %lu\n",
-                  window->desc, timestamp, window->net_wm_user_time);
-
+                  window->desc,
+                  (unsigned long)timestamp,
+                  (unsigned long)window->net_wm_user_time);
     }
   else
     {
       meta_topic (META_DEBUG_STARTUP,
                   "Window %s has _NET_WM_USER_TIME of %lu\n",
-                  window->desc, timestamp);
+                  window->desc, (unsigned long)timestamp);
       window->net_wm_user_time_set = TRUE;
       window->net_wm_user_time = timestamp;
       if (XSERVER_TIME_IS_BEFORE (window->display->last_user_time, timestamp))
Index: src/window.h
===================================================================
RCS file: /cvs/gnome/metacity/src/window.h,v
retrieving revision 1.132
diff -p -u -r1.132 window.h
--- src/window.h	21 Aug 2006 18:08:05 -0000	1.132
+++ src/window.h	11 Sep 2006 20:56:12 -0000
@@ -118,7 +118,7 @@ struct _MetaWindow
   int initial_workspace;  
   
   /* Initial timestamp property */
-  Time initial_timestamp;  
+  guint32 initial_timestamp;  
   
   /* Whether we're maximized */
   guint maximized_horizontally : 1;
@@ -312,7 +312,7 @@ struct _MetaWindow
 
   /* set to the most recent user-interaction event timestamp that we
      know about for this window */
-  Time net_wm_user_time;
+  guint32 net_wm_user_time;
   
   /* The size we set the window to last (i.e. what we believe
    * to be its actual size on the server). The x, y are
@@ -486,10 +486,10 @@ void        meta_window_update_wireframe
 void        meta_window_end_wireframe (MetaWindow *window);
 
 void        meta_window_delete             (MetaWindow  *window,
-                                            Time         timestamp);
+                                            guint32      timestamp);
 void        meta_window_kill               (MetaWindow  *window);
 void        meta_window_focus              (MetaWindow  *window,
-                                            Time         timestamp);
+                                            guint32      timestamp);
 void        meta_window_raise              (MetaWindow  *window);
 void        meta_window_lower              (MetaWindow  *window);
 
@@ -498,7 +498,7 @@ void        meta_window_update_unfocused
 /* Sends a client message */
 void meta_window_send_icccm_message (MetaWindow *window,
                                      Atom        atom,
-                                     Time        timestamp);
+                                     guint32     timestamp);
 
 
 gboolean meta_window_configure_request (MetaWindow *window,
@@ -518,7 +518,7 @@ void meta_window_show_menu (MetaWindow *
                             int         root_x,
                             int         root_y,
                             int         button,
-                            Time        timestamp);
+                            guint32     timestamp);
 
 gboolean meta_window_titlebar_is_onscreen    (MetaWindow *window);
 void     meta_window_shove_titlebar_onscreen (MetaWindow *window);
@@ -572,7 +572,7 @@ MetaWindow* meta_window_find_root_ancest
 
 void meta_window_begin_grab_op (MetaWindow *window,
                                 MetaGrabOp  op,
-                                Time        timestamp);
+                                guint32     timestamp);
 
 void meta_window_update_keyboard_resize (MetaWindow *window,
                                          gboolean    update_cursor);
@@ -594,7 +594,7 @@ void meta_window_stack_just_below (MetaW
                                    MetaWindow *below_this_one);
 
 void meta_window_set_user_time (MetaWindow *window,
-                                Time        timestamp);
+                                guint32     timestamp);
 
 void meta_window_set_demands_attention (MetaWindow *window);
 
Index: src/workspace.c
===================================================================
RCS file: /cvs/gnome/metacity/src/workspace.c,v
retrieving revision 1.80
diff -p -u -r1.80 workspace.c
--- src/workspace.c	11 Feb 2006 05:06:08 -0000	1.80
+++ src/workspace.c	11 Sep 2006 20:56:12 -0000
@@ -32,7 +32,7 @@ void meta_workspace_queue_calc_showing  
 static void set_active_space_hint        (MetaScreen *screen);
 static void focus_ancestor_or_mru_window (MetaWorkspace *workspace,
                                           MetaWindow    *not_this_one,
-                                          Time           timestamp);
+                                          guint32        timestamp);
 
 static void
 maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
@@ -274,7 +274,7 @@ meta_workspace_queue_calc_showing  (Meta
 void
 meta_workspace_activate_with_focus (MetaWorkspace *workspace,
                                     MetaWindow    *focus_this,
-                                    Time           timestamp)
+                                    guint32        timestamp)
 {
   MetaWorkspace *old;
   MetaWindow *move_window;
@@ -350,7 +350,7 @@ meta_workspace_activate_with_focus (Meta
 
 void
 meta_workspace_activate (MetaWorkspace *workspace,
-                         Time           timestamp)
+                         guint32        timestamp)
 {
   meta_workspace_activate_with_focus (workspace, NULL, timestamp);
 }
@@ -872,7 +872,7 @@ meta_workspace_get_name (MetaWorkspace *
 void
 meta_workspace_focus_default_window (MetaWorkspace *workspace,
                                      MetaWindow    *not_this_one,
-                                     Time           timestamp)
+                                     guint32        timestamp)
 {
   if (timestamp == CurrentTime)
     {
@@ -949,7 +949,7 @@ record_ancestor (MetaWindow *window,
 static void
 focus_ancestor_or_mru_window (MetaWorkspace *workspace,
                               MetaWindow    *not_this_one,
-                              Time           timestamp)
+                              guint32        timestamp)
 {
   MetaWindow *window = NULL;
   MetaWindow *desktop_window = NULL;
Index: src/workspace.h
===================================================================
RCS file: /cvs/gnome/metacity/src/workspace.h,v
retrieving revision 1.24
diff -p -u -r1.24 workspace.h
--- src/workspace.h	11 Feb 2006 05:06:08 -0000	1.24
+++ src/workspace.h	11 Sep 2006 20:56:12 -0000
@@ -67,9 +67,9 @@ void           meta_workspace_relocate_w
                                                 MetaWorkspace *new_home);
 void           meta_workspace_activate_with_focus (MetaWorkspace *workspace,
                                                    MetaWindow    *focus_this,
-                                                   Time           timestamp);
+                                                   guint32        timestamp);
 void           meta_workspace_activate            (MetaWorkspace *workspace,
-                                                   Time           timestamp);
+                                                   guint32        timestamp);
 int            meta_workspace_index         (MetaWorkspace *workspace);
 GList*         meta_workspace_list_windows  (MetaWorkspace *workspace);
 
@@ -89,7 +89,7 @@ void meta_workspace_get_work_area_all_xi
 
 void meta_workspace_focus_default_window (MetaWorkspace *workspace,
                                           MetaWindow    *not_this_one,
-                                          Time           timestamp);
+                                          guint32        timestamp);
 
 MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace      *workspace,
                                             MetaMotionDirection direction);
