Subject: Re: FVWM: FIXED: deiconification of windows without an icon

From: Austin Donnelly <[email-masked]>
Date: Fri, 19 Apr 96 18:12 BST

On Fri, 19 Apr 1996, Austin Donnelly wrote:

> In fvwm-2.0.42, if you deiconify a window without an icon associated
> with it, it appeared behind all other windows, but is entered in
> fvwm's idea of things as the top-most window.
> 
> This can be demostrated by 'raise-or-lower'ing it.
> 
> To see this:
> 
> 1) Iconify a window that doesn't have an icon specified.
>      -> iconised window is now just a small recangle of text
> 2) deiconify it.
>      -> window comes back, but displayed at the bottom stacking order
>         on screen
> 3) raise-or-lower the window.
>      -> nothing happens, since fvwm thinks the window is at the top,
>         so it sends it to the bottom (it's already at the bottom).
> 4) raise-or-lower the window again.
>      -> now comes to the front for the first time.
> 

Ok, I've got a fix for it:

------------------------------------------------------------
--- misc.c~	Mon Mar 11 18:27:35 1996
+++ misc.c	Fri Apr 19 18:05:15 1996
@@ -686,8 +686,10 @@
 #endif
   if ((t->flags & ICONIFIED)&&(!(t->flags & SUPPRESSICON)))
     {
-      if(!(t->flags & NOICON_TITLE))wins[i++] = t->icon_w;
-      wins[i++] = t->icon_pixmap_w;
+      if(!(t->flags & NOICON_TITLE)) 
+	wins[i++] = t->icon_w;
+      if (t->icon_pixmap_w)
+	wins[i++] = t->icon_pixmap_w;
     }
   if(!(t->flags & ONTOP))
     wins[i++] = t->frame;
------------------------------------------------------------

Basically, what was happening was that when building a list of windows
to be raised, it would include icon_pixmap_w, which was a NULL (since
the window had no icon).

The list of windows to be raised was passed to the X server in the
  XRestackWindows(dpy,wins,i);
call. In this call, X was taking the NULL in wins to mean the end of
the list, rather than relying on i. Since the main window is in wins[]
after the NULL, it never got re-stacked.

Austin
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Fri, 19 Apr 1996 16:47:54 -0400

>>>>> "Austin" == Austin Donnelly <[email-masked]> writes:

>> fvwm's idea of things as the top-most window.

Just a side note - I don't see this (under AIX).  I'll try under Linux
when I get home, just out of curiousity...

....
Austin> Ok, I've got a fix for it:
....
Austin> Basically, what was happening was that when building a list of windows
Austin> to be raised, it would include icon_pixmap_w, which was a NULL (since
Austin> the window had no icon).

Austin> The list of windows to be raised was passed to the X server in the
Austin>   XRestackWindows(dpy,wins,i);
Austin> call. In this call, X was taking the NULL in wins to mean the end of
Austin> the list, rather than relying on i. Since the main window is in wins[]
Austin> after the NULL, it never got re-stacked.

Interesting...  Well, your patch shouldn't anything, so I'll try it
out and if all is ok it'll be in the next beta release.

Chuck