From bc0a9c99caa41435c0f9d301b929110d5f8e239a Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Mon, 13 Feb 2012 15:00:53 +0100 Subject: [PATCH] revert a GTK+3 compatibility change --- page_widget.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/page_widget.c b/page_widget.c index af0f572..b0c8891 100644 --- a/page_widget.c +++ b/page_widget.c @@ -391,7 +391,12 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle) grect.y = rectangle->y1; grect.width = rectangle->x2 - rectangle->x1; grect.height = rectangle->y2 - rectangle->y1; +#if (GTK_MAJOR_VERSION == 3) + /* gtk_widget_get_parent_window is wrong here */ gdk_window_invalidate_rect(gtk_widget_get_parent_window(GTK_WIDGET(widget)), &grect, TRUE); +#else + gdk_window_invalidate_rect(GTK_WIDGET(widget)->window, &grect, TRUE); +#endif } static void