[mutter] frames.c: Make clip_to_screen() actually clip to the screen



commit 94f4011844f004a5dd5284fff416721f7e5f6133
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 16 17:16:12 2010 +0200

    frames.c: Make clip_to_screen() actually clip to the screen
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630203

 src/ui/frames.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 098e87e..a2a6714 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2235,7 +2235,7 @@ clip_to_screen (MetaRegion *region, MetaUIFrame *frame)
                  META_CORE_GET_FRAME_Y, &frame_area.y,
                  META_CORE_GET_FRAME_WIDTH, &frame_area.width,
                  META_CORE_GET_FRAME_HEIGHT, &frame_area.height,
-                 META_CORE_GET_SCREEN_WIDTH, &screen_area.height,
+                 META_CORE_GET_SCREEN_WIDTH, &screen_area.width,
                  META_CORE_GET_SCREEN_HEIGHT, &screen_area.height,
                  META_CORE_GET_END);
 
@@ -2245,6 +2245,10 @@ clip_to_screen (MetaRegion *region, MetaUIFrame *frame)
   meta_region_intersect (region, tmp_region);
   meta_region_destroy (tmp_region);
 
+  tmp_region = meta_region_new_from_rectangle (&screen_area);
+  meta_region_intersect (region, tmp_region);
+  meta_region_destroy (tmp_region);
+
   meta_region_translate (region, - frame_area.x, - frame_area.y);
 }
 



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