[mutter] frames.c: Remove workaround now that clip_to_screen() works properly



commit 7897448a5b150078dba188c8a1b0c9fd753ab00a
Author: Benjamin Otte <otte redhat com>
Date:   Fri Sep 17 02:08:34 2010 +0200

    frames.c: Remove workaround now that clip_to_screen() works properly
    
    This code seems to be basically broken. It looks like it tried to clip
    the expose area to the screen, but used screen coordinates for the
    screen area but frame coordinates for the frame area. So someone tried
    to work around this by adding a border around the screen, which made the
    broken clipping work most of the time (see bugs below for examples where
    it didn't).
    Anyway, all of this is gone now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=399529
    https://bugzilla.redhat.com/show_bug.cgi?id=557402
    https://bugzilla.gnome.org/show_bug.cgi?id=538438
    https://bugzilla.gnome.org/show_bug.cgi?id=630203

 src/ui/frames.c |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index a2a6714..8297bef 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2334,11 +2334,6 @@ meta_frames_expose_event (GtkWidget           *widget,
   return TRUE;
 }
 
-/* How far off the screen edge the window decorations should
- * be drawn. Used only in meta_frames_paint_to_drawable, below.
- */
-#define DECORATING_BORDER 100
-
 static void
 meta_frames_paint_to_drawable (MetaFrames   *frames,
                                MetaUIFrame  *frame,
@@ -2477,7 +2472,6 @@ meta_frames_paint_to_drawable (MetaFrames   *frames,
 
       GdkRectangle area, *areas;
       int n_areas;
-      int screen_width, screen_height;
       MetaRegion *edges, *tmp_region;
       int top, bottom, left, right;
  
@@ -2487,11 +2481,6 @@ meta_frames_paint_to_drawable (MetaFrames   *frames,
                              type, frame->text_height, flags, 
                              &top, &bottom, &left, &right);
 
-      meta_core_get (display, frame->xwindow,
-                     META_CORE_GET_SCREEN_WIDTH, &screen_width,
-                     META_CORE_GET_SCREEN_HEIGHT, &screen_height,
-                     META_CORE_GET_END);
-
       edges = meta_region_copy (region);
 
       /* Punch out the client area */
@@ -2504,23 +2493,6 @@ meta_frames_paint_to_drawable (MetaFrames   *frames,
       meta_region_subtract (edges, tmp_region);
       meta_region_destroy (tmp_region);
 
-      /* Bug 399529: clamp areas[i] so that it doesn't go too far
-       * off the edge of the screen. This works around a GDK bug
-       * which makes gdk_window_begin_paint_rect cause an X error
-       * if the window is insanely huge. If the client is a GDK program
-       * and does this, it will still probably cause an X error in that
-       * program, but the last thing we want is for Metacity to crash
-       * because it attempted to decorate the silly window.
-       */
-
-      area.x = -DECORATING_BORDER;
-      area.y = -DECORATING_BORDER; 
-      area.width = screen_width + 2 * DECORATING_BORDER;
-      area.height = screen_height + 2 * DECORATING_BORDER;
-      tmp_region = meta_region_new_from_rectangle (&area);
-      meta_region_intersect (edges, tmp_region);
-      meta_region_destroy (tmp_region);
-
       /* Now draw remaining portion of region */
 
       meta_region_get_rectangles (edges, &areas, &n_areas);



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