Commit 31a5c1ed authored by Christoffer Ackelman's avatar Christoffer Ackelman

GTK: Fixed flow/glow not being drawn directly after initialization.

parent 6711db2c
......@@ -427,7 +427,7 @@ void FlowDrawGtk::create_buffer(DrawWind *w)
w->buffer = gdk_pixmap_new(w->window, window_width, window_height, -1);
gdk_draw_rectangle(w->buffer, gcs[flow_eDrawType_LineErase][0], TRUE, 0, 0, window_width, window_height);
ctx->set_dirty();
}
FlowDrawGtk::FlowDrawGtk(GtkWidget* x_toplevel, void** flow_ctx,
......@@ -1310,7 +1310,9 @@ void FlowDrawGtk::cancel_redraw_timer()
void FlowDrawGtk::start_redraw_timer()
{
redraw_timer = g_timeout_add(40, redraw_timer_cb, this);
if (!redraw_timer) {
redraw_timer = g_timeout_add(40, redraw_timer_cb, this);
}
}
void FlowDrawGtk::set_timer(FlowCtx* ctx, int time_ms,
......
......@@ -618,7 +618,6 @@ GlowDrawGtk::GlowDrawGtk(GtkWidget* toplevel, void** glow_ctx,
glow_create_cursor(this);
get_window_size(ctx->mw, &ctx->mw->window_width, &ctx->mw->window_height);
create_buffer(&m_wind);
init_proc(toplevel, ctx, client_data);
}
......@@ -1653,7 +1652,9 @@ void GlowDrawGtk::cancel_redraw_timer()
void GlowDrawGtk::start_redraw_timer()
{
redraw_timer = g_timeout_add(40, redraw_timer_cb, this);
if (!redraw_timer) {
redraw_timer = g_timeout_add(40, redraw_timer_cb, this);
}
}
void GlowDrawGtk::set_timer(
......@@ -1952,6 +1953,7 @@ void GlowDrawGtk::create_buffer(DrawWindGtk* w)
w->buffer = gdk_pixmap_new(w->window, window_width, window_height, -1);
w->window_width = window_width;
w->window_height = window_height;
ctx->set_dirty();
}
int GlowDrawGtk::export_image(char* filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment