----- Forwarded message from Rhialto <[EMAIL PROTECTED]> -----
Date: Tue, 21 Dec 2004 20:24:31 +0100
From: Rhialto <[EMAIL PROTECTED]>
Subject: Re: [repository.lp.se #103] ctwm-3.7-alpha* forgets icon positions
To: Rhialto via RT <[EMAIL PROTECTED]>
On Tue 21 Dec 2004 at 02:27:00 +0100, Rhialto wrote:
> On Sun 04 Jul 2004 at 09:25:38 +0200, Rhialto via RT wrote:
> > When you have some iconified windows (but the Workspace Manager does not
> > seem to count), switch to another workspace, and then come back, the
> > iconified windows have forgotten their position. They are now all in the
> > top-left corner (on top of each other).
This is my proposed patch, which preserves the position even of icons:
Index: workmgr.c
===================================================================
RCS file: /orgs/lp/free/cvs/X/ctwm/workmgr.c,v
retrieving revision 1.7
diff -u -u -b -r1.7 workmgr.c
--- workmgr.c 16 Jun 2004 13:17:03 -0000 1.7
+++ workmgr.c 21 Dec 2004 19:20:25 -0000
@@ -1260,7 +1260,12 @@
if (tmp_win->isicon) {
if (tmp_win->icon_on) {
if (tmp_win->icon && tmp_win->icon->w) {
- if (vs) XReparentWindow (dpy, tmp_win->icon->w, vs->window, 0, 0);
+ if (vs != tmp_win->oldvs) {
+ int x, y, junk;
+ Window junkW, w = tmp_win->icon->w;
+ XGetGeometry (dpy, w, &junkW, &x, &y, &junk, &junk, &junk,
&junk);
+ XReparentWindow (dpy, w, vs->window, x, y);
+ }
IconUp (tmp_win);
XMapWindow (dpy, tmp_win->icon->w);
return;
-Olaf.
--
-- Ceterum censeo "authored[1]" delendum esse.
___ Olaf 'Rhialto' Seibert -- [1] Ugly English neologism[2].
\X/ rhialto/at/xs4all.nl -- [2] For lawyers whose English/Latin is below par.
----- End forwarded message -----