From 5d1df0e789c794b8040c5db0d84b03ae2b42fd8d Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 13 Feb 2016 12:57:00 +0000 Subject: 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 --- src/Fl_display.cxx | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'src/Fl_display.cxx') 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 -#include -#include "flstring.h" +#include /** - 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); } // -- cgit v1.2.3