summaryrefslogtreecommitdiff
path: root/src/CheckerboardLayout.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:40:03 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:40:03 +0200
commit386403d8a5de83642598d811b6a6a5c40cce51c0 (patch)
treeabdcc42a870fa2becbf189a67e42d9b1c63a8ee1 /src/CheckerboardLayout.vala
parent5db2423befaf4834bb8bd9ae297817debdaa3b78 (diff)
parent29a7aef998e975b42401cfa96d1b750d91eadf06 (diff)
Merge tag 'upstream/0.23.2'
Upstream version 0.23.2
Diffstat (limited to 'src/CheckerboardLayout.vala')
-rw-r--r--src/CheckerboardLayout.vala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/CheckerboardLayout.vala b/src/CheckerboardLayout.vala
index 30f3d66..032235f 100644
--- a/src/CheckerboardLayout.vala
+++ b/src/CheckerboardLayout.vala
@@ -911,7 +911,11 @@ public class CheckerboardLayout : Gtk.DrawingArea {
debug("on_viewport_resized: due_to_reflow=%s set_size_request %dx%d",
size_allocate_due_to_reflow.to_string(), parent_allocation.width, req.height);
#endif
- set_size_request(parent_allocation.width - SCROLLBAR_PLACEHOLDER_WIDTH, req.height);
+ // But if the current height is 0, don't request a size yet. Delay
+ // it to do_reflow (bgo#766864)
+ if (req.height != 0) {
+ set_size_request(parent_allocation.width - SCROLLBAR_PLACEHOLDER_WIDTH, req.height);
+ }
} else {
// set the layout's width and height to always match the parent's
set_size_request(parent_allocation.width, parent_allocation.height);
@@ -1808,6 +1812,10 @@ public class CheckerboardLayout : Gtk.DrawingArea {
// we want switched_to() to be the final call in the process (indicating that the page is
// now in place and should do its thing to update itself), have to be be prepared for
// GTK/GDK calls between the widgets being actually present on the screen and "switched to"
+
+ Gtk.Allocation allocation;
+ get_allocation(out allocation);
+ get_style_context().render_background (ctx, 0, 0, allocation.width, allocation.height);
// watch for message mode
if (message == null) {
@@ -1829,7 +1837,6 @@ public class CheckerboardLayout : Gtk.DrawingArea {
int text_width, text_height;
pango_layout.get_pixel_size(out text_width, out text_height);
- Gtk.Allocation allocation;
get_allocation(out allocation);
int x = allocation.width - text_width;