Subject: Something wrong with fvwm/focus.c

From: Tim Phipps <[email-masked]>
Date: Fri, 15 Oct 1999 10:55:57 +0100

Today change to focus.c causes my focus changing to hang until I click
the mouse or hit Return. I bind the keypad keys thus:

Key KP_7        RWTSF   N       my_go NorthWest
Key KP_8        RWTSF   N       my_go North
Key KP_9        RWTSF   N       my_go NorthEast
Key KP_6        RWTSF   N       my_go East
Key KP_3        RWTSF   N       my_go SouthEast
Key KP_2        RWTSF   N       my_go South
Key KP_1        RWTSF   N       my_go SouthWest
Key KP_4        RWTSF   N       my_go West # does something useful c.f
the pop group

DestroyFunc my_go
AddToFunc my_go I Direction $0 (CurrentDesk !Iconic) my_flipfocus

DestroyFunc my_flipfocus
AddToFunc my_flipfocus  I FlipFocus
+                       I Raise
+                       I my_cursorwarp

DestroyFunc my_cursorwarp
AddToFunc my_cursorwarp I Current (TaskBar) WarpToWindow 55p 10p
+                       I Current (!TaskBar) WarpToWindow 35p 50p
+                       I Current (Eterm) WarpToWindow 97 90
+                       I Current (rxvt) WarpToWindow 98 90
+                       I Current (xterm) WarpToWindow 3 90
+                       I Current (qsw-pc*) WarptoWindow 50 50

This only hangs when I move focus to an window which matches more than
one of the conditions in my_cursorwarp. Most of my windows match the
(!TaskBar) line which puts the cursor on the left menubar button. The
various term emulators have the mouse warped to the scrollbar.

When the hang occurs the cursor has been warped to the (!TaskBar)
position and fvwm waits until I click or hit Return, it never does the
(xterm) warp.

The diff of the change that looks suspicious is:
+ SetPointerEventPosition(XEvent *eventp, int x, int y)
+ {
+   switch (eventp->type)
+   {
+   case ButtonPress:
+   case ButtonRelease:
+   case KeyPress:
+   case KeyRelease:
+   case MotionNotify:
+     eventp->type = ButtonPress;

Could this be fooling fvwm into thinking a button is pressed and it
waits for a button release (or Return).

Cheers,
Tim.
--
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]

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 16 Oct 1999 12:47:47 +0200

On Fri, Oct 15, 1999 at 10:55:57AM +0100, Tim Phipps wrote:
>... 

Oops, sorry.  That 'eventp->type = ButtonPress;' is a remnant of
my previous attempts to fix some bug.  The five case values
above are meant to insure that the event has 'x_root' and 'y_root'
members.  Mangling the event type was my first try to ensure this.
The line can simply be removed.

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]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 18 Oct 1999 12:03:21 +0200

On Fri, Oct 15, 1999 at 10:55:57AM +0100, Tim Phipps wrote:
> the mouse or hit Return.

Fixed.

Bye

Dominik ^_^