[mutter] MetaDisplay: Renamed 'ignored_serials' for clarity



commit e1362562b4f8faabad467be67d79e078f48ba4e9
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Sep 12 09:50:30 2011 -0400

    MetaDisplay: Renamed 'ignored_serials' for clarity
    
    The ignored_serials member of Display refers explicitly to crossing
    serials - rename the member and associated functions and constants
    for clarity.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=597190

 src/core/display-private.h |    4 ++--
 src/core/display.c         |   30 +++++++++++++++---------------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index c2129d0..6d9d648 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -77,7 +77,7 @@ typedef enum {
  * also has to be big enough to hold ignored serials from the point
  * where we reshape the stage to the point where we get events back.
  */
-#define N_IGNORED_SERIALS           10
+#define N_IGNORED_CROSSING_SERIALS  10
 
 typedef enum {
   META_TILE_NONE,
@@ -155,7 +155,7 @@ struct _MetaDisplay
    * correspond to an enter event we should
    * ignore
    */
-  unsigned long ignored_serials[N_IGNORED_SERIALS];
+  unsigned long ignored_crossing_serials[N_IGNORED_CROSSING_SERIALS];
   Window ungrab_should_not_cause_focus_window;
   
   guint32 current_time;
diff --git a/src/core/display.c b/src/core/display.c
index 76697e1..9e866aa 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -532,9 +532,9 @@ meta_display_open (void)
                                           meta_unsigned_long_equal);
   
   i = 0;
-  while (i < N_IGNORED_SERIALS)
+  while (i < N_IGNORED_CROSSING_SERIALS)
     {
-      the_display->ignored_serials[i] = 0;
+      the_display->ignored_crossing_serials[i] = 0;
       ++i;
     }
   the_display->ungrab_should_not_cause_focus_window = None;
@@ -1401,30 +1401,30 @@ meta_display_add_ignored_crossing_serial (MetaDisplay  *display,
   int i;
 
   /* don't add the same serial more than once */
-  if (display->ignored_serials[N_IGNORED_SERIALS-1] == serial)
+  if (display->ignored_crossing_serials[N_IGNORED_CROSSING_SERIALS-1] == serial)
     return;
   
   /* shift serials to the left */
   i = 0;
-  while (i < (N_IGNORED_SERIALS - 1))
+  while (i < (N_IGNORED_CROSSING_SERIALS - 1))
     {
-      display->ignored_serials[i] = display->ignored_serials[i+1];
+      display->ignored_crossing_serials[i] = display->ignored_crossing_serials[i+1];
       ++i;
     }
   /* put new one on the end */
-  display->ignored_serials[i] = serial;
+  display->ignored_crossing_serials[i] = serial;
 }
 
 static gboolean
-serial_is_ignored (MetaDisplay  *display,
-                   unsigned long serial)
+crossing_serial_is_ignored (MetaDisplay  *display,
+                            unsigned long serial)
 {
   int i;
 
   i = 0;
-  while (i < N_IGNORED_SERIALS)
+  while (i < N_IGNORED_CROSSING_SERIALS)
     {
-      if (display->ignored_serials[i] == serial)
+      if (display->ignored_crossing_serials[i] == serial)
         return TRUE;
       ++i;
     }
@@ -1432,14 +1432,14 @@ serial_is_ignored (MetaDisplay  *display,
 }
 
 static void
-reset_ignores (MetaDisplay *display)
+reset_ignored_crossing_serials (MetaDisplay *display)
 {
   int i;
 
   i = 0;
-  while (i < N_IGNORED_SERIALS)
+  while (i < N_IGNORED_CROSSING_SERIALS)
     {
-      display->ignored_serials[i] = 0;
+      display->ignored_crossing_serials[i] = 0;
       ++i;
     }
 
@@ -2000,7 +2000,7 @@ event_callback (XEvent   *event,
       /* Check if we've entered a window; do this even if window->has_focus to
        * avoid races.
        */
-      if (window && !serial_is_ignored (display, event->xany.serial) &&
+      if (window && !crossing_serial_is_ignored (display, event->xany.serial) &&
                event->xcrossing.mode != NotifyGrab && 
                event->xcrossing.mode != NotifyUngrab &&
                event->xcrossing.detail != NotifyInferior &&
@@ -2025,7 +2025,7 @@ event_callback (XEvent   *event,
                   meta_window_focus (window, event->xcrossing.time);
 
                   /* stop ignoring stuff */
-                  reset_ignores (display);
+                  reset_ignored_crossing_serials (display);
                   
                   if (meta_prefs_get_auto_raise ()) 
                     {



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