summaryrefslogtreecommitdiff
path: root/src/Fl_display.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-02-13 12:57:00 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-02-13 12:57:00 +0000
commit5d1df0e789c794b8040c5db0d84b03ae2b42fd8d (patch)
tree4e99ebb978d30bf6c7138181489dd37ce435c310 /src/Fl_display.cxx
parent8deac1e6baf7a016aabd3b6cb5ccffd7f09263cd (diff)
Details on PORTME items. Move fl_parse_color() to screen drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_display.cxx')
-rw-r--r--src/Fl_display.cxx34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/Fl_display.cxx b/src/Fl_display.cxx
index f68b1fa15..50c9af808 100644
--- a/src/Fl_display.cxx
+++ b/src/Fl_display.cxx
@@ -20,32 +20,20 @@
// Using setenv makes programs that are exec'd use the same display.
#include <FL/Fl.H>
-#include <stdlib.h>
-#include "flstring.h"
+#include <FL/Fl_Screen_Driver.H>
/**
- Sets the X display to use for all windows. Actually this just sets
- the environment variable $DISPLAY to the passed string, so this only
- works before you show() the first window or otherwise open the display,
- and does nothing useful under WIN32.
+ \brief Sets the X display to use for all windows.
+
+ Actually this just sets the environment variable $DISPLAY to the passed string,
+ so this only works before you show() the first window or otherwise open the
+ display.
+
+ This does nothing on other platforms.
*/
-void Fl::display(const char *d) {
-#if defined(__APPLE__) || defined(WIN32) // PORTME: platform screen stuff
- (void)d;
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: initiate a connection to the display"
-#else
- static char e[1024];
- strcpy(e,"DISPLAY=");
- strlcat(e,d,sizeof(e));
- for (char *c = e+8; *c!=':'; c++) {
- if (!*c) {
- strlcat(e,":0.0",sizeof(e));
- break;
- }
- }
- putenv(e);
-#endif // __APPLE__ // PORTME: platform screen stuff
+void Fl::display(const char *d)
+{
+ screen_driver()->display(d);
}
//