Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2004 02:51:53 -0400 (EDT)
From:      parv@pair.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/72992: x11-wm/fvwm2-devel - PATCH to remove endless loop in fvwm/icons.c
Message-ID:  <20041022065153.6B06F5A54@default.chvlva.adelphia.net>
Resent-Message-ID: <200410220650.i9M6oNsT093738@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         72992
>Category:       ports
>Synopsis:       x11-wm/fvwm2-devel - PATCH to remove endless loop in fvwm/icons.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 22 06:50:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     parv
>Release:        FreeBSD 4.10-RELEASE-p3 i386
>Organization:
>Environment:

System: FreeBSD moo.holy.cow 4.10-RELEASE-p3


>Description:

In fvwm2 unstable versions 2.5.1[02], there is inifinte loop in
fvwm/icons.c related to transient/parent windows.  Patch given below
fixes that.

As this patch was generated w/ diff's from 2.5.12 & cvs source around
Oct 19, fvwm2-devel needs to be updated first; cannot say if it will
work w/ 2.5.10.

This patch must be removed when the version 2.5.13 is released as it
has been fixed in (fvwm) cvs as of Oct 17, 2004, 12p.


See also...

  http://www.hpc.uh.edu/fvwm/archive/0410/msg00142.html
  http://www.hpc.uh.edu/fvwm/archive/0410/msg00151.html


>How-To-Repeat:

Apply the patch in work/fvwm-2.5.12/.


>Fix:

(Mind the embedded tabs.)

--- fvwm/icons.c.orig	Wed Mar 17 09:42:54 2004
+++ fvwm/icons.c	Tue Oct 19 16:13:55 2004
@@ -2251,7 +2251,7 @@
  */
 void DeIconify(FvwmWindow *fw)
 {
-	FvwmWindow *t,*tmp;
+	FvwmWindow *t, *tmp, *ofw;
 	FvwmWindow *sf = get_focus_window();
 	rectangle icon_rect;
 	XWindowAttributes winattrs = {0};
@@ -2276,15 +2276,18 @@
 		SET_ICONIFY_AFTER_MAP(fw, 0);
 		return;
 	}
-	while (IS_ICONIFIED_BY_PARENT(fw))
+	for (ofw = NULL; fw != ofw && IS_ICONIFIED_BY_PARENT(fw); )
 	{
-		for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
+		t = get_transientfor_fvwmwindow(fw);
+		if (t != NULL)
 		{
-			if (t != fw && FW_W_TRANSIENTFOR(fw) == FW_W(t))
-			{
-				fw = t;
-			}
+			ofw = fw;
+			fw = t;
 		}
+	}
+	if (IS_ICONIFIED_BY_PARENT(fw))
+	{
+		SET_ICONIFIED_BY_PARENT(fw, 0);
 	}
 
 	/* AS dje  RaiseWindow(fw); */
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041022065153.6B06F5A54>