[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-12-gfe77dab59

paul at claws-mail.org paul at claws-mail.org
Tue Dec 22 12:35:05 CET 2020


The branch, gtk3 has been updated
       via  fe77dab59168c7139fb50bc173ae21efe416d65e (commit)
      from  5ba50665db259e48142bfa14222df84d5dd18d57 (commit)

Summary of changes:
 src/plugins/notification/notification_prefs.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit fe77dab59168c7139fb50bc173ae21efe416d65e
Author: paul <paul at claws-mail.org>
Date:   Tue Dec 22 11:34:58 2020 +0000

    fix bug 4417, Notification plugin load triggers segfault on wayland if global hotkey is enabled
    
    based on patch by Andreas Radke

diff --git a/src/plugins/notification/notification_prefs.c b/src/plugins/notification/notification_prefs.c
index 230514e68..21b566a57 100644
--- a/src/plugins/notification/notification_prefs.c
+++ b/src/plugins/notification/notification_prefs.c
@@ -44,7 +44,11 @@
 #include "notification_lcdproc.h"
 #include "notification_trayicon.h"
 #include "notification_indicator.h"
+
+#ifdef GDK_WINDOWING_X11
 #include "notification_hotkeys.h"
+#include <gdk/gdkx.h>
+#endif
 
 #include "notification_foldercheck.h"
 
@@ -171,7 +175,7 @@ typedef struct {
 NotifyIndicatorPage indicator_page;
 #endif
 
-#ifdef NOTIFICATION_HOTKEYS
+#if defined NOTIFICATION_HOTKEYS  && defined GDK_WINDOWING_X11
 typedef struct {
     PrefsPage page;
     GtkWidget *hotkeys_enabled;
@@ -309,7 +313,7 @@ PrefParam
 				{	"indicator_hide_minimized", "FALSE", &notify_config.indicator_hide_minimized, P_BOOL,
 					NULL, NULL, NULL},
 #endif /* NOTIFICATION_INDICATOR */
-#ifdef NOTIFICATION_HOTKEYS
+#if defined NOTIFICATION_HOTKEYS  && defined GDK_WINDOWING_X11
                 {   "hotkeys_enabled", "FALSE", &notify_config.hotkeys_enabled, P_BOOL,
                     NULL, NULL, NULL},
                 {   "hotkeys_toggle_mainwindow", "", &notify_config.hotkeys_toggle_mainwindow,
@@ -382,7 +386,7 @@ static void notify_save_indicator(PrefsPage*);
 static void notify_indicator_enable_set_sensitivity(GtkToggleButton*, gpointer);
 #endif /* NOTIFICATION_INDICATOR */
 
-#ifdef NOTIFICATION_HOTKEYS
+#if defined NOTIFICATION_HOTKEYS && defined GDK_WINDOWING_X11
 static void notify_create_hotkeys_page(PrefsPage*, GtkWindow*, gpointer);
 static void notify_destroy_hotkeys_page(PrefsPage*);
 static void notify_save_hotkeys(PrefsPage*);
@@ -407,8 +411,9 @@ void notify_gtk_init(void)
 	notify_page.page.weight = 40.0;
 	prefs_gtk_register_page((PrefsPage*) &notify_page);
 
-#ifdef NOTIFICATION_HOTKEYS
-    {
+#if defined NOTIFICATION_HOTKEYS && defined GDK_WINDOWING_X11
+  if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+
         static gchar *hotkeys_path[4];
 
         hotkeys_path[0] = _("Plugins");
@@ -558,7 +563,7 @@ void notify_gtk_done(void)
 #ifdef NOTIFICATION_INDICATOR
 	prefs_gtk_unregister_page((PrefsPage*) &indicator_page);
 #endif
-#ifdef NOTIFICATION_HOTKEYS
+#if defined NOTIFICATION_HOTKEYS  && defined GDK_WINDOWING_X11
 	prefs_gtk_unregister_page((PrefsPage*) &hotkeys_page);
 #endif
 }
@@ -1840,7 +1845,7 @@ static void notify_indicator_enable_set_sensitivity(GtkToggleButton *button,
 }
 #endif /* NOTIFICATION_INDICATOR */
 
-#ifdef NOTIFICATION_HOTKEYS
+#if defined NOTIFICATION_HOTKEYS  && defined GDK_WINDOWING_X11
 static void notify_create_hotkeys_page(PrefsPage *page, GtkWindow *window, gpointer data)
 {
     GtkWidget *pvbox;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list