Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001567 [Squeak] Morphic minor always 07-27-05 21:34 01-08-08 23:41
Reporter cdavidshaffer View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001567: [BUG][FIX] PLM click on two different mouse buttons interpreted as double click
Description I notice this a lot when I'm using inspectors (happens in 3.6 and 3.7):

    left click on an inspector list item then quickly right click, it
gets interpreted as a double click (it raises a new inspector on the
selected object).

This fix is made against a 3.7 beta image. It seems to work but I have
very little confidence that it is "the right thing to do". Basically I
modified MouseClickState to only consider something a "double click" if
it happened with the red (usually left) button. I don't think that
double clicks on other buttons are really supported anyway but I could
be wrong. If they are then this change set would break that.
Additional Information
Attached Files  MouseClickStateFix-cds.cs.gz [^] (958 bytes) 07-27-05 21:34
 MouseClickStateFix-cds.2.cs.gz [^] (982 bytes) 07-27-05 21:37
 ClickExerciser-wiz.1.cs [^] (6,929 bytes) 08-26-05 07:58
 MouseButtonState-wiz.13.cs [^] (33,075 bytes) 08-26-05 07:59
 HandUseNewClicks-wiz.1.cs [^] (2,359 bytes) 08-26-05 08:00

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

related to 0001037closed  [bug] [testers] Click state handler causes mouse up to be processed twice because of (unitended?) recursion. 
related to 0007039new  Click events are only honored after moving the mouse 
child of 0006975new  [RFE] Better event distictions between drag, click and mouse up. 

- Notes
(0001994 - 147 - 175 - 175 - 175 - 175 - 175)
KenCausey
07-27-05 21:35

cdshaffer@acm.org:

"Sorry, I posted it too quickly. It fixes the problem by breaking double
clicks completely. I'll have another look at it."
 
(0001995 - 104 - 138 - 138 - 138 - 138 - 138)
KenCausey
07-27-05 21:36

cdshaffer@acm.org:

"New, corrected ChangeSet attached."

(attaching MouseClickStateFix-cds.2.cs.gz)
 
(0001996 - 325 - 325 - 325 - 325 - 325 - 325)
KenCausey
07-27-05 21:38

I tested this issue and both changesets in 3.8-6665-basic. I was able to confirm the click behavior described with an inspector. As mentioned after loading the first changeset all double-clicking seemed to be disabled. After load the second changeset the mis-behavior was gone but double clicking the same button did work.
 
(0002020 - 989 - 1065 - 1065 - 1225 - 1225 - 1225)
wiz
07-28-05 20:44
edited on: 07-28-05 20:51

This method MouseClickState(MCS)>>handleEvent:from: has been patched many times. Is long an convoluted and does lots of things differently depending on what it is asked to report on.

In other words. MCS is long overdue for a refactoring and bug fixing overhaul. I've given it some thought and maybe this is a good motivation to give it a shot.

One thing that would help is a thought to the "story" of what mouse clicks should actually do in squeak. In this case how do you handle a click or double click being interupted by a second button press. Or a press with the cmd alt or ctrl modifiers which stand in for second buttons for one button mice? e.g. Mousedown, second button down, original button mouse up. And the other variants?

See also bug report: 0001037 which reports bugs in the same method patched here. There are also so diagnostic tools for monitoring MCS there.

The other thing that is essential is writing test event sequences to put MCS thru its paces.

 
(0002374 - 540 - 582 - 582 - 582 - 582 - 582)
wiz
08-17-05 04:33

Just wanted to post a progress report. The refactoring is coming along.
I've added predicates to mouseButtonEvent to allow it to tell if an event is a button event of the same button or a button event of a different button.

I've got a MouseButtonState class that will track click progress for individual buttons.

I've separated out the handling of nil drag and nil double click selectors by making 4 classes each handling simpler logic.

Things are getting ready for testing as soon as I think up some safe ways to test this stuff.
 
(0002535 - 1528 - 1755 - 1755 - 1755 - 1755 - 1755)
wiz
08-26-05 08:31

ClickExerciser-wiz.1.cs
       a modern day DoubleClickExample for putting click state thru its paces. Once loaded the exerciser is in the objects catalog (under demo). The balloons should explain the rest. Looks best when rotated 45 degrees clockwise.

MouseButtonState-wiz.13.cs
  These are the changes that fix the bug and refactor MouseClckState.
  These changes do not touch MCS and do not by themselves change behavior.

Until you load:

HandUseNewClicks-wiz.1.cs
  which changes the hook in HandMorph that references MCS to use the new stuff instead.

I tested this in a fresh 3.8-6665 full. The new stuff works. Click Exerciser does what you would expect. It exhibits the correct behavior with regards clicks interupted by a second button. It works correctly regardless of which button started the click state.

I've left in some debugging snapshooting for now. It will need to be taken out before the production version but will be useful now in tracking things.

This is very solid beta. I've used it with no problems and put it here for you to try and to examine.

----

The other thing that is essential is writing test event sequences to put MCS thru its paces.

I haven't got to that yet.

The story of what should happen is really important. DoubleClickState used to work as advertised in squeak 2.7. The specs changed in 2.8 and I think at each code change along the way. Why? and more importantly how are they to work now and in the future.


Yours in service -- Jerome Peace
 
(0003967 - 22 - 22 - 22 - 114 - 114 - 114)
wiz
02-22-06 07:50

See also Mantis 0002496.
 
(0010525 - 59 - 59 - 59 - 59 - 59 - 59)
user291
04-11-07 16:30

This issue was fixed somewhere at or before Squeak 3.9 7067
 

- Issue History
Date Modified Username Field Change
07-27-05 21:34 KenCausey New Issue
07-27-05 21:34 KenCausey File Added: MouseClickStateFix-cds.cs.gz
07-27-05 21:35 KenCausey Reporter KenCausey => user291
07-27-05 21:35 KenCausey Note Added: 0001994
07-27-05 21:36 KenCausey Note Added: 0001995
07-27-05 21:37 KenCausey File Added: MouseClickStateFix-cds.2.cs.gz
07-27-05 21:38 KenCausey Note Added: 0001996
07-28-05 20:44 wiz Note Added: 0002020
07-28-05 20:51 wiz Note Edited: 0002020
08-17-05 04:33 wiz Note Added: 0002374
08-26-05 07:58 wiz File Added: ClickExerciser-wiz.1.cs
08-26-05 07:59 wiz File Added: MouseButtonState-wiz.13.cs
08-26-05 08:00 wiz File Added: HandUseNewClicks-wiz.1.cs
08-26-05 08:31 wiz Note Added: 0002535
08-26-05 18:26 KenCausey Relationship added related to 0001037
02-22-06 07:50 wiz Note Added: 0003967
04-11-07 16:30 user291 Status new => closed
04-11-07 16:30 user291 Note Added: 0010525
04-11-07 16:30 user291 Resolution open => fixed
01-08-08 23:41 KenCausey Reporter user291 => cdavidshaffer
05-09-08 02:04 wiz Relationship added child of 0006975
03-17-09 04:59 wiz Relationship added related to 0007039


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
105 total queries executed.
53 unique queries executed.
Powered by Mantis Bugtracker