NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: bin/58467: ctwm does not move the application window to the specified workspace



The following reply was made to PR bin/58467; it has been noted by GNATS.

From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: matthew green <mrg%eterna23.net@localhost>
Subject: re: bin/58467: ctwm does not move the application window to the
 specified workspace
Date: Mon, 13 Jan 2025 00:18:29 +0000 (UTC)

 On Sun, 12 Jan 2025, RVP via gnats wrote:
 
 > Didn't chase this any further.
 >
 
 I did this now. Last year, I had an intuition that this bug was caused by
 the "button" windows _completely_ covering the `Occupy Win' window, thereby
 causing X to not generate any Expose events for it. This is confirmed by
 logging the various window dimensions:
 
 the 3 Workspace "button" window dimensions:
 
  	ResizeOccupyWindow: x=0, y=0, bwidth=144, bheight=48
  	ResizeOccupyWindow: x=0, y=48, bwidth=144, bheight=48
  	ResizeOccupyWindow: x=0, y=96, bwidth=144, bheight=48
  	ResizeOccupyWindow: x=0, y=144, bwidth=144, bheight=48
  	ResizeOccupyWindow: x=0, y=192, bwidth=144, bheight=48
 
 the OK/Cancel/All "button" windows:
 (not that the "OK" button has x == -4)
 
 
  	ResizeOccupyWindow: x=-4, y=240, bwidth=54, bheight=48
  	ResizeOccupyWindow: x=46, y=240, bwidth=54, bheight=48
  	ResizeOccupyWindow: x=96, y=240, bwidth=54, bheight=48
 
 and, the `Occupy Win' window itself:
 
  	ResizeOccupyWindow: neww=144, newh=288
 
 After setting `WMgrVertButtonIndent 1' (which makes the `Occupy Win' window
 come out right because it is now visible and so X generates Expose events for
 it):
 
  	ResizeOccupyWindow: x=0, y=0, bwidth=144, bheight=47
  	ResizeOccupyWindow: x=0, y=48, bwidth=144, bheight=47
  	ResizeOccupyWindow: x=0, y=96, bwidth=144, bheight=47
  	ResizeOccupyWindow: x=0, y=144, bwidth=144, bheight=47
  	ResizeOccupyWindow: x=0, y=192, bwidth=144, bheight=47
 
  	ResizeOccupyWindow: x=-4, y=241, bwidth=54, bheight=47
  	ResizeOccupyWindow: x=46, y=241, bwidth=54, bheight=47
  	ResizeOccupyWindow: x=96, y=241, bwidth=54, bheight=47
 
  	ResizeOccupyWindow: neww=144, newh=289
 
 So, I've come up with this updated patch for the source (just correcting for
 the x == -negative co-ord.)
 
 ---START PATCH---
 diff -urN a/xsrc/external/mit/ctwm/dist/occupation.c b/xsrc/external/mit/ctwm/dist/occupation.c
 --- a/xsrc/external/mit/ctwm/dist/occupation.c	2023-07-05 07:36:07.000000000 +0000
 +++ b/xsrc/external/mit/ctwm/dist/occupation.c	2025-01-13 00:02:15.899106141 +0000
 @@ -927,6 +927,7 @@
   	 * Now the action buttons
   	 */
   	hspace = (neww - 3 * owidth) / 4;  // Padding between
 +	hspace = (hspace < 0) ? 0 : hspace;	// ensure never negative
   	x = hspace;
   	y = ((bheight + vspace) * lines) + ((3 * vspace) / 2);
   	XMoveResizeWindow(dpy, occwin->OK, x, y, owidth, oheight);
 diff -urN a/xsrc/external/mit/ctwm/dist/parse_be.c b/xsrc/external/mit/ctwm/dist/parse_be.c
 --- a/xsrc/external/mit/ctwm/dist/parse_be.c	2023-07-05 07:36:06.000000000 +0000
 +++ b/xsrc/external/mit/ctwm/dist/parse_be.c	2025-01-13 00:00:09.952045885 +0000
 @@ -1280,8 +1280,8 @@
   			if(Scr->FirstTime) {
   				Scr->WMgrVertButtonIndent = num;
   			}
 -			if(Scr->WMgrVertButtonIndent < 0) {
 -				Scr->WMgrVertButtonIndent = 0;
 +			if(Scr->WMgrVertButtonIndent < 1) {
 +				Scr->WMgrVertButtonIndent = 1;
   			}
   			Scr->workSpaceMgr.vspace = Scr->WMgrVertButtonIndent;
   			Scr->workSpaceMgr.occupyWindow->vspace = Scr->WMgrVertButtonIndent;
 @@ -1291,8 +1291,8 @@
   			if(Scr->FirstTime) {
   				Scr->WMgrHorizButtonIndent = num;
   			}
 -			if(Scr->WMgrHorizButtonIndent < 0) {
 -				Scr->WMgrHorizButtonIndent = 0;
 +			if(Scr->WMgrHorizButtonIndent < 1) {
 +				Scr->WMgrHorizButtonIndent = 1;
   			}
   			Scr->workSpaceMgr.hspace = Scr->WMgrHorizButtonIndent;
   			Scr->workSpaceMgr.occupyWindow->hspace = Scr->WMgrHorizButtonIndent;
 ---END PATCH---
 
 -RVP
 


Home | Main Index | Thread Index | Old Index