From 94f4011844f004a5dd5284fff416721f7e5f6133 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 16 Sep 2010 17:16:12 +0200 Subject: [PATCH] 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 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/frames.c b/src/ui/frames.c index 098e87e79..a2a671448 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); }