[mutter] Remove wireframe mode and old effects framework



commit 94f64797de91d6f7b86ec3da82181052a2036933
Author: Jon Nettleton <jon nettleton gmail com>
Date:   Thu May 7 13:53:47 2009 -0400

    Remove wireframe mode and old effects framework
    
    Remove the reduced_resources preference and all all wireframe logic and effects.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=581812

 src/Makefile.am            |    2 -
 src/core/display-private.h |    6 -
 src/core/display.c         |   42 +---
 src/core/edge-resistance.c |   25 +--
 src/core/effects.c         |  735 --------------------------------------------
 src/core/effects.h         |  170 ----------
 src/core/keybindings.c     |  119 ++------
 src/core/prefs.c           |   15 -
 src/core/window-private.h  |   10 -
 src/core/window.c          |  274 ++---------------
 src/include/prefs.h        |    2 -
 11 files changed, 50 insertions(+), 1350 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 9b32333..50cbac8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,8 +39,6 @@ mutter_SOURCES= 				\
 	ui/draw-workspace.h			\
 	core/edge-resistance.c			\
 	core/edge-resistance.h			\
-	core/effects.c				\
-	core/effects.h				\
 	core/errors.c				\
 	include/errors.h			\
 	core/eventqueue.c			\
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 3e05075..313f49f 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -174,19 +174,13 @@ 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;
   MetaRectangle grab_initial_window_pos;
   int         grab_initial_x, grab_initial_y;  /* These are only relevant for */
   gboolean    grab_threshold_movement_reached; /* raise_on_click == FALSE.    */
   MetaResizePopup *grab_resize_popup;
   GTimeVal    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 4ef8359..3d97aa2 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -46,7 +46,6 @@
 #include "xprops.h"
 #include "workspace-private.h"
 #include "bell.h"
-#include "effects.h"
 #include "compositor.h"
 #include <X11/Xatom.h>
 #include <X11/cursorfont.h>
@@ -475,7 +474,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;
@@ -2080,9 +2078,6 @@ event_callback (XEvent   *event,
                               "Window %s withdrawn\n",
                               window->desc);
 
-		  if (!window->override_redirect)
-		    meta_effect_run_close (window, NULL, NULL);
-
                   /* Unmanage withdrawn window */		  
                   window->withdrawn = TRUE;
                   meta_window_unmanage (window, timestamp);
@@ -3435,7 +3430,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
   display->grab_sync_request_alarm = None;
   display->grab_last_user_action_was_snap = FALSE;
 #endif
-  display->grab_was_cancelled = FALSE;
   display->grab_frame_action = frame_action;
 
   if (display->grab_resize_timeout_id)
@@ -3450,20 +3444,8 @@ 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);
-        }
-      
 #ifdef HAVE_XSYNC
-      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)
         {
           XSyncAlarmAttributes values;
@@ -3614,28 +3596,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 875741a..ac59aff 100644
--- a/src/core/edge-resistance.c
+++ b/src/core/edge-resistance.c
@@ -1141,17 +1141,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);
@@ -1236,17 +1227,7 @@ 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/keybindings.c b/src/core/keybindings.c
index 522f663..d896208 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -35,7 +35,6 @@
 #include "frame-private.h"
 #include "place.h"
 #include "prefs.h"
-#include "effects.h"
 #include "util.h"
 
 #include <X11/keysym.h>
@@ -1447,23 +1446,19 @@ 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,
                               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;
 
       /* End grab */
       return FALSE;
@@ -1494,15 +1489,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;
   
@@ -1521,23 +1508,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
@@ -1588,10 +1571,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,
@@ -1602,17 +1582,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);
     }
 
@@ -1767,21 +1737,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;
     }
@@ -1790,16 +1752,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);
 
@@ -1964,10 +1918,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,
@@ -1980,32 +1931,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 0b9e82a..a8fd3fe 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -94,7 +94,6 @@ static gboolean auto_raise = FALSE;
 static gboolean auto_raise_delay = 500;
 static gboolean provide_visual_bell = 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;
@@ -397,11 +396,6 @@ static MetaBoolPreference preferences_bool[] =
       &bell_is_audible, /* FIXME: change the name: it's confusing */
       FALSE,
     },
-    { "/apps/metacity/general/reduced_resources",
-      META_PREF_REDUCED_RESOURCES,
-      &reduced_resources,
-      FALSE,
-    },
     { "/desktop/gnome/interface/accessibility",
       META_PREF_GNOME_ACCESSIBILITY,
       &gnome_accessibility,
@@ -1788,9 +1782,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";
 
@@ -2711,12 +2702,6 @@ meta_prefs_get_auto_raise_delay (void)
 }
 
 gboolean
