aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-27 14:33:00 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-28 11:22:49 (GMT)
commit8175aff6177e6ac69fe6bcf6d1cea4922bde8f7d (patch)
treeb864887f4f6a7aa542d4cef1dc986e2405e665b3
parent774bb27f8d216e22681ce754f264b0cd00a60095 (diff)
Don't get window with widget->window directly
Such kind of access is deprecated with Gtk 3. So, use, instead the function gtk_widget_get_window(), as it works with both Gtk 2 and Gtk 3. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--src/callbacks.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 60d6971..0719573 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -660,9 +660,10 @@ static void show_buffer(cam* cam)
NULL);
GtkWidget *widget = GTK_WIDGET(gtk_builder_get_object(cam->xml, "da"));
+ GdkWindow *window = gtk_widget_get_window(widget);
- cairo_surface_t *surface = create_from_pixbuf(pb, widget->window);
- cairo_t *cr = gdk_cairo_create(widget->window);
+ cairo_surface_t *surface = create_from_pixbuf(pb, window);
+ cairo_t *cr = gdk_cairo_create(window);
cairo_set_source_surface(cr, surface, 0, 0);
gdk_cairo_rectangle(cr, &rect);

Privacy Policy