🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #20

Patch to vtwm 5.1 to fix VirtualDesktop geometry bug

#20
From: Tim Ramsey
Date: Thu, 30 Jul 1992 11:54
53 lines
1947 bytes
I just compiled vtwm 5.1 (which I fetched from export.lcs.mit.edu).
When I started it up it put my virtual desktop window on the left
side of the screen instead of on the right where I told it to go:

   VirtualDesktop "150x100-0+0" 20

It ignored the "-0" in the geometry string.  Here's my attempt at a fix:

*** desktop.c.orig	Wed Feb 19 10:50:31 1992
--- desktop.c	Thu Jul 30 06:42:13 1992
***************
*** 494,499 ****
--- 494,515 ----
  	    return;
  	}
  
+ 	/* tar@math.ksu.edu: fix handling of -0 X and Y geometry */
+ 	if (JunkMask & XValue) {
+ 		if (JunkMask & XNegative) {
+ 			Scr->VirtualDesktopDX = Scr->MyDisplayWidth
+ 			    - JunkWidth - (2 * Scr->BorderWidth) + JunkX;
+ 		}
+ 		else	Scr->VirtualDesktopDX = JunkX;
+ 	}
+ 	if (JunkMask & YValue) {
+ 		if (JunkMask & YNegative) {
+ 			Scr->VirtualDesktopDY = Scr->MyDisplayHeight
+ 			    - JunkHeight - (2 * Scr->BorderWidth) + JunkY;
+ 		}
+ 		else	Scr->VirtualDesktopDY = JunkY;
+ 	}
+ 
  	JunkWidth *= Scr->VirtualDesktopDScale;
  	JunkHeight *= Scr->VirtualDesktopDScale;
  
***************
*** 510,520 ****
  
  	Scr->VirtualDesktopWidth = JunkWidth;
  	Scr->VirtualDesktopHeight = JunkHeight;
- 
- 	if (JunkMask & XValue)
- 			Scr->VirtualDesktopDX = JunkX;
- 	if (JunkMask & YValue)
- 			Scr->VirtualDesktopDY = JunkY;
  
  	/* all of the values looked reasonable */
  	Scr->Virtual = TRUE;
--- 526,531 ----
-- 
    Tim Ramsey, 913.532.6750
    Department of Mathematics
    Kansas State University
Technical Details
Message-ID: <158l8uINN7n9@hilbert.math.ksu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!math.ksu.edu!deadend

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!math.ksu.edu!deadend
From: tar@math.ksu.edu (Tim Ramsey)
Newsgroups: comp.sources.bugs
Subject: Patch to vtwm 5.1 to fix VirtualDesktop geometry bug
Date: 30 Jul 1992 06:54:06 -0500
Organization: Dept. of Mathematics, Kansas State University
Lines: 53
Message-ID: <158l8uINN7n9@hilbert.math.ksu.edu>
NNTP-Posting-Host: hilbert.math.ksu.edu