[Fwd: ctwm 3.6: warping the pointer between mapped windows]

From: Claude Lecommandeur (claude.lecommandeur@epfl.ch)
Date: Fri Jan 23 2004 - 11:32:35 CET


-------- Original Message --------
Subject: ctwm 3.6: warping the pointer between mapped windows
Date: Thu, 22 Jan 2004 16:23:49 +0900 (JST)
From: ta@ps.st (Takahashi Youichirou)
To: Claude.Lecommandeur@epfl.ch

I have two problems with ctwm 3.6 when I warp the pointer
to the next/previous mapped window:

  o Sometimes the pointer moves right too much and gets out
    of the title bar.

  o When the active window is closed and the pointer is on
    the root window, the pointer never warp until I move it
    with the mouse.

I write a patch and it works well in my environment, but I
am not sure about it:

diff -u iconmgr.c.orig iconmgr.c
--- iconmgr.c.orig Wed Dec 12 00:38:52 2001
+++ iconmgr.c Thu Jan 22 14:34:48 2004
@@ -426,6 +426,7 @@
     WList *orig = NULL;
     int got_it;
 
+ if (!Current) Current = Active;
     if (!Current) return;
 
     ip = Current->iconmgr;
@@ -474,7 +475,7 @@
             int tbx = Scr->TBInfo.titlex;
             int x = tmp->twm->highlightxr;
             XWarpPointer (dpy, None, tmp->twm->title_w, 0, 0, 0, 0,
- tbx + (x - tbx) / 2,
+ tmp->twm->title_width / 2,
                           Scr->TitleHeight / 4);
         } else {
             XWarpPointer (dpy, None, tmp->twm->w, 0, 0, 0, 0, 5, 5);

-- 
Claude Lecommandeur           Claude.Lecommandeur@Epfl.Ch
EPFL - SIC                    +41 21 693 22 97
1015 Lausanne (Switzerland)   http://slwww.epfl.ch/SIC/SL/info/Claude.html

This signature intentionally left boring.



This archive was generated by hypermail 2.1.4 : Sat Jan 24 2004 - 06:45:03 CET