[mutter] frames: Remove expose_delayed



commit fc87a635b20cd5928e155f895907436c68633222
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 30 16:06:24 2012 -0400

    frames: Remove expose_delayed
    
    This was introduced for the effects API and wireframe mode, and was
    forgotten when that went the way of the dinosaur.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671104

 src/ui/frames.c |   54 ------------------------------------------------------
 src/ui/frames.h |    6 ------
 src/ui/ui.c     |   12 ------------
 src/ui/ui.h     |    7 -------
 4 files changed, 0 insertions(+), 79 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index a5757e9..9e87f67 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -261,8 +261,6 @@ meta_frames_init (MetaFrames *frames)
   
   frames->frames = g_hash_table_new (unsigned_long_hash, unsigned_long_equal);
 
-  frames->expose_delay_count = 0;
-
   frames->invalidate_cache_timeout_id = 0;
   frames->invalidate_frames = NULL;
   frames->cache = g_hash_table_new (g_direct_hash, g_direct_equal);
@@ -698,7 +696,6 @@ meta_frames_manage_window (MetaFrames *frames,
   frame->layout = NULL;
   frame->text_height = -1;
   frame->title = NULL;
-  frame->expose_delayed = FALSE;
   frame->shape_applied = FALSE;
   frame->prelit_control = META_FRAME_CONTROL_NONE;
 
@@ -2141,13 +2138,6 @@ meta_frames_draw (GtkWidget *widget,
   if (frame == NULL)
     return FALSE;
 
-  if (frames->expose_delay_count > 0)
-    {
-      /* Redraw this entire frame later */
-      frame->expose_delayed = TRUE;
-      return TRUE;
-    }
-
   populate_cache (frames, frame);
 
   region = cairo_region_create_rectangle (&clip);
@@ -2620,50 +2610,6 @@ get_control (MetaFrames *frames,
     return META_FRAME_CONTROL_TITLE;
 }
 
-void
-meta_frames_push_delay_exposes (MetaFrames *frames)
-{
-  if (frames->expose_delay_count == 0)
-    {
-      /* Make sure we've repainted things */
-      gdk_window_process_all_updates ();
-      XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-    }
-  
-  frames->expose_delay_count += 1;
-}
-
-static void
-queue_pending_exposes_func (gpointer key, gpointer value, gpointer data)
-{
-  MetaUIFrame *frame;
-  MetaFrames *frames;
-
-  frames = META_FRAMES (data);
-  frame = value;
-
-  if (frame->expose_delayed)
-    {
-      invalidate_whole_window (frames, frame);
-      frame->expose_delayed = FALSE;
-    }
-}
-
-void
-meta_frames_pop_delay_exposes  (MetaFrames *frames)
-{
-  g_return_if_fail (frames->expose_delay_count > 0);
-  
-  frames->expose_delay_count -= 1;
-
-  if (frames->expose_delay_count == 0)
-    {
-      g_hash_table_foreach (frames->frames,
-                            queue_pending_exposes_func,
-                            frames);
-    }
-}
-
 static void
 invalidate_whole_window (MetaFrames *frames,
                          MetaUIFrame *frame)
diff --git a/src/ui/frames.h b/src/ui/frames.h
index 02d6b5b..b42c651 100644
--- a/src/ui/frames.h
+++ b/src/ui/frames.h
@@ -80,7 +80,6 @@ struct _MetaUIFrame
   PangoLayout *layout;
   int text_height;
   char *title; /* NULL once we have a layout */
-  guint expose_delayed : 1;
   guint shape_applied : 1;
   
   /* FIXME get rid of this, it can just be in the MetaFrames struct */
@@ -99,8 +98,6 @@ struct _MetaFrames
   GtkStyleContext *normal_style;
   GHashTable *style_variants;
 
-  int expose_delay_count;
-
   int invalidate_cache_timeout_id;
   GList *invalidate_frames;
   GHashTable *cache;
@@ -167,7 +164,4 @@ void meta_frames_notify_menu_hide (MetaFrames *frames);
 
 Window meta_frames_get_moving_frame (MetaFrames *frames);
 
-void meta_frames_push_delay_exposes (MetaFrames *frames);
-void meta_frames_pop_delay_exposes  (MetaFrames *frames);
-
 #endif
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 8a0aad8..b0ca41d 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -588,18 +588,6 @@ meta_gdk_pixbuf_get_from_pixmap (Pixmap       xpixmap,
   return retval;
 }
 
-void
-meta_ui_push_delay_exposes (MetaUI *ui)
-{
-  meta_frames_push_delay_exposes (ui->frames);
-}
-
-void
-meta_ui_pop_delay_exposes  (MetaUI *ui)
-{
-  meta_frames_pop_delay_exposes (ui->frames);
-}
-
 GdkPixbuf*
 meta_ui_get_default_window_icon (MetaUI *ui)
 {
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 7101853..3675b3a 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -143,13 +143,6 @@ GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap       xpixmap,
                                             int          width,
                                             int          height);
 
-/* Used when we have a server grab and draw all over everything,
- * then we need to handle exposes after doing that, instead of
- * during it
- */
-void      meta_ui_push_delay_exposes (MetaUI *ui);
-void      meta_ui_pop_delay_exposes  (MetaUI *ui);
-
 GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
 GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
 



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