Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2000 17:27:24 -0500 (EST)
From:      dgilbert@velocet.ca
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/23701: XPostitPlus bogon
Message-ID:  <200012202227.RAA79346@office.tor.velocet.net>
Resent-Message-ID: <200012202230.eBKMU5q00543@freefall.freebsd.org>

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

>Number:         23701
>Category:       ports
>Synopsis:       XpostitPlus fails when height or width is 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 20 14:30:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     David Gilbert
>Release:        FreeBSD 4.1-RELEASE i386
>Organization:
Velocet Communications
>Environment:

This probably happens on any platform and should be sent back to the
maintainer, but in the meantime:

>Description:

When X fails in a certain way, XPostitPlus seems to get back very
bogus information on the state of it's windows.  If it ends up putting
height and width of 0 into the files, it will then refuse to restart
with the X error "Error: Shell widget PostItNote has zero width and/or height"

>How-To-Repeat:

Edit the first four numbers in a postit note "note1" file to 0, run
xpostit+

>Fix:

This patch can be installed as patch-ab in the files directory of the
port and it fixes the problem.

*** note.c.orig	Wed Dec 20 17:15:34 2000
--- note.c	Wed Dec 20 17:20:15 2000
***************
*** 359,364 ****
--- 359,373 ----
  			}
  		}
  
+                 /*
+                  * The problem is that texth == 0 or textw == 0 causes an ungraceful exit.
+                  * In this case, we set them all to a standard size.
+                  */
+                 if(texth == 0 || textw == 0)
+                 {
+                     texth = 169;
+                     textw = 227;
+                 }
  
  		/*
  		 * Get the index number of this note.


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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