path: root/src/callbacks.h
diff options
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 16:50:39 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-05 17:18:06 (GMT)
commit01fccdeaea087e73c933e71890908a6b6dc23ac1 (patch)
tree07cc0b86ac81cac09b580beed89ca4aeec8f125d /src/callbacks.h
parent98a4baa241cfd710e27d51871f17bee3f60930cc (diff)
callbacks: use a callback to draw at GtkDrawingAreagtk3_improvements
Gtk 3 supports wayland, but there's a catch: while the current code works properly with X11, it doesn't draw anything inside the GtkDrawingArea on Wayland. The fix is trivial, but incompatible with Gtk2: instead of updating the drawing aea inside the main loop, a callback has to be used in order to handle gtk draw logic. As, at least for now, we want to keep supporting Gtk 2, let's add a compatibility code. That fixes drawing with Wayland. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/callbacks.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/callbacks.h b/src/callbacks.h
index c0c2e1b..30e15b2 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -33,6 +33,7 @@ void ppm_func(GtkWidget *, cam_t *);
void rts_func(GtkWidget *, cam_t *);
void rjpg_func(GtkWidget *, cam_t *);
void rpng_func(GtkWidget *, cam_t *);
+void draw_callback(GtkWidget *, cairo_t *, cam_t *cam);
gint(*pt2Function) (cam_t *);
void rppm_func(GtkWidget *, cam_t *);

Privacy Policy