From 1ffa4d5fa83336845fa9450f6f700148436df69e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mu=C5=BCy=C5=82o?= Date: Wed, 30 Nov 2011 09:22:08 +0100 Subject: [PATCH] More GTK 2.x compatible fixes towards GTK 3.x support. --- mpv_gtk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mpv_gtk.c b/mpv_gtk.c index 32f1b54..05e9da7 100644 --- a/mpv_gtk.c +++ b/mpv_gtk.c @@ -576,7 +576,14 @@ static void gtk_drv_paint(mpdm_t doc, int optimize) gr.x = 0; gr.y = 0; + +#if CONFOPT_GTK == 2 gr.width = area->allocation.width; +#endif +#if CONFOPT_GTK == 3 + gr.width = gtk_widget_get_allocated_width(area); +#endif + gr.height = font_height; cr = gdk_cairo_create(gtk_widget_get_window(area)); @@ -666,8 +673,6 @@ static void gtk_drv_paint(mpdm_t doc, int optimize) cairo_move_to(cr, 2, n * font_height); pango_cairo_show_layout(cr, pl); - /* dump the pixmap */ - g_object_unref(pl); } -- 2.11.4.GIT