From 368e98336f6cbd0cf5aceba07fec0590c8a7f5a2 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 23 Sep 2021 11:48:08 -0600 Subject: [PATCH] gtkmm2ext: if a CairoWidget is used in the canvas, we do not need to realize the Gtk::EventBox This may be a breaking change, but seems ok from superficial testing. --- libs/gtkmm2ext/cairo_widget.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/gtkmm2ext/cairo_widget.cc b/libs/gtkmm2ext/cairo_widget.cc index a181512a3a..826c8c0471 100644 --- a/libs/gtkmm2ext/cairo_widget.cc +++ b/libs/gtkmm2ext/cairo_widget.cc @@ -360,6 +360,10 @@ CairoWidget::on_style_changed (const Glib::RefPtr&) void CairoWidget::on_realize () { + if (_canvas_widget) { + /* do not need a realized event box */ + return; + } Gtk::EventBox::on_realize(); #ifdef __APPLE__ if (_nsglview) {