summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-01-26 06:27:15 +0000
committerBill Spitzak <spitzak@gmail.com>2000-01-26 06:27:15 +0000
commit53919249e2b6a405f9e24d22ce7caa321f941337 (patch)
tree728b235849128ecf659576e76d040fa64ee0bdc1 /src
parentbe12eee3e5aab53510a5d8f0de7825586807b5ba (diff)
Sets the "input hint" which is needed for TWM and TWM-derived window managers.
The #if's in filename_list.cxx have been rearranged so the most common case is the default. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@995 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_x.cxx11
-rw-r--r--src/filename_list.cxx21
2 files changed, 17 insertions, 15 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 966f6ca3e..f77568f47 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.10 2000/01/23 01:56:42 bill Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.11 2000/01/26 06:27:14 bill Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -716,9 +716,10 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
}
XWMHints hints;
- hints.flags = 0;
+ hints.input = True;
+ hints.flags = InputHint;
if (fl_show_iconic) {
- hints.flags = StateHint;
+ hints.flags |= StateHint;
hints.initial_state = IconicState;
fl_show_iconic = 0;
}
@@ -726,7 +727,7 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
hints.icon_pixmap = (Pixmap)w->icon();
hints.flags |= IconPixmapHint;
}
- if (hints.flags) XSetWMHints(fl_display, x->xid, &hints);
+ XSetWMHints(fl_display, x->xid, &hints);
}
XMapWindow(fl_display, x->xid);
@@ -877,5 +878,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.10 2000/01/23 01:56:42 bill Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.11 2000/01/26 06:27:14 bill Exp $".
//
diff --git a/src/filename_list.cxx b/src/filename_list.cxx
index de92dcf74..64a3c37c4 100644
--- a/src/filename_list.cxx
+++ b/src/filename_list.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: filename_list.cxx,v 1.10.2.2 1999/12/08 20:49:57 mike Exp $"
+// "$Id: filename_list.cxx,v 1.10.2.3 2000/01/26 06:27:15 bill Exp $"
//
// Filename list routines for the Fast Light Tool Kit (FLTK).
//
@@ -40,20 +40,21 @@ extern "C" {
}
int filename_list(const char *d, dirent ***list) {
-#if defined(_AIX) || defined(CRAY) || defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
- // on some systems you may need to do this, due to a rather common
- // error in the prototype for the sorting function, where a level
- // of pointer indirection is missing:
- return scandir(d, list, 0, (int(*)(const void*,const void*))numericsort);
-#elif defined(__hpux)
- // HP-UX defines the comparison function to take const pointers instead of
- // ordinary ones...
+#if defined(__hpux)
+ // HP-UX defines the comparison function like this:
return scandir(d, list, 0, (int(*)(const dirent **, const dirent **))numericsort);
+#elif HAVE_SCANDIR
+ // The vast majority of Unix systems want the sort function to have this
+ // prototype, most likely so that it can be passed to qsort without any
+ // changes:
+ return scandir(d, list, 0, (int(*)(const void*,const void*))numericsort);
#else
+ // This version is when we define our own scandir (WIN32 and perhaps
+ // some Unix systems). This may be necessary for some Unix systems:
return scandir(d, list, 0, numericsort);
#endif
}
//
-// End of "$Id: filename_list.cxx,v 1.10.2.2 1999/12/08 20:49:57 mike Exp $".
+// End of "$Id: filename_list.cxx,v 1.10.2.3 2000/01/26 06:27:15 bill Exp $".
//