[gnome-boxes/gnome-3-4] Fix inifinite loop in MenuBox
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-4] Fix inifinite loop in MenuBox
- Date: Fri, 8 Jun 2012 16:37:16 +0000 (UTC)
commit b526cd73617a7f5a162a6721c3d6c58c7a804804
Author: Alexander Larsson <alexl redhat com>
Date: Tue May 22 12:27:24 2012 +0200
Fix inifinite loop in MenuBox
We need to save/restore the StyleContext when we change it during
drawing, otherwise we end up causing a style change that will forever
loop in the restyle/redraw idles.
src/menu-box.vala | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/menu-box.vala b/src/menu-box.vala
index e78f7ac..51e4920 100644
--- a/src/menu-box.vala
+++ b/src/menu-box.vala
@@ -107,10 +107,12 @@ private class Boxes.MenuBox: Gtk.Box {
junction |= Gtk.JunctionSides.LEFT;
}
+ ctxt.save ();
ctxt.set_state (child.get_state_flags ());
ctxt.set_junction_sides (junction);
ctxt.render_background (cr, child_allocation.x, child_allocation.y,
child_allocation.width, child_allocation.height);
+ ctxt.restore ();
}
return base.draw (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]