Fix NSGLView invalidation
This commit is contained in:
parent
8bc7154130
commit
9a0a2a29b5
@ -873,7 +873,6 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
if (_nsglview) {
|
||||
Gtkmm2ext::nsglview_queue_draw (_nsglview, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@ -1201,6 +1200,30 @@ GtkCanvas::on_unmap ()
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
GtkCanvas::queue_draw()
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (_nsglview) {
|
||||
Gtkmm2ext::nsglview_queue_draw (_nsglview, 0, 0, get_width (), get_height ());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Gtk::Widget::queue_draw ();
|
||||
}
|
||||
|
||||
void
|
||||
GtkCanvas::queue_draw_area (int x, int y, int width, int height)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (_nsglview) {
|
||||
Gtkmm2ext::nsglview_queue_draw (_nsglview, x, y, width, height);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Gtk::Widget::queue_draw_area (x, y, width, height);
|
||||
}
|
||||
|
||||
/** Called to request a redraw of our canvas.
|
||||
* @param area Area to redraw, in window coordinates.
|
||||
*/
|
||||
|
@ -214,6 +214,9 @@ public:
|
||||
void start_tooltip_timeout (Item*);
|
||||
void stop_tooltip_timeout ();
|
||||
|
||||
void queue_draw ();
|
||||
void queue_draw_area (int x, int y, int width, int height);
|
||||
|
||||
Glib::RefPtr<Pango::Context> get_pango_context();
|
||||
|
||||
void render (Cairo::RefPtr<Cairo::Context> const & ctx, cairo_rectangle_t* r)
|
||||
|
Loading…
Reference in New Issue
Block a user