Package: ctwm
Version: 3.7-3
Severity: normal
Tags: patch
This has annoyed me for years. With ReallyMoveInWorkspaceManager set, you
can drag windows (within workspaces and between them) by manipulating the
tiny "thumbnail" versions in the workspace manager.
However, on most of my machines (like the one I'm typing this on) this
causes the real window to pop to the right of the screen. You can control
which workspace it ends up in and where it's placed vertically, but it
will always be placed to the right.
It turns out upstream has fixed this bug in 3.8a, although I couldn't see
it mentioned in their changelog. I cherry-picked the relevant change
(one character) and attach it here as a patch.
(I use ctwm exclusively, and yet I haven't had an urge to move to
3.8a ... but I note that it's been out for years without making it
into Debian. I guess your time and energy is limited, too.)
BR,
Jorgen
-- System Information:
Debian Release: 5.0.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.33.5 (PREEMPT)
Locale: LANG=sv_SE, LC_CTYPE=sv_SE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages ctwm depends on:
ii libc6 2.7-18lenny2 GNU C Library: Shared libraries
ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii librplay3 3.3.2-11.1 Shared libraries for the rplay net
ii libsm6 2:1.0.3-2 X11 Session Management library
ii libx11-6 2:1.1.5-2 X11 client-side library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxmu6 2:1.0.4-1 X11 miscellaneous utility library
ii libxpm4 1:3.5.7-1 X11 pixmap library
ii libxt6 1:1.0.5-3 X11 toolkit intrinsics library
ii m4 1.4.11-1 a macro processing language
ii x11-common 1:7.3+20 X Window System (X.Org) infrastruc
ctwm recommends no packages.
ctwm suggests no packages.
-- no debconf information
diff -Naur ctwm-3.7-orig/workmgr.c ctwm-3.7/workmgr.c
--- ctwm-3.7-orig/workmgr.c 2010-06-13 09:34:50.000000000 +0200
+++ ctwm-3.7/workmgr.c 2010-06-13 09:36:47.000000000 +0200
@@ -2735,7 +2735,7 @@
winX = Scr->BorderLeft;
newX = msw->x + XW + Scr->BorderLeft * mw->wwidth / vs->w;
}
- if (((winX + w) > vs->x - Scr->BorderRight) &&
+ if (((winX + w) > vs->w - Scr->BorderRight) &&
((Scr->MoveOffResistance < 0) ||
((winX + w) < vs->w - Scr->BorderRight + Scr->MoveOffResistance))) {
winX = vs->w - Scr->BorderRight - w;