summaryrefslogtreecommitdiff
path: root/src/Fl_display.cxx
diff options
context:
space:
mode:
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);
}
//