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
This commit is contained in:
Bill Spitzak 2000-02-23 09:23:53 +00:00
parent 5752429ca9
commit 42ebf79306
2 changed files with 9 additions and 4 deletions

5
FL/x.H
View File

@ -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 $".
//

View File

@ -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 $".
//