Subject: Re: Icon defined with style "NoIconTitle"

From: Bob Woodside <[email-masked]>
Date: Mon, 8 Feb 1999 23:01:20 -0500 (EST)

"Robert H. Ford II" <[email-masked]> wrote:
> OK, two different scenarios.
>	....
> The only way to get these icons to drop behind is to use the Lower builtin.

	OK, our observations are in sync. I thought you couldn't even
manipulate them with the Raise and Lower functions.

	This is at least partly related to the new RaiseWindow code. The
fix to take icon windows into account didn't go quite far enough. In
the case of the NoIconTitle windows, there is no xxx->icon_w icon
window, only the xxx->icon_pixmap_w window, which the new code doesn't
recognize. This is the source of the icon-window-won't-raise and then
I-can't-raise-other-windows-above-the-icon problem. I'm testing the
fix for that.

	The non-focus issue still puzzles me. I have trouble seeing how
auto-raise could ever have worked for NoIconTitle windows. The SetFocus
code that tries to set the focus to the icon window looks unchanged
since 2.0.46, and it bypasses the focus if there is no xxx->icon_w,
just as the code is doing today.

	I'll defer to the group consensus if anyone objects, but I think
this definitely needs to be fixed for 2.2.0. As to whether it will
warant another beta, I don't have a strong feeling one way or the other.

- Bob

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

---

From: Bob Woodside <[email-masked]>
Date: Tue, 9 Feb 1999 22:48:54 -0500 (EST)

Bob Woodside <[email-masked]> blathered something to
the effect that:
> I'm testing the fix...
...and further, that 
>
> I have trouble seeing how auto-raise could ever have worked for
> NoIconTitle windows.

	I tried it under 2.0.46. It didn't work there either, as
I surmised from the code.

	I've attached the corrective patch that I'm nominating for
inclusion in 2.2.0. The patch also makes auto-raise work for
NoIconTitle icons.

	The polls are officially open.

- Bob

--- events.c	Tue Feb  9 21:00:01 1999
+++ events-fixed.c	Tue Feb  9 20:58:51 1999
@@ -1672,6 +1672,10 @@
 	        {
 	          break;
 	        }
+              else if (t1->icon_pixmap_w == children[i])
+	        {
+	          break;
+	        }
             }
           else
             {
--- focus.c	Tue Feb  9 21:41:53 1999
+++ focus-fixed.c	Tue Feb  9 21:41:31 1999
@@ -162,8 +162,21 @@
 	  }
       Scr.Ungrabbed = Fw;
     }
+/*
   if((Fw)&&(Fw->flags & ICONIFIED)&&(Fw->icon_w))
     w= Fw->icon_w;
+*/
+  if((Fw)&&(Fw->flags & ICONIFIED))
+    {
+      if (Fw->icon_w)
+        {
+          w = Fw->icon_w;
+        }
+      else if (Fw->icon_pixmap_w)
+        {
+          w = Fw->icon_pixmap_w;
+        }
+    }
   
   if((Fw)&&(Fw->flags & Lenience))
     {
--- misc.c	Tue Feb  9 21:00:01 1999
+++ misc-fixed.c	Tue Feb  9 22:18:56 1999
@@ -984,11 +984,26 @@
          Motif menus. Instead raise wins[0] only above the topmost window
 	 which is managed by us. 
       */
-     if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w) 
+     if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w && wins[0] != Scr.FvwmRoot.stack_next->icon_pixmap_w) 
       { 
         if (Scr.FvwmRoot.stack_next->flags & ICONIFIED)
           {
-            changes.sibling = Scr.FvwmRoot.stack_next->icon_w;
+            /*
+                RBW - use the icon window or pixmap if there is one; but
+                there may not be (NoIconTitle or NoIcon) --
+            */
+            if (Scr.FvwmRoot.stack_next->icon_w)
+              {
+                changes.sibling = Scr.FvwmRoot.stack_next->icon_w;
+              }
+            else if (Scr.FvwmRoot.stack_next->icon_pixmap_w)
+              {
+                changes.sibling = Scr.FvwmRoot.stack_next->icon_pixmap_w;
+              }
+            else
+              {
+                changes.sibling = Scr.FvwmRoot.stack_next->frame;
+              }
           }
         else
           {

---

From: Dan Espen <[email-masked]>
Date: Wed, 10 Feb 1999 10:54:15 -0500

> 	The polls are officially open.

Your  patch  fixes the problems   I was having  with XEmacs  icons not
lowering below XEmacs windows.  Looks like a good patch to me.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 11 Feb 1999 23:43:55 +0100

> 	The polls are officially open.

I'm not sure if it's already in now. But if it isn't I don't
object against inclusion. After all the work you spent on this
I want this to work in 2.2.

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Bob Woodside <[email-masked]>
Date: Thu, 11 Feb 1999 20:44:36 -0500 (EST)

> I want this to work in 2.2.

	Me too. It's not in yet. I'll commit it later this evening.

- Bob