[metacity/remove-reduced-resources: 23/23] remove reduced-resources setting



commit aab0e5f7c390f2ba5c95498e5d28a88467b7f5f1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Mar 6 03:03:59 2020 +0200

    remove reduced-resources setting
    
    Reduced resources setting was used to disable minimize effect and
    to show wireframe when moving or resizing windows.
    
    Minimize effect still can be disabled by using enable-animations
    setting from org.gnome.desktop.interface schema. And if you are
    really trying to reduce resource usage you probably already have
    animations disabled.
    
    Wireframe mode has not been updated/fixed to work with CSD windows
    and/or to exclude shadow/resize area from SSD windows. Also quickly
    testing with and without compositor wireframe sometimes leaves
    parts of frame on screen.
    
    Considering that there has not been any bug report about broken
    wireframe mode I think it is time to remove it instead of wasting
    time trying to fix something that nobody is using.

 README                                      |  16 --
 data/schemas/org.gnome.metacity.gschema.xml |  14 --
 src/core/display-private.h                  |   6 -
 src/core/display.c                          |  38 +----
 src/core/edge-resistance.c                  |  26 +---
 src/core/effects.c                          | 231 ----------------------------
 src/core/effects.h                          |  73 ---------
 src/core/keybindings.c                      | 117 ++++----------
 src/core/prefs.c                            |  18 ---
 src/core/screen-private.h                   |   5 -
 src/core/screen.c                           |  46 ------
 src/core/window-private.h                   |  10 --
 src/core/window.c                           | 230 ++-------------------------
 src/include/prefs.h                         |   2 -
 src/include/ui.h                            |   7 -
 src/ui/frames.c                             |  68 +-------
 src/ui/frames.h                             |   3 -
 src/ui/ui.c                                 |  12 --
 18 files changed, 50 insertions(+), 872 deletions(-)
---
diff --git a/README b/README
index 4486d3bc..47da3dde 100644
--- a/README
+++ b/README
@@ -364,22 +364,6 @@ A: This one is also in rationales.txt. Because "ouija board" UI, where
      http://pobox.com/~hp/free-software-ui.html
      http://pobox.com/~hp/features.html   
 
-Q: Why does wireframe move/resize suck?
-
-A: You can turn it on with the reduced_resources setting.
-
-   But: it has low usability, and is a pain
-   to implement, and there's no reason opaque move/resize should be a
-   problem on any setup that can run a modern desktop worth a darn to
-   begin with.
-
-   Read these and the bugzilla stuff before asking/commenting:
-     http://pobox.com/~hp/free-software-ui.html
-     http://pobox.com/~hp/features.html   
-
-   The reason we had to add wireframe anyway was broken 
-   proprietary apps that can't handle lots of resize events.
-
 Q: Why no XYZ?
 
 A: You are probably getting the idea by now - check rationales.txt,
diff --git a/data/schemas/org.gnome.metacity.gschema.xml b/data/schemas/org.gnome.metacity.gschema.xml
index 1fc08f4d..7357f7c7 100644
--- a/data/schemas/org.gnome.metacity.gschema.xml
+++ b/data/schemas/org.gnome.metacity.gschema.xml
@@ -52,20 +52,6 @@
       </description>
     </key>
 
-    <key name="reduced-resources" type="b">
-      <default>false</default>
-      <summary>If true, trade off usability for less resource usage</summary>
-      <description>
-        If true, Metacity will give the user less feedback by using wireframes,
-        avoiding animations, or other means. This is a significant reduction
-        in usability for many users, but may allow legacy applications to
-        continue working, and may also be a useful tradeoff
-        for terminal servers.
-
-        However, the wireframe feature is disabled when accessibility is on.
-      </description>
-    </key>
-
     <child schema="org.gnome.metacity.keybindings" name="keybindings" />
     <child schema="org.gnome.metacity.theme" name="theme" />
 
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 01642b32..805bd429 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -179,11 +179,7 @@ struct _MetaDisplay
   gulong      grab_mask;
   guint       grab_have_pointer : 1;
   guint       grab_have_keyboard : 1;
-  guint       grab_wireframe_active : 1;
-  guint       grab_was_cancelled : 1;    /* Only used in wireframe mode */
   guint       grab_frame_action : 1;
-  MetaRectangle grab_wireframe_rect;
-  MetaRectangle grab_wireframe_last_xor_rect;
   /* During a resize operation, the directions in which we've broken
    * out of the initial maximization state */
   guint       grab_resize_unmaximize : 2; /* MetaMaximizeFlags */
@@ -193,8 +189,6 @@ struct _MetaDisplay
   MetaResizePopup *grab_resize_popup;
   gint64      grab_last_moveresize_time;
   guint32     grab_motion_notify_time;
-  int         grab_wireframe_last_display_width;
-  int         grab_wireframe_last_display_height;
   GList*      grab_old_window_stacking;
   MetaEdgeResistanceData *grab_edge_resistance_data;
   unsigned int grab_last_user_action_was_snap;
diff --git a/src/core/display.c b/src/core/display.c
index 06d8b580..8264fa43 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -523,7 +523,6 @@ meta_display_open (void)
 #endif
 
   the_display->grab_op = META_GRAB_OP_NONE;
-  the_display->grab_wireframe_active = FALSE;
   the_display->grab_window = NULL;
   the_display->grab_screen = NULL;
   the_display->grab_resize_popup = NULL;
@@ -3691,7 +3690,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
   display->grab_motion_notify_time = 0;
   display->grab_old_window_stacking = NULL;
   display->grab_last_user_action_was_snap = FALSE;
-  display->grab_was_cancelled = FALSE;
   display->grab_frame_action = frame_action;
 
   if (display->grab_resize_timeout_id)
@@ -3706,19 +3704,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
                                           &display->grab_initial_window_pos);
       display->grab_anchor_window_pos = display->grab_initial_window_pos;
 
