Subject: Notification: incoming/415

From: [email-masked]
Date: Fri, 9 Jul 1999 03:24:14 -0500 (CDT)

FVWM Bug Tracking notification

new message incoming/415

Message summary for PR#415
	From: [email-masked]
	Subject: Window move pointer offset
	Date: Fri, 9 Jul 1999 03:24:12 -0500 (CDT)
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 9 Jul 1999 19:53:06 +0200

On Fri, Jul 09, 1999 at 03:24:14AM -0500, [email-masked] wrote:
> Full_Name: Christian Wiedholz
> Version: 2.2.2
> CVS_Date: 
> OS: SunOS Release 5.5.1
> X_Server: Xsun
> Submission from: (NULL) (192.35.17.13)
> 
> 
> When trying to move a window with the pointer and OpaqueMoveSize 100 the
> pointer has an offset to the title bar.
> This happens only if moved quickly.
> 
> Detailed instructions:
> 1) set OpaqueMoveSize 100 in .fvwm2rc
> 2) move pointer over title bar of a window
> 3) press left mouse button and drag window QUICKLY (the bug is only visible
> if it's done quickly!)
>  -> Result: mouse pointer is not over title bar while moving

Christian, I don't see that myself but some related problems.
I have made a patch to the current development sources. Can
you try to patch the file fvwm/move.c from the 2.2.2
distribution:

Old passage (file move.c, function InteractiveMove):

-----
  /* Although a move is usually done with a button depressed we have to check
   * for ButtonRelease too since the event may be faked. */
  if (eventp->type == ButtonPress || eventp->type == ButtonRelease)
    {
      DragX = eventp->xbutton.x_root;
      DragY = eventp->xbutton.y_root;
    }
  else
    XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild, &DragX, &DragY,
                  &JunkX, &JunkY, &JunkMask);
-----

Replace with:

-----
 {
  XEvent my_event;
  /* Although a move is usually done with a button depressed we have to check
   * for ButtonRelease too since the event may be faked. */
  if (eventp->type == ButtonPress || eventp->type == ButtonRelease)
  {
    DragX = eventp->xbutton.x_root;
    DragY = eventp->xbutton.y_root;
  }
  else if (eventp->type == KeyPress || eventp->type == KeyRelease)
  {
    DragX = eventp->xkey.x_root;
    DragY = eventp->xkey.y_root;
  }
  else if (eventp->type == MotionNotify)
  {
    DragX = eventp->xmotion.x_root;
    DragY = eventp->xmotion.y_root;
  }
  else
  {
    fvwm_msg(WARN, "InteractiveMove",
             "BUG: move triggered by event type %d", eventp->type);
    if (XCheckMaskEvent(dpy, PointerMotionMask|ButtonMotionMask, &my_event))
    {
      DragX = my_event.xmotion.x_root;
      DragY = my_event.xmotion.y_root;
    }
    else
    {
      /* it's hopeless, just query the pointer position */
      XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild, &DragX, &DragY,
                    &JunkX, &JunkY, &JunkMask);
    }
  }
 }
-----

Does this help?

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]