[gtkmm] Gtk::Widget: Temporary workaround for bug 774778 (get_render_mode())



commit 9adeb7abe65719a69ebfb226e1f216c32a988389
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Nov 27 13:51:31 2016 +0100

    Gtk::Widget: Temporary workaround for bug 774778 (get_render_mode())
    
    The get_render_mode() function in gtk+/gtk/gtkwidget.c is incompatible with
    gtkmm's habit of overriding most vfuncs and default signal handlers.
    This temporary workaround fixes the problem for standard gtkmm widgets,
    but not for custom widgets. Bug 773642 comment 12

 gtk/src/widget.hg |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index cc450ae..155e561 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -601,7 +601,14 @@ dnl
 #m4end
 
 #m4 _CONVERSION(`cairo_t*',`const ::Cairo::RefPtr< ::Cairo::Context>&',`::Cairo::RefPtr< 
::Cairo::Context>(new ::Cairo::Context($3, false /* has_reference */))')
-  _WRAP_SIGNAL(bool draw(const ::Cairo::RefPtr< ::Cairo::Context>& cr), "draw")
+  //TODO: no_default_handler is a temporary fix (rather workaround) for the
+  // problem with get_render_mode() in gtk+.
+  // Most widgets will be correctly drawn, even Gtk::DrawingArea since it now
+  // uses a draw function instead of signal_draw().
+  // Custom widgets won't be drawn correctly with this workaround.
+  // https://bugzilla.gnome.org/show_bug.cgi?id=774778
+  _WRAP_SIGNAL(bool draw(const ::Cairo::RefPtr< ::Cairo::Context>& cr), "draw", no_default_handler)
+  //_WRAP_SIGNAL(bool draw(const ::Cairo::RefPtr< ::Cairo::Context>& cr), "draw")
 
   /// Event triggered by a key press will widget has focus.
   _WRAP_SIGNAL(bool key_press_event(GdkEventKey* key_event), "key_press_event")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]