Subject: Unexpected behavior from "MoveThreshold 0"

From: Jacco van Schaik <[email-masked]>
Date: Mon, 21 Feb 2000 12:21:10 +0100 (MET)

Hi all,

Sorry to barge in to your mailing list, but I've just had a hell of a
time trying to find out why double-clicking on icons wouldn't de-iconify
them in the latest fvwm version. I thought I'd share my findings with
all you fine people.

I had been hacking my .fvwm2rc file and one of the things I had changed
was adding a "MoveThreshold 0", so any displacement of the mouse would
be considered a move. To quote the man-file: "If the mouse moves by more
than <pixels> pixels it is assumed to be a drag."

But now a double-click on icons wouldn't de-iconify them anymore. I
checked the archives of this mailing list for bugs linked with
double-clicking and did find some mentions of the CheckActionType
function, and that the bug had been fixed. So I did a CVS checkout of
the /latest/ latest version, but unfortunately that didn't help.

So I decided to look into the CheckActionType function myself. This
looked like it had something to do with the problem:

    if (!(x - xcurrent < dist && xcurrent - x < dist &&
	  y - ycurrent < dist && ycurrent - y < dist))

It's just that I don't like the way in which this is written. So I
changed it to:

    if ((x - xcurrent >= dist || xcurrent - x >= dist ||
	 y - ycurrent >= dist || ycurrent - y >= dist))

which is equivalent. Now it becomes clear why it didn't work as
expected: A move of 0 pixels (i.e. no move at all) is also considered a
move, so that action is returned instead of a double-click. Changing the
above to:

    if (x - xcurrent > dist || xcurrent - x > dist ||
	y - ycurrent > dist || ycurrent - y > dist)

solved the problem.

I hope I haven't fixed a bug that has already been solved. The CVS id of
the functions.c file that I changed is 1.127, I assume that's the
latest.

Anyway, use this info as you wish. I hope it will be useful.

Groeten,				- Jacco

--
Think about it:               | In Real Life: Jacco van Schaik
If the wheel had never been   | Mail me at:   [email-masked]
reinvented, we'd still be     | Spam bait:    postmaster@localhost
driving on logs...            | See also http://www.nlr.nl/NARSIM.html

--
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, 21 Feb 2000 13:00:39 +0100

> Anyway, use this info as you wish. I hope it will be useful.

Thanks.  I'll fix it in the CVS sources in a few minutes.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [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]