From ab5771b62fbff2510ff495ba6dd2fcd8d1720593 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 13 Jan 1999 15:45:50 +0000 Subject: Fixes from Bill: - Fl_Clock now uses the Fl_Clock_Output base class to get the system time. - Fl_Window::iconize() and Fl_Window::icon() now coexist peacefully with all X window managers. - Minor fixes to mandelbrot and shape demos. - Menu code cleanup. git-svn-id: file:///fltk/svn/fltk/trunk@209 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/Fl_x.cxx') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index ecaecddc6..c9e34e5ab 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_x.cxx,v 1.20 1999/01/07 19:17:33 mike Exp $" +// "$Id: Fl_x.cxx,v 1.21 1999/01/13 15:45:50 mike Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -652,15 +652,6 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap) (unsigned char *)buffer, p-buffer-1); } - // Set the icon pixmap as needed: - if (w->icon()) { - XWMHints hints; - - hints.icon_pixmap = (Pixmap)w->icon(); - hints.flags = IconPixmapHint; - XSetWMHints(fl_display, x->xid, &hints); - } - if (w->non_modal() && x->next && !fl_disable_transient_for) { // find some other window to be "transient for": Fl_Window* w = x->next->w; @@ -668,13 +659,18 @@ void Fl_X::make_xid(Fl_Window* w, XVisualInfo *visual, Colormap colormap) XSetTransientForHint(fl_display, x->xid, fl_xid(w)); } + XWMHints hints; + hints.flags = 0; if (fl_show_iconic) { - XWMHints hints; hints.flags = StateHint; - hints.initial_state = 3; - XSetWMHints(fl_display, x->xid, &hints); + hints.initial_state = IconicState; fl_show_iconic = 0; } + if (w->icon()) { + hints.icon_pixmap = (Pixmap)w->icon(); + hints.flags |= IconPixmapHint; + } + if (hints.flags) XSetWMHints(fl_display, x->xid, &hints); } XMapWindow(fl_display, x->xid); @@ -823,5 +819,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx,v 1.20 1999/01/07 19:17:33 mike Exp $". +// End of "$Id: Fl_x.cxx,v 1.21 1999/01/13 15:45:50 mike Exp $". // -- cgit v1.2.3