-      display->grab_wireframe_active =
-        (meta_prefs_get_reduced_resources () && !meta_prefs_get_gnome_accessibility ())  &&
-        (meta_grab_op_is_resizing (display->grab_op) ||
-         meta_grab_op_is_moving (display->grab_op));
-
-      if (display->grab_wireframe_active)
-        {
-          meta_window_calc_showing (display->grab_window);
-          meta_window_begin_wireframe (window);
-        }
-
-      if (!display->grab_wireframe_active &&
-          meta_grab_op_is_resizing (display->grab_op) &&
+      if (meta_grab_op_is_resizing (display->grab_op) &&
           display->grab_window->sync_request_counter != None)
         {
           meta_window_create_sync_request_alarm (display->grab_window);
@@ -3892,28 +3878,6 @@ meta_display_end_grab_op (MetaDisplay *display,
       display->grab_old_window_stacking = NULL;
     }
 
-  if (display->grab_wireframe_active)
-    {
-      display->grab_wireframe_active = FALSE;
-      meta_window_end_wireframe (display->grab_window);
-
-      if (!display->grab_was_cancelled)
-        {
-          if (meta_grab_op_is_moving (display->grab_op))
-            meta_window_move (display->grab_window,
-                              TRUE,
-                              display->grab_wireframe_rect.x,
-                              display->grab_wireframe_rect.y);
-          if (meta_grab_op_is_resizing (display->grab_op))
-            meta_window_resize_with_gravity (display->grab_window,
-                                             TRUE,
-                                             display->grab_wireframe_rect.width,
-                                             display->grab_wireframe_rect.height,
-                                             meta_resize_gravity_from_grab_op (display->grab_op));
-        }
-      meta_window_calc_showing (display->grab_window);
-    }
-
   if (display->grab_have_pointer)
     {
       meta_topic (META_DEBUG_WINDOW_OPS,
diff --git a/src/core/edge-resistance.c b/src/core/edge-resistance.c
index 23bf79f8..0b9609c5 100644
--- a/src/core/edge-resistance.c
+++ b/src/core/edge-resistance.c
@@ -1010,17 +1010,8 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
   MetaRectangle old_outer, proposed_outer, new_outer;
   gboolean is_resize;
 
-  if (window == window->display->grab_window &&
-      window->display->grab_wireframe_active)
-    {
-      meta_window_get_xor_rect (window,
-                                &window->display->grab_wireframe_rect,
-                                &old_outer);
-    }
-  else
-    {
-      meta_window_get_outer_rect (window, &old_outer);
-    }
+  meta_window_get_outer_rect (window, &old_outer);
+
   proposed_outer = old_outer;
   proposed_outer.x += (*new_x - old_x);
   proposed_outer.y += (*new_y - old_y);
@@ -1103,17 +1094,8 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
   int proposed_outer_width, proposed_outer_height;
   gboolean is_resize;
 
-  if (window == window->display->grab_window &&
-      window->display->grab_wireframe_active)
-    {
-      meta_window_get_xor_rect (window,
-                                &window->display->grab_wireframe_rect,
-                                &old_outer);
-    }
-  else
-    {
-      meta_window_get_outer_rect (window, &old_outer);
-    }
+  meta_window_get_outer_rect (window, &old_outer);
+
   proposed_outer_width  = old_outer.width  + (*new_width  - old_width);
   proposed_outer_height = old_outer.height + (*new_height - old_height);
   meta_rectangle_resize_with_gravity (&old_outer,
diff --git a/src/core/effects.c b/src/core/effects.c
index 5b74d21b..a10d09dc 100644
--- a/src/core/effects.c
+++ b/src/core/effects.c
@@ -1,41 +1,5 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
-/**
- * \file effects.c "Special effects" other than compositor effects.
- *
- * Before we had a serious compositor, we supported swooping
- * rectangles for minimising and so on.  These are still supported
- * today, even when the compositor is enabled.  The file contains two
- * parts:
- *
- *  1) A set of functions, each of which implements a special effect.
- *     (Only the minimize function does anything interesting; we should
- *      probably get rid of the rest.)
- *
- *  2) A set of functions for moving a highlighted wireframe box around
- *     the screen, optionally with height and width shown in the middle.
- *     This is used for moving and resizing when reduced_resources is set.
- *
- * There was formerly a system which allowed callers to drop in their
- * own handlers for various things; it was never used (people who want
- * their own handlers can just modify this file, after all) and it added
- * a good deal of extra complexity, so it has been removed.  If you want it,
- * it can be found in svn r3769.
- *
- * Once upon a time there were three different ways of drawing the box
- * animation: window wireframe, window opaque, and root. People who had
- * the shape extension theoretically had the choice of all three, and
- * people who didn't weren't given the choice of the wireframe option.
- * In practice, though, the opaque animation was never perfect, so it came
- * down to the wireframe option for those who had the extension and
- * the root option for those who didn't; there was actually no way of choosing
- * any other option anyway.  Work on the opaque animation stopped in 2002;
- * anyone who wants something like that these days will be using the
- * compositor anyway.
- *
- * In svn r3769 this was made explicit.
- */
-
 /*
  * Copyright (C) 2001 Anders Carlsson, Havoc Pennington
  *
@@ -275,198 +239,3 @@ draw_box_animation (MetaScreen     *screen,
   /* kick changes onto the server */
   XFlush (context->screen->display->xdisplay);
 }
-
-void
-meta_effects_begin_wireframe (MetaScreen          *screen,
-                              const MetaRectangle *rect,
-                              int                  width,
-                              int                  height)
-{
-  /* Grab the X server to avoid screen dirt */
-  meta_display_grab (screen->display);
-  meta_ui_push_delay_exposes (screen->ui);
-
-  meta_effects_update_wireframe (screen,
-                                 NULL, -1, -1,
-                                 rect, width, height);
-}
-
-static void
-draw_xor_rect (MetaScreen          *screen,
-               const MetaRectangle *rect,
-               int                  width,
-               int                  height)
-{
-  /* The lines in the center can't overlap the rectangle or each
-   * other, or the XOR gets reversed. So we have to draw things
-   * a bit oddly.
-   */
-  XSegment segments[8];
-  MetaRectangle shrunk_rect;
-  int i;
-
-#define LINE_WIDTH META_WIREFRAME_XOR_LINE_WIDTH
-
-  /* We don't want the wireframe going outside the window area.
-   * It makes it harder for the user to position windows and it exposes other
-   * annoying bugs.
-   */
-  shrunk_rect = *rect;
-
-  shrunk_rect.x += LINE_WIDTH / 2 + LINE_WIDTH % 2;
-  shrunk_rect.y += LINE_WIDTH / 2 + LINE_WIDTH % 2;
-  shrunk_rect.width -= LINE_WIDTH + 2 * (LINE_WIDTH % 2);
-  shrunk_rect.height -= LINE_WIDTH + 2 * (LINE_WIDTH % 2);
-
-  XDrawRectangle (screen->display->xdisplay,
-                  screen->xroot,
-                  screen->root_xor_gc,
-                  shrunk_rect.x, shrunk_rect.y,
-                  shrunk_rect.width, shrunk_rect.height);
-
-  /* Don't put lines inside small rectangles where they won't fit */
-  if (shrunk_rect.width < (LINE_WIDTH * 4) ||
-      shrunk_rect.height < (LINE_WIDTH * 4))
-    return;
-
-  if ((width >= 0) && (height >= 0))
-    {
-      XGCValues gc_values = { 0 };
-
-      if (XGetGCValues (screen->display->xdisplay,
-                        screen->root_xor_gc,
-                        GCFont, &gc_values))
-        {
-          char *text;
-          int text_length;
-
-          XFontStruct *font_struct;
-          int text_width, text_height;
-          int box_x, box_y;
-          int box_width, box_height;
-
-          font_struct = XQueryFont (screen->display->xdisplay,
-                                    gc_values.font);
-
-          if (font_struct != NULL)
-            {
-              text = g_strdup_printf ("%d x %d", width, height);
-              text_length = strlen (text);
-
-              text_width = text_length * font_struct->max_bounds.width;
-              text_height = font_struct->max_bounds.descent +
-                            font_struct->max_bounds.ascent;
-
-              box_width = text_width + 2 * LINE_WIDTH;
-              box_height = text_height + 2 * LINE_WIDTH;
-
-
-              box_x = shrunk_rect.x + (shrunk_rect.width - box_width) / 2;
-              box_y = shrunk_rect.y + (shrunk_rect.height - box_height) / 2;
-
-              if ((box_width < shrunk_rect.width) &&
-                  (box_height < shrunk_rect.height))
-                {
-                  XFillRectangle (screen->display->xdisplay,
-                                  screen->xroot,
-                                  screen->root_xor_gc,
-                                  box_x, box_y,
-                                  box_width, box_height);
-                  XDrawString (screen->display->xdisplay,
-                               screen->xroot,
-                               screen->root_xor_gc,
-                               box_x + LINE_WIDTH,
-                               box_y + LINE_WIDTH + font_struct->max_bounds.ascent,
-                               text, text_length);
-                }
-
-              g_free (text);
-
-              XFreeFontInfo (NULL, font_struct, 1);
-
-              if ((box_width + LINE_WIDTH) >= (shrunk_rect.width / 3))
-                return;
-
-              if ((box_height + LINE_WIDTH) >= (shrunk_rect.height / 3))
-                return;
-            }
-        }
-    }
-
-  /* Two vertical lines at 1/3 and 2/3 */
-  segments[0].x1 = shrunk_rect.x + shrunk_rect.width / 3;
-  segments[0].y1 = shrunk_rect.y + LINE_WIDTH / 2 + LINE_WIDTH % 2;
-  segments[0].x2 = segments[0].x1;
-  segments[0].y2 = shrunk_rect.y + shrunk_rect.height - LINE_WIDTH / 2;
-
-  segments[1] = segments[0];
-  segments[1].x1 = shrunk_rect.x + (shrunk_rect.width / 3) * 2;
-  segments[1].x2 = segments[1].x1;
-
-  /* Now make two horizontal lines at 1/3 and 2/3, but not
-   * overlapping the verticals
-   */
-
-  segments[2].x1 = shrunk_rect.x + LINE_WIDTH / 2 + LINE_WIDTH % 2;
-  segments[2].x2 = segments[0].x1 - LINE_WIDTH / 2;
-  segments[2].y1 = shrunk_rect.y + shrunk_rect.height / 3;
-  segments[2].y2 = segments[2].y1;
-
-  segments[3] = segments[2];
-  segments[3].x1 = segments[2].x2 + LINE_WIDTH;
-  segments[3].x2 = segments[1].x1 - LINE_WIDTH / 2;
-
-  segments[4] = segments[3];
-  segments[4].x1 = segments[3].x2 + LINE_WIDTH;
-  segments[4].x2 = shrunk_rect.x + shrunk_rect.width - LINE_WIDTH / 2;
-
-  /* Second horizontal line is just like the first, but
-   * shifted down
-   */
-  i = 5;
-  while (i < 8)
-    {
-      segments[i] = segments[i - 3];
-      segments[i].y1 = shrunk_rect.y + (shrunk_rect.height / 3) * 2;
-      segments[i].y2 = segments[i].y1;
-      ++i;
-    }
-
-  XDrawSegments (screen->display->xdisplay,
-                 screen->xroot,
-                 screen->root_xor_gc,
-                 segments,
-                 G_N_ELEMENTS (segments));
-}
-
-void
-meta_effects_update_wireframe (MetaScreen          *screen,
-                               const MetaRectangle *old_rect,
-                               int                  old_width,
-                               int                  old_height,
-                               const MetaRectangle *new_rect,
-                               int                  new_width,
-                               int                  new_height)
-{
-  if (old_rect)
-    draw_xor_rect (screen, old_rect, old_width, old_height);
-
-  if (new_rect)
-    draw_xor_rect (screen, new_rect, new_width, new_height);
-
-  XFlush (screen->display->xdisplay);
-}
-
-void
-meta_effects_end_wireframe (MetaScreen          *screen,
-                            const MetaRectangle *old_rect,
-                            int                  old_width,
-                            int                  old_height)
-{
-  meta_effects_update_wireframe (screen,
-                                 old_rect, old_width, old_height,
-                                 NULL, -1, -1);
-
-  meta_display_ungrab (screen->display);
-  meta_ui_pop_delay_exposes (screen->ui);
-}
diff --git a/src/core/effects.h b/src/core/effects.h
index b3bec8c8..2f354867 100644
--- a/src/core/effects.h
+++ b/src/core/effects.h
@@ -1,28 +1,5 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
-/**
- * \file effects.h "Special effects" other than compositor effects.
- *
- * Before we had a serious compositor, we supported swooping
- * rectangles for minimising and so on.  These are still supported
- * today, even when the compositor is enabled.  The file contains two
- * parts:
- *
- *  1) A set of functions, each of which implements a special effect.
- *     (Only the minimize function does anything interesting; we should
- *      probably get rid of the rest.)
- *
- *  2) A set of functions for moving a highlighted wireframe box around
- *     the screen, optionally with height and width shown in the middle.
- *     This is used for moving and resizing when reduced_resources is set.
- *
- * There was formerly a system which allowed callers to drop in their
- * own handlers for various things; it was never used (people who want
- * their own handlers can just modify this file, after all) and it added
- * a good deal of extra complexity, so it has been removed.  If you want it,
- * it can be found in svn r3769.
- */
-
 /*
  * Copyright (C) 2001 Anders Carlsson, Havoc Pennington
  *
@@ -56,54 +33,4 @@ void meta_effect_run_minimize (MetaWindow    *window,
                                MetaRectangle *window_rect,
                                MetaRectangle *target);
 
-/**
- * Grabs the server and paints a wireframe rectangle on the screen.
- * Since this involves starting a grab, please be considerate of other
- * users and don't keep the grab for long.  You may move the wireframe
- * around using meta_effects_update_wireframe() and remove it, and undo
- * the grab, using meta_effects_end_wireframe().
- *
- * \param screen  The screen to draw the rectangle on.
- * \param rect    The size of the rectangle to draw.
- * \param width   The width to display in the middle (or 0 not to)
- * \param height  The width to display in the middle (or 0 not to)
- */
-void meta_effects_begin_wireframe  (MetaScreen          *screen,
-                                    const MetaRectangle *rect,
-                                    int                  width,
-                                    int                  height);
-
-/**
- * Moves a wireframe rectangle around after its creation by
- * meta_effects_begin_wireframe().  (Perhaps we ought to remember the old
- * positions and not require people to pass them in?)
- *
- * \param old_rect  Where the rectangle is now
- * \param old_width The width that was displayed on it (or 0 if there wasn't)
- * \param old_height The height that was displayed on it (or 0 if there wasn't)
- * \param new_rect  Where the rectangle is going
- * \param new_width The width that will be displayed on it (or 0 not to)
- * \param new_height The height that will be displayed on it (or 0 not to)
- */
-void meta_effects_update_wireframe (MetaScreen          *screen,
-                                    const MetaRectangle *old_rect,
-                                    int                  old_width,
-                                    int                  old_height,
-                                    const MetaRectangle *new_rect,
-                                    int                  new_width,
-                                    int                  new_height);
-
-/**
- * Removes a wireframe rectangle from the screen and ends the grab started by
- * meta_effects_begin_wireframe().
- *
- * \param old_rect  Where the rectangle is now
- * \param old_width The width that was displayed on it (or 0 if there wasn't)
- * \param old_height The height that was displayed on it (or 0 if there wasn't)
- */
-void meta_effects_end_wireframe    (MetaScreen          *screen,
-                                    const MetaRectangle *old_rect,
-                                    int                  width,
-                                    int                  height);
-
 #endif /* META_EFFECTS_H */
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index e9e6ecd1..6c6f68da 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1400,9 +1400,7 @@ process_mouse_move_resize_grab (MetaDisplay *display,
       /* End move or resize and restore to original state.  If the
        * window was a maximized window that had been "shaken loose" we
        * need to remaximize it.  In normal cases, we need to do a
-       * moveresize now to get the position back to the original.  In
-       * wireframe mode, we just need to set grab_was_cancelled to tru
-       * to avoid avoid moveresizing to the position of the wireframe.
+       * moveresize now to get the position back to the original.
        */
       if (window->shaken_loose)
         meta_window_maximize (window,
@@ -1410,15 +1408,13 @@ process_mouse_move_resize_grab (MetaDisplay *display,
                               META_MAXIMIZE_VERTICAL);
       else if (window->tile_mode == META_TILE_LEFT || window->tile_mode == META_TILE_RIGHT)
         meta_window_tile (window);
-      else if (!display->grab_wireframe_active)
+      else
         meta_window_move_resize (display->grab_window,
                                  TRUE,
                                  display->grab_initial_window_pos.x,
                                  display->grab_initial_window_pos.y,
                                  display->grab_initial_window_pos.width,
                                  display->grab_initial_window_pos.height);
-      else
-        display->grab_was_cancelled = TRUE;
 
       /* End grab */
       return FALSE;
@@ -1449,15 +1445,7 @@ process_keyboard_move_grab (MetaDisplay *display,
   if (is_modifier (display, event->xkey.keycode))
     return TRUE;
 
-  if (display->grab_wireframe_active)
-    {
-      x = display->grab_wireframe_rect.x;
-      y = display->grab_wireframe_rect.y;
-    }
-  else
-    {
-      meta_window_get_position (window, &x, &y);
-    }
+  meta_window_get_position (window, &x, &y);
 
   smart_snap = (event->xkey.state & ShiftMask) != 0;
 
@@ -1476,23 +1464,19 @@ process_keyboard_move_grab (MetaDisplay *display,
       /* End move and restore to original state.  If the window was a
        * maximized window that had been "shaken loose" we need to
        * remaximize it.  In normal cases, we need to do a moveresize
-       * now to get the position back to the original.  In wireframe
-       * mode, we just need to set grab_was_cancelled to tru to avoid
-       * avoid moveresizing to the position of the wireframe.
+       * now to get the position back to the original.
        */
       if (window->shaken_loose)
         meta_window_maximize (window,
                               META_MAXIMIZE_HORIZONTAL |
                               META_MAXIMIZE_VERTICAL);
-      else if (!display->grab_wireframe_active)
+      else
         meta_window_move_resize (display->grab_window,
                                  TRUE,
                                  display->grab_initial_window_pos.x,
                                  display->grab_initial_window_pos.y,
                                  display->grab_initial_window_pos.width,
                                  display->grab_initial_window_pos.height);
-      else
-        display->grab_was_cancelled = TRUE;
     }
 
   /* When moving by increments, we still snap to edges if the move
@@ -1547,10 +1531,7 @@ process_keyboard_move_grab (MetaDisplay *display,
                   "Computed new window location %d,%d due to keypress\n",
                   x, y);
 
-      if (display->grab_wireframe_active)
-        old_rect = display->grab_wireframe_rect;
-      else
-        meta_window_get_client_root_coords (window, &old_rect);
+      meta_window_get_client_root_coords (window, &old_rect);
 
       meta_window_edge_resistance_for_move (window,
                                             old_rect.x,
@@ -1560,16 +1541,7 @@ process_keyboard_move_grab (MetaDisplay *display,
                                             smart_snap,
                                             TRUE);
 
-      if (display->grab_wireframe_active)
-        {
-          meta_window_update_wireframe (window, x, y,
-                                        display->grab_wireframe_rect.width,
-                                        display->grab_wireframe_rect.height);
-        }
-      else
-        {
-          meta_window_move (window, TRUE, x, y);
-        }
+      meta_window_move (window, TRUE, x, y);
 
       meta_window_update_keyboard_move (window);
     }
@@ -1768,21 +1740,13 @@ process_keyboard_resize_grab (MetaDisplay *display,
 
   if (keysym == XK_Escape)
     {
-      /* End resize and restore to original state.  If not in
-       * wireframe mode, we need to do a moveresize now to get the
-       * position back to the original.  If we are in wireframe mode,
-       * we need to avoid moveresizing to the position of the
-       * wireframe.
-       */
-      if (!display->grab_wireframe_active)
-        meta_window_move_resize (display->grab_window,
-                                 TRUE,
-                                 display->grab_initial_window_pos.x,
-                                 display->grab_initial_window_pos.y,
-                                 display->grab_initial_window_pos.width,
-                                 display->grab_initial_window_pos.height);
-      else
-        display->grab_was_cancelled = TRUE;
+      /* End resize and restore to original state. */
+      meta_window_move_resize (display->grab_window,
+                               TRUE,
+                               display->grab_initial_window_pos.x,
+                               display->grab_initial_window_pos.y,
+                               display->grab_initial_window_pos.width,
+                               display->grab_initial_window_pos.height);
 
       return FALSE;
     }
@@ -1791,16 +1755,8 @@ process_keyboard_resize_grab (MetaDisplay *display,
                                               event, keysym))
     return TRUE;
 
-  if (display->grab_wireframe_active)
-    {
-      width = display->grab_wireframe_rect.width;
-      height = display->grab_wireframe_rect.height;
-    }
-  else
-    {
-      width = window->rect.width;
-      height = window->rect.height;
-    }
+  width = window->rect.width;
+  height = window->rect.height;
 
   gravity = meta_resize_gravity_from_grab_op (display->grab_op);
 
@@ -1977,10 +1933,7 @@ process_keyboard_resize_grab (MetaDisplay *display,
                   "%dx%d, gravity %s\n",
                   width, height, meta_gravity_to_string (gravity));
 
-      if (display->grab_wireframe_active)
-        old_rect = display->grab_wireframe_rect;
-      else
-        old_rect = window->rect;  /* Don't actually care about x,y */
+      old_rect = window->rect; /* Don't actually care about x,y */
 
       /* Do any edge resistance/snapping */
       meta_window_edge_resistance_for_resize (window,
@@ -1992,32 +1945,16 @@ process_keyboard_resize_grab (MetaDisplay *display,
                                               smart_snap,
                                               TRUE);
 
-      if (display->grab_wireframe_active)
-        {
-          MetaRectangle new_position;
-          meta_rectangle_resize_with_gravity (&display->grab_wireframe_rect,
-                                              &new_position,
-                                              gravity,
-                                              width,
-                                              height);
-          meta_window_update_wireframe (window,
-                                        new_position.x,
-                                        new_position.y,
-                                        new_position.width,
-                                        new_position.height);
-        }
-      else
-        {
-          /* We don't need to update unless the specified width and height
-           * are actually different from what we had before.
-           */
-          if (window->rect.width != width || window->rect.height != height)
-            meta_window_resize_with_gravity (window,
-                                             TRUE,
-                                             width,
-                                             height,
-                                             gravity);
-        }
+      /* We don't need to update unless the specified width and height
+       * are actually different from what we had before.
+       */
+      if (window->rect.width != width || window->rect.height != height)
+        meta_window_resize_with_gravity (window,
+                                         TRUE,
+                                         width,
+                                         height,
+                                         gravity);
+
       meta_window_update_keyboard_resize (window, FALSE);
     }
 
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 613e35b7..97d3bbb7 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -82,7 +82,6 @@ static gboolean auto_raise = FALSE;
 static gboolean auto_raise_delay = 500;
 static gboolean bell_is_visible = FALSE;
 static gboolean bell_is_audible = TRUE;
-static gboolean reduced_resources = FALSE;
 static gboolean gnome_accessibility = FALSE;
 static gboolean gnome_animations = TRUE;
 static char *cursor_theme = NULL;
@@ -314,14 +313,6 @@ static MetaBoolPreference preferences_bool[] =
       &bell_is_audible, /* FIXME: change the name: it's confusing */
       FALSE,
     },
-    {
-      { "reduced-resources",
-        SCHEMA_METACITY,
-        META_PREF_REDUCED_RESOURCES,
-      },
-      &reduced_resources,
-      FALSE,
-    },
     {
       { KEY_GNOME_ACCESSIBILITY,
         SCHEMA_INTERFACE,
@@ -1213,9 +1204,6 @@ meta_preference_to_string (MetaPreference pref)
     case META_PREF_VISUAL_BELL_TYPE:
       return "VISUAL_BELL_TYPE";
 
-    case META_PREF_REDUCED_RESOURCES:
-      return "REDUCED_RESOURCES";
-
     case META_PREF_GNOME_ACCESSIBILITY:
       return "GNOME_ACCESSIBILTY";
 
@@ -1584,12 +1572,6 @@ meta_prefs_get_auto_raise_delay (void)
   return auto_raise_delay;
 }
 
-gboolean
-meta_prefs_get_reduced_resources (void)
-{
-  return reduced_resources;
-}
-
 gboolean
 meta_prefs_get_gnome_accessibility (void)
 {
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 1f07c642..0b19dbf3 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -64,8 +64,6 @@ typedef enum
   META_SCREEN_RIGHT
 } MetaScreenDirection;
 
-#define META_WIREFRAME_XOR_LINE_WIDTH 2
-
 struct _MetaScreen
 {
   MetaDisplay *display;
@@ -125,9 +123,6 @@ struct _MetaScreen
   guint all_keys_grabbed : 1;
 
   int closing;
-
-  /* gc for XOR on root window */
-  GC root_xor_gc;
 };
 
 MetaScreen*   meta_screen_new                 (MetaDisplay                *display,
diff --git a/src/core/screen.c b/src/core/screen.c
index 5560bdd2..760ead44 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -433,37 +433,6 @@ meta_screen_new (MetaDisplay *display,
   screen->vertical_workspaces = FALSE;
   screen->starting_corner = META_SCREEN_TOPLEFT;
 
-  {
-    XFontStruct *font_info;
-    XGCValues gc_values;
-    gulong value_mask = 0;
-
-    gc_values.subwindow_mode = IncludeInferiors;
-    value_mask |= GCSubwindowMode;
-    gc_values.function = GXinvert;
-    value_mask |= GCFunction;
-    gc_values.line_width = META_WIREFRAME_XOR_LINE_WIDTH;
-    value_mask |= GCLineWidth;
-
-    font_info = XLoadQueryFont (screen->display->xdisplay, "fixed");
-
-    if (font_info != NULL)
-      {
-        gc_values.font = font_info->fid;
-        value_mask |= GCFont;
-        XFreeFontInfo (NULL, font_info, 1);
-      }
-    else
-      {
-        g_warning ("xserver doesn't have 'fixed' font.");
-      }
-
-    screen->root_xor_gc = XCreateGC (screen->display->xdisplay,
-                                     screen->xroot,
-                                     value_mask,
-                                     &gc_values);
-  }
-
   screen->monitor_infos = NULL;
   screen->n_monitor_infos = 0;
   screen->last_monitor_index = 0;
@@ -559,8 +528,6 @@ void
 meta_screen_free (MetaScreen *screen,
                   guint32     timestamp)
 {
-  XGCValues gc_values = { 0 };
-
   screen->closing += 1;
 
   meta_prefs_remove_listener (prefs_changed_callback, screen);
@@ -604,19 +571,6 @@ meta_screen_free (MetaScreen *screen,
   if (screen->work_area_idle != 0)
     g_source_remove (screen->work_area_idle);
 
-
-  if (XGetGCValues (screen->display->xdisplay,
-                    screen->root_xor_gc,
-                    GCFont,
-                    &gc_values))
-    {
-      XUnloadFont (screen->display->xdisplay,
-                   gc_values.font);
-    }
-
-  XFreeGC (screen->display->xdisplay,
-           screen->root_xor_gc);
-
   if (screen->monitor_infos)
     g_free (screen->monitor_infos);
 
diff --git a/src/core/window-private.h b/src/core/window-private.h
index c00c31ba..4b4253e9 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -566,16 +566,6 @@ void        meta_window_get_input_rect       (const MetaWindow *window,
                                               MetaRectangle    *rect);
 void        meta_window_get_outer_rect       (const MetaWindow *window,
                                               MetaRectangle    *rect);
-void        meta_window_get_xor_rect         (MetaWindow          *window,
-                                              const MetaRectangle *grab_wireframe_rect,
-                                              MetaRectangle       *xor_rect);
-void        meta_window_begin_wireframe (MetaWindow *window);
-void        meta_window_update_wireframe (MetaWindow *window,
-                                          int         x,
-                                          int         y,
-                                          int         width,
-                                          int         height);
-void        meta_window_end_wireframe (MetaWindow *window);
 
 void        meta_window_delete             (MetaWindow  *window,
                                             guint32      timestamp);
diff --git a/src/core/window.c b/src/core/window.c
index c0e63226..01e5df20 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1474,14 +1474,6 @@ meta_window_showing_on_its_workspace (MetaWindow *window)
         showing = FALSE;
     }
 
-#if 0
-  /* 4. See if we're drawing wireframe
-   */
-  if (window->display->grab_window == window &&
-      window->display->grab_wireframe_active)
-    showing = FALSE;
-#endif
-
   return showing;
 }
 
@@ -1532,8 +1524,7 @@ implement_showing (MetaWindow *window,
        * if we are mapped now, we are supposed to
        * be minimized, and we are on the current workspace.
        */
-      if (on_workspace && window->minimized && window->mapped &&
-          !meta_prefs_get_reduced_resources ())
+      if (on_workspace && window->minimized && window->mapped)
         {
           MetaRectangle icon_rect, window_rect;
           gboolean result;
@@ -2909,11 +2900,6 @@ meta_window_unmaximize (MetaWindow        *window,
           window->display->grab_anchor_window_pos = window->user_rect;
         }
 
-      if (window->display->grab_wireframe_active)
-        {
-          window->display->grab_wireframe_rect = target_rect;
-        }
-
       recalc_window_features (window);
       set_net_wm_state (window);
 
@@ -3919,10 +3905,7 @@ meta_window_move_resize_internal (MetaWindow          *window,
       meta_topic (META_DEBUG_GEOMETRY, "Size/position not modified\n");
     }
 
-  if (window->display->grab_wireframe_active)
-    meta_window_update_wireframe (window, root_x_nw, root_y_nw, w, h);
-  else
-    meta_window_refresh_resize_popup (window);
+  meta_window_refresh_resize_popup (window);
 
   /* Invariants leaving this function are:
    *   a) window->rect and frame->rect reflect the actual
@@ -4273,126 +4256,6 @@ meta_window_get_outer_rect (const MetaWindow *window,
     }
 }
 
-void
-meta_window_get_xor_rect (MetaWindow          *window,
-                          const MetaRectangle *grab_wireframe_rect,
-                          MetaRectangle       *xor_rect)
-{
-  if (window->frame)
-    {
-      xor_rect->x = grab_wireframe_rect->x - window->frame->child_x;
-      xor_rect->y = grab_wireframe_rect->y - window->frame->child_y;
-      xor_rect->width = grab_wireframe_rect->width + window->frame->child_x + window->frame->right_width;
-
-      if (window->shaded)
-        xor_rect->height = window->frame->child_y;
-      else
-        xor_rect->height = grab_wireframe_rect->height + window->frame->child_y + 
window->frame->bottom_height;
-    }
-  else
-    *xor_rect = *grab_wireframe_rect;
-}
-
-/* Figure out the numbers that show up in the
- * resize popup when in reduced resources mode.
- */
-static void
-meta_window_get_wireframe_geometry (MetaWindow    *window,
-                                    int           *width,
-                                    int           *height)
-{
-  if (!window->display->grab_wireframe_active)
-    return;
-
-  if ((width == NULL) || (height == NULL))
-    return;
-
-  if ((window->display->grab_window->size_hints.width_inc <= 1) ||
-      (window->display->grab_window->size_hints.height_inc <= 1))
-    {
-      *width = -1;
-      *height = -1;
-      return;
-    }
-
-  *width = window->display->grab_wireframe_rect.width -
-      window->display->grab_window->size_hints.base_width;
-  *width /= window->display->grab_window->size_hints.width_inc;
-
-  *height = window->display->grab_wireframe_rect.height -
-      window->display->grab_window->size_hints.base_height;
-  *height /= window->display->grab_window->size_hints.height_inc;
-}
-
-/* XXX META_EFFECT_ALT_TAB, well, this and others */
-void
-meta_window_begin_wireframe (MetaWindow *window)
-{
-
-  MetaRectangle new_xor;
-  int display_width, display_height;
-
-  display_width = 0;
-  display_height = 0;
-
-  meta_window_get_client_root_coords (window,
-                                      &window->display->grab_wireframe_rect);
-
-  meta_window_get_xor_rect (window, &window->display->grab_wireframe_rect,
-                            &new_xor);
-  meta_window_get_wireframe_geometry (window, &display_width, &display_height);
-
-  meta_effects_begin_wireframe (window->screen,
-                                &new_xor, display_width, display_height);
-
-  window->display->grab_wireframe_last_xor_rect = new_xor;
-  window->display->grab_wireframe_last_display_width = display_width;
-  window->display->grab_wireframe_last_display_height = display_height;
-}
-
-void
-meta_window_update_wireframe (MetaWindow *window,
-                              int         x,
-                              int         y,
-                              int         width,
-                              int         height)
-{
-
-  MetaRectangle new_xor;
-  int display_width, display_height;
-
-  display_width = 0;
-  display_height = 0;
-
-  window->display->grab_wireframe_rect.x = x;
-  window->display->grab_wireframe_rect.y = y;
-  window->display->grab_wireframe_rect.width = width;
-  window->display->grab_wireframe_rect.height = height;
-
-  meta_window_get_xor_rect (window, &window->display->grab_wireframe_rect,
-                            &new_xor);
-  meta_window_get_wireframe_geometry (window, &display_width, &display_height);
-
-  meta_effects_update_wireframe (window->screen,
-                                 &window->display->grab_wireframe_last_xor_rect,
-                                 window->display->grab_wireframe_last_display_width,
-                                 window->display->grab_wireframe_last_display_height,
-                                 &new_xor, display_width, display_height);
-
-  window->display->grab_wireframe_last_xor_rect = new_xor;
-  window->display->grab_wireframe_last_display_width = display_width;
-  window->display->grab_wireframe_last_display_height = display_height;
-}
-
-void
-meta_window_end_wireframe (MetaWindow *window)
-{
-  meta_effects_end_wireframe (window->display->grab_window->screen,
-                              &window->display->grab_wireframe_last_xor_rect,
-                              window->display->grab_wireframe_last_display_width,
-                              window->display->grab_wireframe_last_display_height);
-}
-
 void
 meta_window_get_titlebar_rect (MetaWindow    *window,
                                MetaRectangle *rect)
@@ -7739,10 +7602,7 @@ update_move (MetaWindow  *window,
   meta_screen_tile_preview_update (window->screen,
                                    window->tile_mode != META_TILE_NONE);
 
-  if (display->grab_wireframe_active)
-    old = display->grab_wireframe_rect;
-  else
-    meta_window_get_client_root_coords (window, &old);
+  meta_window_get_client_root_coords (window, &old);
 
   /* Don't allow movement in the maximized directions or while tiled */
   if (window->maximized_horizontally || META_WINDOW_TILED_SIDE_BY_SIDE (window))
@@ -7759,12 +7619,7 @@ update_move (MetaWindow  *window,
                                         snap,
                                         FALSE);
 
-  if (display->grab_wireframe_active)
-    meta_window_update_wireframe (window, new_x, new_y,
-                                  display->grab_wireframe_rect.width,
-                                  display->grab_wireframe_rect.height);
-  else
-    meta_window_move (window, TRUE, new_x, new_y);
+  meta_window_move (window, TRUE, new_x, new_y);
 }
 
 static gboolean
@@ -7790,7 +7645,6 @@ update_resize (MetaWindow *window,
   int new_w, new_h;
   int gravity;
   MetaRectangle old;
-  int new_x, new_y;
   double remaining;
   MetaGrabOp grab_op;
 
@@ -7820,10 +7674,6 @@ update_resize (MetaWindow *window,
   if (dx == 0 && dy == 0)
     return;
 
-  /* FIXME this is only used in wireframe mode */
-  new_x = window->display->grab_anchor_window_pos.x;
-  new_y = window->display->grab_anchor_window_pos.y;
-
   if (window->display->grab_op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)
     {
       if ((dx > 0) && (dy > 0))
@@ -7868,12 +7718,6 @@ update_resize (MetaWindow *window,
         }
     }
 
-  /* FIXME: This stupidity only needed because of wireframe mode and
-   * the fact that wireframe isn't making use of
-   * meta_rectangle_resize_with_gravity().  If we were to use that, we
-   * could just increment new_w and new_h by dx and dy in all cases.
-   */
-
   grab_op = window->display->grab_op;
 
   if (grab_op == META_GRAB_OP_RESIZING_SE ||
@@ -7893,7 +7737,6 @@ update_resize (MetaWindow *window,
            grab_op == META_GRAB_OP_KEYBOARD_RESIZING_W)
     {
       new_w -= dx;
-      new_x += dx;
     }
 
   if (grab_op == META_GRAB_OP_RESIZING_SE ||
@@ -7913,7 +7756,6 @@ update_resize (MetaWindow *window,
            grab_op == META_GRAB_OP_KEYBOARD_RESIZING_NW)
     {
       new_h -= dy;
-      new_y += dy;
     }
 
   remaining = 0;
@@ -7944,10 +7786,7 @@ update_resize (MetaWindow *window,
       window->display->grab_resize_timeout_id = 0;
     }
 
-  if (window->display->grab_wireframe_active)
-    old = window->display->grab_wireframe_rect;
-  else
-    old = window->rect;  /* Don't actually care about x,y */
+  old = window->rect; /* Don't actually care about x,y */
 
   /* One sided resizing ought to actually be one-sided, despite the fact that
    * aspect ratio windows don't interact nicely with the above stuff.  So,
@@ -7979,28 +7818,11 @@ update_resize (MetaWindow *window,
                                           snap,
                                           FALSE);
 
-  if (window->display->grab_wireframe_active)
-    {
-      if ((new_x + new_w <= new_x) || (new_y + new_h <= new_y))
-        return;
-
-      /* FIXME This is crap. For example, the wireframe isn't
-       * constrained in the way that a real resize would be. An
-       * obvious elegant solution is to unmap the window during
-       * wireframe, but still resize it; however, that probably
-       * confuses broken clients that have problems with opaque
-       * resize, they probably don't track their visibility.
-       */
-      meta_window_update_wireframe (window, new_x, new_y, new_w, new_h);
-    }
-  else
-    {
-      /* We don't need to update unless the specified width and height
-       * are actually different from what we had before.
-       */
-      if (old.width != new_w || old.height != new_h)
-        meta_window_resize_with_gravity (window, TRUE, new_w, new_h, gravity);
-    }
+  /* We don't need to update unless the specified width and height
+   * are actually different from what we had before.
+   */
+  if (old.width != new_w || old.height != new_h)
+    meta_window_resize_with_gravity (window, TRUE, new_w, new_h, gravity);
 
   /* Store the latest resize time, if we actually resized. */
   if (window->rect.width != old.width || window->rect.height != old.height)
@@ -8427,16 +8249,6 @@ meta_window_refresh_resize_popup (MetaWindow *window)
   if (window->display->grab_window != window)
     return;
 
-  /* We shouldn't ever get called when the wireframe is active
-   * because that's handled by a different code path in effects.c
-   */
-  if (window->display->grab_wireframe_active)
-    {
-      meta_topic (META_DEBUG_WINDOW_OPS,
-                  "refresh_resize_popup called when wireframe active\n");
-      return;
-    }
-
   switch (window->display->grab_op)
     {
     case META_GRAB_OP_RESIZING_SE:
@@ -8500,10 +8312,7 @@ meta_window_refresh_resize_popup (MetaWindow *window)
     {
       MetaRectangle rect;
 
-      if (window->display->grab_wireframe_active)
-        rect = window->display->grab_wireframe_rect;
-      else
-        meta_window_get_client_root_coords (window, &rect);
+      meta_window_get_client_root_coords (window, &rect);
 
       meta_ui_resize_popup_set (window->display->grab_resize_popup,
                                 rect,
@@ -8615,14 +8424,7 @@ warp_grab_pointer (MetaWindow          *window,
   /* We may not have done begin_grab_op yet, i.e. may not be in a grab
    */
 
-  if (window == display->grab_window && display->grab_wireframe_active)
-    {
-      meta_window_get_xor_rect (window, &display->grab_wireframe_rect, &rect);
-    }
-  else
-    {
-      meta_window_get_outer_rect (window, &rect);
-    }
+  meta_window_get_outer_rect (window, &rect);
 
   if (grab_op == META_GRAB_OP_KEYBOARD_MOVING ||
       grab_op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)
@@ -8696,11 +8498,9 @@ warp_grab_pointer (MetaWindow          *window,
   display->grab_anchor_root_y = *y;
   display->grab_latest_motion_x = *x;
   display->grab_latest_motion_y = *y;
-  if (display->grab_wireframe_active)
-    display->grab_anchor_window_pos = display->grab_wireframe_rect;
-  else
-    meta_window_get_client_root_coords (window,
-                                        &display->grab_anchor_window_pos);
+
+  meta_window_get_client_root_coords (window,
+                                      &display->grab_anchor_window_pos);
 
   XWarpPointer (display->xdisplay,
                 None,
diff --git a/src/include/prefs.h b/src/include/prefs.h
index 6ae11fe7..2871103f 100644
--- a/src/include/prefs.h
+++ b/src/include/prefs.h
@@ -54,7 +54,6 @@ typedef enum
   META_PREF_VISUAL_BELL,
   META_PREF_AUDIBLE_BELL,
   META_PREF_VISUAL_BELL_TYPE,
-  META_PREF_REDUCED_RESOURCES,
   META_PREF_GNOME_ACCESSIBILITY,
   META_PREF_GNOME_ANIMATIONS,
   META_PREF_CURSOR_THEME,
@@ -104,7 +103,6 @@ int                         meta_prefs_get_num_workspaces     (void);
 gboolean                    meta_prefs_get_disable_workarounds (void);
 gboolean                    meta_prefs_get_auto_raise         (void);
 int                         meta_prefs_get_auto_raise_delay   (void);
-gboolean                    meta_prefs_get_reduced_resources  (void);
 gboolean                    meta_prefs_get_gnome_accessibility (void);
 gboolean                    meta_prefs_get_gnome_animations   (void);
 gboolean                    meta_prefs_get_edge_tiling        (void);
diff --git a/src/include/ui.h b/src/include/ui.h
index f3b8e263..d9686f6f 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -138,13 +138,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,
                                             int     ideal_size);
 
diff --git a/src/ui/frames.c b/src/ui/frames.c
index dcc194bb..dc26a1af 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -96,8 +96,6 @@ struct _MetaFrames
   guint        tooltip_timeout;
   MetaUIFrame *last_motion_frame;
 
-  gint         expose_delay_count;
-
   gint         invalidate_cache_timeout_id;
   GList       *invalidate_frames;
   GHashTable  *cache;
@@ -105,14 +103,6 @@ struct _MetaFrames
 
 G_DEFINE_TYPE (MetaFrames, meta_frames, GTK_TYPE_WINDOW)
 
-static void
-process_all_updates (void)
-{
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gdk_window_process_all_updates ();
-  G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
 static void
 get_client_rect (MetaFrameGeometry *fgeom,
                  GdkRectangle      *rect)
@@ -450,8 +440,6 @@ meta_frames_init (MetaFrames *frames)
 
   frames->tooltip_timeout = 0;
 
-  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);
@@ -777,7 +765,6 @@ meta_frames_manage_window (MetaFrames *frames,
 
   frame->xwindow = xwindow;
   frame->title = NULL;
-  frame->expose_delayed = FALSE;
   frame->shape_applied = FALSE;
   frame->ignore_leave_notify = FALSE;
   frame->prelit_control = META_FRAME_CONTROL_NONE;
@@ -1284,7 +1271,9 @@ meta_frames_repaint_frame (MetaFrames *frames,
   /* repaint everything, so the other frame don't
    * lag behind if they are exposed
    */
-  process_all_updates ();
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  gdk_window_process_all_updates ();
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
@@ -2444,13 +2433,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);
 
   pixels = get_cache (frames, frame);
@@ -2711,50 +2693,6 @@ meta_frames_leave_notify_event      (GtkWidget           *widget,
   return TRUE;
 }
 
-void
-meta_frames_push_delay_exposes (MetaFrames *frames)
-{
-  if (frames->expose_delay_count == 0)
-    {
-      /* Make sure we've repainted things */
-      process_all_updates ();
-      XFlush (frames->xdisplay);
-    }
-
-  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 4389b33b..e1b4d511 100644
--- a/src/ui/frames.h
+++ b/src/ui/frames.h
@@ -122,9 +122,6 @@ void meta_frames_queue_draw (MetaFrames *frames,
 
 void meta_frames_notify_menu_hide (MetaFrames *frames);
 
-void meta_frames_push_delay_exposes (MetaFrames *frames);
-void meta_frames_pop_delay_exposes  (MetaFrames *frames);
-
 void meta_frames_composited_changed (MetaFrames *frames);
 
 #endif
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 44d594bd..6a9cf4a1 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -682,18 +682,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);
-}
-
 static GdkPixbuf *
 load_default_window_icon (int size)
 {


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