-meta_prefs_get_reduced_resources (void)
-{
-  return reduced_resources;
-}
-
-gboolean
 meta_prefs_get_gnome_accessibility ()
 {
   return gnome_accessibility;
diff --git a/src/core/window-private.h b/src/core/window-private.h
index a2aa4d4..467b6b9 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -479,16 +479,6 @@ void        meta_window_get_geometry         (MetaWindow  *window,
                                               int         *y,
                                               int         *width,
                                               int         *height);
-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_kill               (MetaWindow  *window);
 void        meta_window_focus              (MetaWindow  *window,
diff --git a/src/core/window.c b/src/core/window.c
index d290e44..cddf732 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -36,7 +36,6 @@
 #include "ui.h"
 #include "place.h"
 #include "session.h"
-#include "effects.h"
 #include "prefs.h"
 #include "resizepopup.h"
 #include "xprops.h"
@@ -44,7 +43,6 @@
 #include "window-props.h"
 #include "constraints.h"
 #include "compositor.h"
-#include "effects.h"
 
 #include <X11/Xatom.h>
 #include <string.h>
@@ -1602,14 +1600,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;
 }
 
@@ -1696,7 +1686,7 @@ implement_showing (MetaWindow *window,
        * be minimized, and we are on the current workspace.
        */
       if (on_workspace && window->minimized && window->mapped &&
-          !window->hidden && !meta_prefs_get_reduced_resources ())
+          !window->hidden)
         {
           MetaRectangle icon_rect, window_rect;
           gboolean result;
@@ -1717,20 +1707,11 @@ implement_showing (MetaWindow *window,
 
           meta_window_get_outer_rect (window, &window_rect);
 
-          if (window->display->compositor)
-            {
-              meta_compositor_minimize_window (window->display->compositor,
+          meta_compositor_minimize_window (window->display->compositor,
                                                window,
 					       &window_rect,
 					       &icon_rect);
               finish_minimize (window);
-            }
-          else
-          meta_effect_run_minimize (window,
-                                    &window_rect,
-                                    &icon_rect,
-                                    finish_minimize,
-                                    window);
         }
       else
         {
@@ -2572,11 +2553,6 @@ meta_window_show (MetaWindow *window)
 						   window,
 						   &window_rect,
 						   &icon_rect);
-	      else
-		meta_effect_run_unminimize (window,
-					    &window_rect,
-					    &icon_rect,
-					    NULL, NULL);
 	    }
 	  else
             {
@@ -3085,11 +3061,6 @@ meta_window_unmaximize (MetaWindow        *window,
                                    target_rect.height);
         }
 
-      if (window->display->grab_wireframe_active)
-        {
-          window->display->grab_wireframe_rect = target_rect;
-        }
-
       recalc_window_features (window);
       set_net_wm_state (window);
     }
@@ -4031,10 +4002,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
@@ -4337,120 +4305,6 @@ meta_window_get_outer_rect (const MetaWindow *window,
     *rect = window->rect;
 }
 
-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;
-
-  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;
-
-  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);
-}
-
 const char*
 meta_window_get_startup_id (MetaWindow *window)
 {
@@ -4599,7 +4453,7 @@ meta_window_focus (MetaWindow  *window,
   if (window->wm_state_demands_attention)
     meta_window_unset_demands_attention(window);
 
-  meta_effect_run_focus(window, NULL, NULL);
+/*  meta_effect_run_focus(window, NULL, NULL); */
 }
 
 static void
@@ -7527,10 +7381,7 @@ update_move (MetaWindow  *window,
         }
     }
 
-  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 */
   if (window->maximized_horizontally)
@@ -7548,12 +7399,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
@@ -7579,7 +7425,6 @@ update_resize (MetaWindow *window,
   int new_w, new_h;
   int gravity;
   MetaRectangle old;
-  int new_x, new_y;
   double remaining;
 
   window->display->grab_latest_motion_x = x;
@@ -7598,10 +7443,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))
@@ -7646,11 +7487,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.
-   */
   switch (window->display->grab_op)
     {
     case META_GRAB_OP_RESIZING_SE:
@@ -7669,12 +7505,10 @@ update_resize (MetaWindow *window,
     case META_GRAB_OP_KEYBOARD_RESIZING_SW:
     case META_GRAB_OP_KEYBOARD_RESIZING_W:
       new_w -= dx;
-      new_x += dx;
       break;
-
-    default:
-      break;
-    }
+	default:
+	  break;
+	}
 
   switch (window->display->grab_op)
     {
@@ -7694,7 +7528,6 @@ update_resize (MetaWindow *window,
     case META_GRAB_OP_KEYBOARD_RESIZING_NE:
     case META_GRAB_OP_KEYBOARD_RESIZING_NW:
       new_h -= dy;
-      new_y += dy;
       break;
     default:
       break;
@@ -7727,10 +7560,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,
@@ -7767,28 +7597,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)
@@ -8121,42 +7934,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:
-    case META_GRAB_OP_RESIZING_S:
-    case META_GRAB_OP_RESIZING_SW:
-    case META_GRAB_OP_RESIZING_N:
-    case META_GRAB_OP_RESIZING_NE:
-    case META_GRAB_OP_RESIZING_NW:
-    case META_GRAB_OP_RESIZING_W:
-    case META_GRAB_OP_RESIZING_E:
-    case META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN:
-    case META_GRAB_OP_KEYBOARD_RESIZING_S:
-    case META_GRAB_OP_KEYBOARD_RESIZING_N:
-    case META_GRAB_OP_KEYBOARD_RESIZING_W:
-    case META_GRAB_OP_KEYBOARD_RESIZING_E:
-    case META_GRAB_OP_KEYBOARD_RESIZING_SE:
-    case META_GRAB_OP_KEYBOARD_RESIZING_NE:
-    case META_GRAB_OP_KEYBOARD_RESIZING_SW:
-    case META_GRAB_OP_KEYBOARD_RESIZING_NW:
-      break;
-
-    default:
-      /* Not resizing */
-      return;
-    }
-
   if (window->display->grab_resize_popup == NULL)
     {
       if (window->size_hints.width_inc > 1 ||
@@ -8170,10 +7947,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,
@@ -8314,14 +8088,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);
 
   switch (grab_op)
     {
@@ -8396,11 +8163,8 @@ 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 82bd5b7..aaaa8fe 100644
--- a/src/include/prefs.h
+++ b/src/include/prefs.h
@@ -53,7 +53,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,
@@ -90,7 +89,6 @@ gboolean                    meta_prefs_get_application_based  (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);
 



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