summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-02-23 09:23:53 +0000
committerBill Spitzak <spitzak@gmail.com>2000-02-23 09:23:53 +0000
commit42ebf79306f7840391bdcb2b363abcc09b591b0c (patch)
tree9624a51958972727b1bce5d0396fd43540f49eca
parent5752429ca9d5fc8807cf713fc94d22a102a8c296 (diff)
New X function: fl_open_display(Display*) lets you run fltk on an
already-created X connection. This should help with interoperability with Xt or other toolkits. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1013 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/x.H5
-rw-r--r--src/Fl_x.cxx8
2 files changed, 9 insertions, 4 deletions
diff --git a/FL/x.H b/FL/x.H
index c379af2e8..8a14e4caa 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -1,5 +1,5 @@
//
-// "$Id: x.H,v 1.10.2.4 1999/10/16 19:58:20 bill Exp $"
+// "$Id: x.H,v 1.10.2.5 2000/02/23 09:23:52 bill Exp $"
//
// X11 header file for the Fast Light Tool Kit (FLTK).
//
@@ -51,6 +51,7 @@
#include "Fl_Window.H"
FL_EXPORT void fl_open_display();
+FL_EXPORT void fl_open_display(Display*);
FL_EXPORT void fl_close_display();
// constant info about the X server connection:
@@ -124,5 +125,5 @@ extern FL_EXPORT int fl_background_pixel; // hack into Fl_X::make_xid()
#endif
//
-// End of "$Id: x.H,v 1.10.2.4 1999/10/16 19:58:20 bill Exp $".
+// End of "$Id: x.H,v 1.10.2.5 2000/02/23 09:23:52 bill Exp $".
//
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index a1e33518e..547250cbd 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.12 2000/02/18 07:11:09 bill Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.13 2000/02/23 09:23:53 bill Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -258,6 +258,10 @@ void fl_open_display() {
Display *d = XOpenDisplay(0);
if (!d) Fl::fatal("Can't open display: %s",XDisplayName(0));
+ fl_open_display(d);
+}
+
+void fl_open_display(Display* d) {
fl_display = d;
wm_delete_window = XInternAtom(d,"WM_DELETE_WINDOW",0);
@@ -880,5 +884,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.12 2000/02/18 07:11:09 bill Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.13 2000/02/23 09:23:53 bill Exp $".
//