Browse Source

Implement XFCE support in os_linuxbsd.cpp

Added support for XFCE by executing 'exo-open' alongside 'kde-open'.
Refactor error handling in os_linuxbsd.cpp
DSOE1024 2 weeks ago
parent
commit
b982794b23
1 changed files with 9 additions and 1 deletions
  1. 9 1
      platform/linuxbsd/os_linuxbsd.cpp

+ 9 - 1
platform/linuxbsd/os_linuxbsd.cpp

@@ -565,7 +565,15 @@ Error OS_LinuxBSD::shell_open(const String &p_uri) {
 		return OK;
 	}
 	ok = execute("kde-open", args, nullptr, &err_code);
-	return !err_code ? ok : FAILED;
+	if (ok == OK && !err_code) {
+		return OK;
+	}
+	// XFCE
+	ok = execute("exo-open", args, nullptr, &err_code);
+	if (ok == OK && !err_code) {
+		return OK;
+	}
+	return FAILED;
 }
 
 bool OS_LinuxBSD::_check_internal_feature_support(const String &p_feature) {