Subject: New command AnimatedMoveNoWarp

From: Tim Phipps <[email-masked]>
Date: Tue, 06 Oct 1998 13:50:43 +0100

Hi all,
	The attached is a patch to several files that makes a new command:
AnimatedMoveNoWarp that does the same as AnimatedMove but it leaves the
pointer alone.  Feel free to rename it Brady, I couldn't think of
anything snappy.

Cheers,
Tim.

--- fvwm.man.orig	Tue Oct  6 13:40:02 1998
+++ fvwm.man	Tue Oct  6 13:43:06 1998
@@ -597,6 +597,11 @@
 sense to have a user move the window interactively and animatedly.

+.IP "AnimatedMoveNoWarp \fIx y\fP"
+
+The same as AnimatedMove except the pointer is not warped with the window.
+  
+
 .IP "Beep"
 As might be expected, the makes the terminal beep.
 
--- misc.h.orig	Tue Oct  6 13:19:15 1998
+++ misc.h	Tue Oct  6 13:20:01 1998
@@ -275,6 +275,8 @@
 		 unsigned long context,char *action, int *Module);
 void animated_move_window(XEvent *eventp,Window w,FvwmWindow *tmp_win,
 			  unsigned long context,char *action, int *Module);
+void animated_move_window_only(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+			  unsigned long context,char *action, int *Module);
 void set_animation(XEvent *eventp,Window w,FvwmWindow *tmp_win,
 		   unsigned long context, char *action,int* Module);
 void set_menudelay(XEvent *eventp,Window w,FvwmWindow *tmp_win,
--- parse.h.orig	Tue Oct  6 13:16:40 1998
+++ parse.h	Tue Oct  6 13:18:25 1998
@@ -110,6 +110,7 @@
     F_WINDOW_SHADE,
     F_COLOR_LIMIT,
     F_ANIMATED_MOVE,
+    F_ANIMATED_MOVE_NO_WARP,
 
 /* Functions for use by modules only! */
     F_SEND_WINDOW_LIST = 1000
--- functions.c.orig	Tue Oct  6 13:12:48 1998
+++ functions.c	Tue Oct  6 13:16:30 1998
@@ -54,6 +54,7 @@
   {"AddToFunc",    add_item_to_func, F_ADDFUNC,             FUNC_NO_WINDOW},
   {"AddToMenu",    add_item_to_menu, F_ADDMENU,             FUNC_NO_WINDOW},
   {"AnimatedMove", animated_move_window,F_ANIMATED_MOVE,    FUNC_NEEDS_WINDOW},
+  {"AnimatedMoveNoWarp",animated_move_window_only,F_ANIMATED_MOVE_NO_WARP,FUNC_NEEDS_WINDOW},
   {"Beep",         Bell,             F_BEEP,                FUNC_NO_WINDOW},
 #ifdef BORDERSTYLE
   {"BorderStyle",  SetBorderStyle,   F_BORDERSTYLE,         FUNC_NO_WINDOW},
--- move.c.orig	Tue Oct  6 13:05:05 1998
+++ move.c	Tue Oct  6 13:10:59 1998
@@ -108,12 +108,13 @@
  *
  ****************************************************************************/
 void move_window_doit(XEvent *eventp,Window w,FvwmWindow *tmp_win,
-		      unsigned long context, char *action,int* Module, Bool fAnimated)
+		      unsigned long context, char *action,int* Module,
+		      Bool fAnimated, Bool TakeCursor)
 {
   int FinalX, FinalY;
   int n;
   int x,y;
-  int width, height;
+  uint width, height;
 
   if (DeferExecution(eventp,&w,&tmp_win,&context, MOVE,ButtonPress))
     return;
@@ -142,7 +143,7 @@
   if (w == tmp_win->frame)
   {
     if (fAnimated) {
-      AnimatedMoveOfWindow(w,-1,-1,FinalX,FinalY,TRUE,-1,NULL);
+      AnimatedMoveOfWindow(w,-1,-1,FinalX,FinalY,TakeCursor,-1,NULL);
     }
     SetupFrame (tmp_win, FinalX, FinalY,
 		tmp_win->frame_width, tmp_win->frame_height,FALSE);
@@ -161,7 +162,7 @@
 		+tmp_win->icon_p_height);
       if (fAnimated) {
         AnimatedMoveOfWindow(tmp_win->icon_w,-1,-1,tmp_win->icon_xl_loc,FinalY+tmp_win->icon_p_height,
-			     TRUE,-1,NULL);
+			     TakeCursor,-1,NULL);
       } else {
         XMoveWindow(dpy,tmp_win->icon_w, 
 		    tmp_win->icon_xl_loc, FinalY+tmp_win->icon_p_height);
@@ -171,7 +172,7 @@
 	  XMapWindow(dpy,tmp_win->icon_w);
 	  if (fAnimated) {
    	    AnimatedMoveOfWindow(tmp_win->icon_pixmap_w, -1,-1,
-				 tmp_win->icon_x_loc,FinalY,TRUE,-1,NULL);
+				 tmp_win->icon_x_loc,FinalY,TakeCursor,-1,NULL);
 	  } else {
 	    XMoveWindow(dpy, tmp_win->icon_pixmap_w, tmp_win->icon_x_loc,FinalY);
 	  }
@@ -186,13 +187,19 @@
 void move_window(XEvent *eventp,Window w,FvwmWindow *tmp_win,
 		 unsigned long context, char *action,int* Module)
 {
-  move_window_doit(eventp,w,tmp_win,context,action,Module,FALSE);
+  move_window_doit(eventp,w,tmp_win,context,action,Module,FALSE,FALSE);
 }
 
 void animated_move_window(XEvent *eventp,Window w,FvwmWindow *tmp_win,
 			  unsigned long context, char *action,int* Module)
 {
-  move_window_doit(eventp,w,tmp_win,context,action,Module,TRUE);
+  move_window_doit(eventp,w,tmp_win,context,action,Module,TRUE,TRUE);
+}
+
+void animated_move_window_only(XEvent *eventp,Window w,FvwmWindow *tmp_win,
+			  unsigned long context, char *action,int* Module)
+{
+  move_window_doit(eventp,w,tmp_win,context,action,Module,TRUE,FALSE);
 }

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 06 Oct 1998 15:18:33 +0200

[email-masked] wrote:

> The attached is a patch to several files that makes a new
> command: AnimatedMoveNoWarp that does the same as
> AnimatedMove but it leaves the pointer alone.

Wouldn't an option ('NoWarp') to AnimatedMove be better?

Ciao

Dominik
- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Tim Phipps <[email-masked]>
Date: Tue, 06 Oct 1998 14:26:42 +0100

> Wouldn't an option ('NoWarp') to AnimatedMove be better?
Probably but it looked like a lot more code and testing.
Cheers,
Tim.