summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fl_open_uri.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fl_open_uri.cxx b/src/fl_open_uri.cxx
index 7063c29d8..ff87dff67 100644
--- a/src/fl_open_uri.cxx
+++ b/src/fl_open_uri.cxx
@@ -34,11 +34,12 @@
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/wait.h>
#include "flstring.h"
#ifdef WIN32
# include <windows.h>
+# include <shellapi.h>
#else
+# include <sys/wait.h>
# include <signal.h>
# include <fcntl.h>
# include <unistd.h>
@@ -111,7 +112,7 @@ fl_open_uri(const char *uri, char *msg, int msglen) {
#ifdef WIN32
if (msg) snprintf(msg, msglen, "open %s", uri);
- ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW);
+ return (int)ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW) > 32;
#elif defined(__APPLE__)
char *argv[3]; // Command-line arguments