[gtk+/xi2: 781/1239] Remove display->pointer_info.



commit 5f39d94f4ccd93f8c27bda1f9d109a321bad3553
Author: Carlos Garnacho <carlos lanedo com>
Date:   Sun Aug 16 22:31:48 2009 +0200

    Remove display->pointer_info.

 gdk/gdkdisplay.c |    8 ++++----
 gdk/gdkdisplay.h |    4 +---
 gdk/gdkwindow.c  |   12 +++---------
 3 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 3c7d42b..52cd7cc 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -461,7 +461,7 @@ _gdk_display_enable_motion_hints (GdkDisplay *display)
 {
   gulong serial;
   
-  if (display->pointer_info.motion_hint_serial != 0)
+  if (display->motion_hint_serial != 0)
     {
       serial = _gdk_windowing_window_get_next_serial (display);
       /* We might not actually generate the next request, so
@@ -470,8 +470,8 @@ _gdk_display_enable_motion_hints (GdkDisplay *display)
 	 anyway. */
       if (serial > 0)
 	serial--;
-      if (serial < display->pointer_info.motion_hint_serial)
-	display->pointer_info.motion_hint_serial = serial;
+      if (serial < display->motion_hint_serial)
+	display->motion_hint_serial = serial;
     }
 }
 
@@ -1187,7 +1187,7 @@ _gdk_display_get_pointer_info (GdkDisplay *display,
   GdkPointerWindowInfo *info;
 
   if (G_UNLIKELY (!device))
-    return &display->pointer_info;
+    return NULL;
 
   info = g_hash_table_lookup (display->pointers_info, device);
 
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index e81df53..2fd775e 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -67,7 +67,6 @@ typedef struct
   gdouble toplevel_x, toplevel_y; 
   guint32 state;
   guint32 button;
-  gulong motion_hint_serial; /* 0 == didn't deliver hinted motion event */
 } GdkPointerWindowInfo;
 
 typedef struct
@@ -105,8 +104,7 @@ struct _GdkDisplay
   GList *pointer_grabs;
   GdkKeyboardGrabInfo keyboard_grab;
 
-  /* FIXME: should be removed at some point */
-  GdkPointerWindowInfo pointer_info;
+  gulong motion_hint_serial; /* 0 == didn't deliver hinted motion event */
 
   /* Hashtable containing a GdkPointerWindowInfo for each device */
   GHashTable *pointers_info;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index d6b48af..8186aab 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1635,12 +1635,6 @@ static void
 window_remove_from_pointer_info (GdkWindow  *window,
                                  GdkDisplay *display)
 {
-  if (display->pointer_info.toplevel_under_pointer == window)
-    {
-      g_object_unref (display->pointer_info.toplevel_under_pointer);
-      display->pointer_info.toplevel_under_pointer = NULL;
-    }
-
   _gdk_display_pointer_info_foreach (display,
                                      update_pointer_info_foreach,
                                      window);
@@ -9173,13 +9167,13 @@ proxy_pointer_event (GdkDisplay                 *display,
       if (event_win &&
 	  (evmask & GDK_POINTER_MOTION_HINT_MASK))
 	{
-	  if (display->pointer_info.motion_hint_serial != 0 &&
-	      serial < display->pointer_info.motion_hint_serial)
+	  if (display->motion_hint_serial != 0 &&
+	      serial < display->motion_hint_serial)
 	    event_win = NULL; /* Ignore event */
 	  else
 	    {
 	      is_hint = TRUE;
-	      display->pointer_info.motion_hint_serial = G_MAXULONG;
+	      display->motion_hint_serial = G_MAXULONG;
 	    }
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]