aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-06-10 03:13:31 +0800
committerXan Lopez <xlopez@igalia.com>2011-06-10 03:13:31 +0800
commitd732145429c8366b98e82c08ba092a6514ef913b (patch)
treecc611e5292ea35223023527b285061600a261c77 /lib/widgets
parent7084eadd14a1ba9013e1cb0206a7da5c2e23e014 (diff)
downloadgsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar.gz
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar.bz2
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar.lz
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar.xz
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.tar.zst
gsoc2013-epiphany-d732145429c8366b98e82c08ba092a6514ef913b.zip
gedit-overlay: prevent underallocation warnings
This is somewhat hacky, but we'll switch to GtkOverlay soon anyway.
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/gedit-overlay.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/widgets/gedit-overlay.c b/lib/widgets/gedit-overlay.c
index 29ac36810..b80c0af1c 100644
--- a/lib/widgets/gedit-overlay.c
+++ b/lib/widgets/gedit-overlay.c
@@ -321,8 +321,18 @@ gedit_overlay_size_allocate (GtkWidget *widget,
alloc.y = 0;
}
- alloc.width = MIN (main_alloc.width, req.width);
- alloc.height = MIN (main_alloc.height, req.height);
+ if (main_alloc.width < req.width || main_alloc.height < req.height)
+ {
+ GdkWindow *child_window = gtk_widget_get_window (child);
+ if (child_window)
+ gdk_window_move_resize (child_window,
+ alloc.x, alloc.y,
+ MIN (main_alloc.width, req.width),
+ MIN (main_alloc.height, req.height));
+ }
+
+ alloc.width = req.width;
+ alloc.height = req.height;
gtk_widget_size_allocate (child, &alloc);
}