[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-13-gb4bbbb1b5

paul at claws-mail.org paul at claws-mail.org
Tue Dec 22 13:12:08 CET 2020


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

Summary of changes:
 src/main.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit b4bbbb1b52d86d9cbddc0e853249fe4ff2e35cba
Author: paul <paul at claws-mail.org>
Date:   Tue Dec 22 12:12:02 2020 +0000

    better check for X. thanks to Andreas Radke

diff --git a/src/main.c b/src/main.c
index 4a00ab004..745a2b4a1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2019 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -51,10 +51,12 @@
 #include "file_checker.h"
 #include "wizard.h"
 #ifdef HAVE_STARTUP_NOTIFICATION
+#ifdef GDK_WINDOWING_X11
 # define SN_API_NOT_YET_FROZEN
 # include <libsn/sn-launchee.h>
 # include <gdk/gdkx.h>
 #endif
+#endif
 
 #ifdef HAVE_DBUS_GLIB
 #include <dbus/dbus-glib.h>
@@ -1042,8 +1044,12 @@ int main(int argc, char *argv[])
 	lock_socket = prohibit_duplicate_launch();
 	if (lock_socket < 0) {
 #ifdef HAVE_STARTUP_NOTIFICATION
-		if(gtk_init_check(&argc, &argv) && !strcmp(g_getenv("XDG_SESSION_TYPE"), "x11"))
+#ifdef GDK_WINDOWING_X11
+	if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+		if (gtk_init_check(&argc, &argv))
 			startup_notification_complete(TRUE);
+	}
+#endif
 #endif
 		return 0;
 	}
@@ -1570,9 +1576,11 @@ int main(int argc, char *argv[])
 	static_mainwindow = mainwin;
 
 #ifdef HAVE_STARTUP_NOTIFICATION
-	if (!strcmp(g_getenv("XDG_SESSION_TYPE"), "x11"))
+#ifdef GDK_WINDOWING_X11
+	if (GDK_IS_X11_DISPLAY(gdk_display_get_default()))
 		startup_notification_complete(FALSE);
 #endif
+#endif
 #ifdef HAVE_LIBSM
 	sc_session_manager_connect(mainwin);
 #endif

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list