summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-04-25 07:48:07 +0000
committerBill Spitzak <spitzak@gmail.com>2000-04-25 07:48:07 +0000
commit4edd134933f7d9c6235667eede83bc54cf8e1070 (patch)
treed130474d6e78750d3690c3a5db1511524ab6c0ce /src/Fl_x.cxx
parent9e3610c75f8ceeebb8e59db2c641f21082979856 (diff)
Fixed definition of glutBitmapWidth to match header file.
Does not turn visible() on when a window is iconized() or if a modal window is shown and it's parent is iconized. This allows the code "while (w->visible() && w->damage()) Fl::check();" to reliably wait for the window to be mapped and drawn the first time. Some comments added to Fl_win32.cxx to explain how the WM_PAINT works. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 547250cbd..dcf87c6e4 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.13 2000/02/23 09:23:53 bill Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.14 2000/04/25 07:48:06 bill Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -684,9 +684,7 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
InputOutput,
visual->visual,
mask, &attr));
- w->set_visible();
- w->handle(FL_SHOW); // get child windows to appear
- w->redraw();
+ int showit = 1;
if (!w->parent() && !attr.override_redirect) {
// Communicate all kinds 'o junk to the X Window Manager:
@@ -719,6 +717,7 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
Fl_Window* w = x->next->w;
while (w->parent()) w = w->window();
XSetTransientForHint(fl_display, x->xid, fl_xid(w));
+ if (!w->visible()) showit = 0; // guess that wm will not show it
}
XWMHints hints;
@@ -728,6 +727,7 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
hints.flags |= StateHint;
hints.initial_state = IconicState;
fl_show_iconic = 0;
+ showit = 0;
}
if (w->icon()) {
hints.icon_pixmap = (Pixmap)w->icon();
@@ -737,6 +737,11 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap)
}
XMapWindow(fl_display, x->xid);
+ if (showit) {
+ w->set_visible();
+ w->handle(FL_SHOW); // get child windows to appear
+ w->redraw();
+ }
}
////////////////////////////////////////////////////////////////
@@ -884,5 +889,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.13 2000/02/23 09:23:53 bill Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.14 2000/04/25 07:48:06 bill Exp $".
//