Subject: Re: rxvt selection problem

From: Dominik Vogt <[email-masked]>
Date: Fri, 4 Feb 2000 15:45:47 +0100

Bob,

I've spent long hours to debug this problem, but all I could
find out is that it started at the time of the decor_w patches.
(To refresh your memory: if I drag a window with the title bar
upwards fast, a rxvt window below it will mark some text).
This may be a X server bug, but we can't leave it this way.
My guess is that since buttons are grabbed on the decor_w
instead of the frame, the button press somehow slips through
to the other client; I can't identify how this happens, though.

Can you perhaps take a look at this?  I'm really stumped.

Bye

Dominik ^_^

P.S.: X server = XFree 3.3.3.4

-- 
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]

---

From: Bob Woodside <[email-masked]>
Date: Mon, 07 Feb 2000 22:24:40 -0500

> find out is that it started at the time of the decor_w patches.

	Awww....$#@%*&!!

> This may be a X server bug, but we can't leave it this way.

	I think it's more likely an rxvt bug, but I agree that we can't leave
it this way. (I'm using the AcceleratedX server, by the way - I think
we've heard of this happening under various different servers.)

> to the other client; I can't identify how this happens, though.

	I can't either...yet, anyway - if it's actually the button press, which
I'm not entirely sure is the case.

> Can you perhaps take a look at this?  I'm really stumped.

	I haven't been ignoring your question, I've just been trying to find
some time to look at it. I'm as stumped as you are, so far.

	I finally got to spend a little time trying to observe the problem this
evening, to clarify my understanding of what's happening. Bear with me
if this is old stuff to you, and just consider that I'm typing as I
think out loud.

	Relevant or not, this phenomenon *always* seems to be coincident with
the old "mouse cursor leads the drag operation" syndrome (which *does*
seem to be worse these days); thus, I have to wonder whether it may be
relevant.

	For example, if I grab the titlebar of an rxvt (no other windows on the
screen) and drag quickly downward - i.e., I'm dragging the mouse cursor
across the rxvt window, until the move catches up with me - then the
text gets selected in that window. (If I'm careful to grab very near the
bottom of the titlebar, I don't even have to move it very fast for the
cursor to start leading the move, and for text to get selected.)

	On the other hand, If I have two overlapping rxvt's, like so -- 

         ________________
        | (A)            |
        |      __________________
        |     | (B)              |
        |_____|                  |
              |                  |
              |__________________|

and I grab B's titlebar and drag quickly upward, so the mouse cursor
moves across A before the move catches up with it, text will get
selected in rxvt A (or rather, it *may* get selected - it doesn't always
happen, but that's probably due to my erratic hand movement).

	Hmmm.... I find that, with a little practice, I can make it happen at
will in any direction. Say that rxvt A, above, is on top, and I grab its
titlebar close to the right edge and drag quickly downward and slghtly
to the right. If the cursor clears window A quickly enough, then passes
over B slowly enough, before the movement of A starts to catch up, I can
select everything in rxvt B. This cursor leading seems to be really bad,
by the way: while practicing this maneuver I found that I can move the
cursor all the way across the screen before the window starts to move -
and when it gets this far ahead, I have to release the mouse button
before the window will start to move.

	Does this ring a bell with anyone? Dominik, can you verify that my
observation of the conditions is correct, or am I missing something?

	Also, is this unique to rxvt, as far as we know? (As a sanity check, I
tried doing this with a pair of xterms for about 15 minutes, and
couldn't make them misbehave.)

Cheers,
Bob

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 08 Feb 2000 10:50:06 +0100

> I'm not entirely sure is the case.

No, it's not rxvt's fault (and probably not fvwm's either).
I guess you're right that it's not the button press that
goes through.  If it were, all applications should have this
problem.  It's more likely a ButtonMotion event.  Probably
xterm ignores ButtonMotion if it didn't get a ButtonPress first
while rxvt doesn't need the press.  If I do the same with a xev
window, I can definitely see a difference in the reported exevts,
but I can't interpret it.

> seem to be worse these days); thus, I have to wonder whether it may be

Very likely.  BTW, in my experiments with rxvt I sometimes get this
syndrome again.  Doesn't happen with the old code either.  It becomes
more likely the higher the system load is.

> 	On the other hand, If I have two overlapping rxvt's, like so -- 

SOmething I forgot to mention:  the selection problem even shows up
if I keep the button pressed on the title bar for a minute before
moving it.  THis really confuses me.  If it's a 'grab' problem then
this can't happen.

> 	Hmmm.... I find thatOC, with a little practice, I can make it happen at

I just tried that myself.  At my first attepmt is see the same, with
the difference that the window doesn't even move if I release the
button (though the title bar is depressed).

> observation of the conditions is correct, or am I missing something?

All correct.

> couldn't make them misbehave.)

See above.  You can see the difference in xev.

Bye

Dominik ^_^

---

From: Bob Woodside <[email-masked]>
Date: Tue, 08 Feb 2000 13:27:13 -0500

> moving it.  THis really confuses me.  If it's a 'grab' problem then

	Yes, I've observed that, too.

	Try this. Grab the titlebar and begin the move very slowly, so the
window begins moving before the cursor gets out of the titlebar. Once
the window starts to move, you can drag it as fast or slowly or
erratically as you please, and I'll be you can't make any spurious
selection happen. We need to look at what happens in that interval befor
FVWM decides that a move is in progress.

	Gotta run to catch a train. Maybe I can look at it some more later this
evening.

Cheers,
Bob

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 10 Feb 2000 03:32:21 +0100

> 	Gotta run to catch a train. Maybe I can look at it some more later this

I've tried to grab all buttons on the frame window instead
of the decor_w because I suspected a grab problem at first.
This didn't help, though.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
The adjuration to be "normal" seems shockingly repellent to me; I see neither
hope nor comfort in sinking to that low level.  I think it is ignorance that
makes people think of abnormality only with horror and allows them to remain
undismayed at the proximity of "normal" to average and mediocre.  For surely
anyone who achieves anything is, essentially, abnormal.
                -- Dr. Karl Menninger, "The Human Mind", 1930