summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2007-01-10 21:11:34 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2007-01-10 21:11:34 +0000
commit08216b4fac9a1b09b40f9862e95e095707ae5ec0 (patch)
tree77e49cc49f6b060b67a022f3764090b72e7f910a
parent68e1aa97579af78ed6f9681f9288a7bdf0323398 (diff)
Fix fl_open_uri() on WIN32
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-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