diff options
author | Scott Balneaves <[email protected]> | 2013-05-15 14:09:17 -0500 |
---|---|---|
committer | Scott Balneaves <[email protected]> | 2013-05-15 14:09:17 -0500 |
commit | 99113c80a6c3ba2c0686ee9ebeb748953e5e5354 (patch) | |
tree | 6ffe4800524c79d8f4d855560bcd7ddbdde6af42 /src/ui/frames.c | |
parent | 15c665078cb324591c27c9887840cc9e257b5203 (diff) | |
download | marco-99113c80a6c3ba2c0686ee9ebeb748953e5e5354.tar.bz2 marco-99113c80a6c3ba2c0686ee9ebeb748953e5e5354.tar.xz |
Fix for white line problem. Cribbed from https://git.gnome.org/browse/mutter/commit/?id=ecf812db833db5bf663c5e6b2fa02856f890a47e. Thanks stefano-k
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r-- | src/ui/frames.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index 06d0a49a..09bfcb61 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -2148,15 +2148,19 @@ generate_pixmap (MetaFrames *frames, GdkRegion *region; GdkPixmap *result; + /* do not create a pixmap for nonexisting areas */ + if (rect.width <= 0 || rect.height <= 0) + return NULL; + rectangle.x = rect.x; rectangle.y = rect.y; - rectangle.width = MAX (rect.width, 1); - rectangle.height = MAX (rect.height, 1); + rectangle.width = rect.width; + rectangle.height = rect.height; result = gdk_pixmap_new (frame->window, - rectangle.width, rectangle.height, -1); + rect.width, rect.height, -1); - clear_backing (result, frame->window, rectangle.x, rectangle.y); + clear_backing (result, frame->window, rect.x, rect.y); region = gdk_region_rectangle (&rectangle); |