From 89c24fd28c129efc1d6b25d9eb47aea7f6c0c343 Mon Sep 17 00:00:00 2001 From: Amin Bandali <amin.bandali@savoirfairelinux.com> Date: Fri, 29 Jan 2021 14:24:52 -0500 Subject: [PATCH] dialogs: fix about dialog's "draw" signal handler According to the GTK docs, the handler is supposed to have a gboolean return type and return FALSE to propagate the event further. With the previous function signature, on some setups (such as Fedora 31 and 32) the about dialog would show up as a black rectangle or be invisible. Change-Id: I3d0d343df58b08f8cc2e7a9f97710dacc63f1c41 --- src/dialogs.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dialogs.cpp b/src/dialogs.cpp index f59b32cd..cfc7877c 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -41,11 +41,14 @@ about_dialog_set_theme(GtkAboutDialog *dialog, gboolean use_dark_theme) gtk_about_dialog_set_logo(dialog, logo); } -void -about_dialog_on_redraw(GtkWidget *dialog) +gboolean +about_dialog_on_redraw(GtkWidget *dialog, + G_GNUC_UNUSED cairo_t *cr, + G_GNUC_UNUSED gpointer user_data) { - about_dialog_set_theme(GTK_ABOUT_DIALOG(dialog), - use_dark_theme(get_ambient_color(dialog))); + about_dialog_set_theme(GTK_ABOUT_DIALOG(dialog), + use_dark_theme(get_ambient_color(dialog))); + return FALSE; } void -- GitLab