#include <gtkmm/label.h>
#include <gtkmm/window.h>
+#include "gtkmm2ext/persistent_tooltip.h"
+
#include "pbd/compose.h"
#include "pbd/stacktrace.h"
, _single_exposure (1)
, current_tooltip_item (0)
, tooltip_window (0)
+ , _in_dtor (false)
{
/* these are the events we want to know about */
add_events (Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK |
bool
GtkCanvas::on_expose_event (GdkEventExpose* ev)
{
+ if (_in_dtor) {
+ return true;
+ }
+
#ifdef OPTIONAL_CAIRO_IMAGE_SURFACE
Cairo::RefPtr<Cairo::Context> draw_context;
Cairo::RefPtr<Cairo::Context> window_context;
for scroll if this GtkCanvas is in a GtkCanvasViewport.
*/
- DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas button press @ %1, %2 => %3\n", ev->x, ev->y, where));
+ DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas button press %1 @ %2, %3 => %4\n", ev->button, ev->x, ev->y, where));
return deliver_event (reinterpret_cast<GdkEvent*>(©));
}
for scroll if this GtkCanvas is in a GtkCanvasViewport.
*/
- DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas button release @ %1, %2 => %3\n", ev->x, ev->y, where));
+ DEBUG_TRACE (PBD::DEBUG::CanvasEvents, string_compose ("canvas button release %1 @ %2, %3 => %4\n", ev->button, ev->x, ev->y, where));
return deliver_event (reinterpret_cast<GdkEvent*>(©));
}
void
GtkCanvas::request_redraw (Rect const & request)
{
+ if (_in_dtor) {
+ return;
+ }
+
Rect real_area;
Coord const w = width ();
{
stop_tooltip_timeout ();
- if (item) {
+ if (item && Gtkmm2ext::PersistentTooltip::tooltips_enabled ()) {
current_tooltip_item = item;
/* wait for the first idle that happens after this is
bool
GtkCanvas::really_start_tooltip_timeout ()
{
- /* an idle has occured since we entered a tooltip-bearing widget. Now
+ /* an idle has occurred since we entered a tooltip-bearing widget. Now
* wait 1 second and if the timeout isn't cancelled, show the tooltip.
*/