Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1144.mcz ==================== Summary ==================== Name: Morphic-mt.1144 Author: mt Time: 13 May 2016, 11:04:30.317561 am UUID: af32b5c8-bcc6-9c47-90b2-8505917d5b94 Ancestors: Morphic-kb.1143 Fixes an older issue where it was not possible to set the keyboard focus of a text morph w/o discarding its selection. Most prominent in the System Browser where one could not simply overwrite the method template but had to re-select everything. This only affects users who disable "Focus follows mouse" and "mouseOverForKeyboardFocus". Here is the trick: Clicking inside the text morph's bounds still discards the selection. Embedded in a pluggable text morph, however, it is possible to click outside the text morph but inside the pluggable text morph. In this case, just do not handle the event except for context menu and keyboard focus. This does still not work for pluggable text morphs whose text morphs fill out the whole (scrollable) viewpoint. =============== Diff against Morphic-kb.1143 =============== Item was changed: ----- Method: TextMorph>>mouseDown: (in category 'event handling') ----- mouseDown: evt "Make this TextMorph be the keyboard input focus, if it isn't already, and repond to the text selection gesture." + + evt yellowButtonPressed ifTrue: [ + "First check for option (menu) click" + ^ self yellowButtonActivity: evt shiftPressed]. + - evt yellowButtonPressed - ifTrue: ["First check for option (menu) click" - ^ self yellowButtonActivity: evt shiftPressed]. evt hand newKeyboardFocus: self. + + (self bounds containsPoint: evt position) ifTrue: [ + self + handleInteraction: [editor mouseDown: evt] + fromEvent: evt].! - self - handleInteraction: [editor mouseDown: evt] - fromEvent: evt. - ! |
This broke Window Active On First Click.
All you needed to do was disable that. On Fri, May 13, 2016 at 4:04 AM, <[hidden email]> wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1144.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1144 > Author: mt > Time: 13 May 2016, 11:04:30.317561 am > UUID: af32b5c8-bcc6-9c47-90b2-8505917d5b94 > Ancestors: Morphic-kb.1143 > > Fixes an older issue where it was not possible to set the keyboard focus of a text morph w/o discarding its selection. Most prominent in the System Browser where one could not simply overwrite the method template but had to re-select everything. > > This only affects users who disable "Focus follows mouse" and "mouseOverForKeyboardFocus". > > Here is the trick: Clicking inside the text morph's bounds still discards the selection. Embedded in a pluggable text morph, however, it is possible to click outside the text morph but inside the pluggable text morph. In this case, just do not handle the event except for context menu and keyboard focus. > > This does still not work for pluggable text morphs whose text morphs fill out the whole (scrollable) viewpoint. > > =============== Diff against Morphic-kb.1143 =============== > > Item was changed: > ----- Method: TextMorph>>mouseDown: (in category 'event handling') ----- > mouseDown: evt > "Make this TextMorph be the keyboard input focus, if it isn't > already, and repond to the text selection gesture." > + > + evt yellowButtonPressed ifTrue: [ > + "First check for option (menu) click" > + ^ self yellowButtonActivity: evt shiftPressed]. > + > - evt yellowButtonPressed > - ifTrue: ["First check for option (menu) click" > - ^ self yellowButtonActivity: evt shiftPressed]. > evt hand newKeyboardFocus: self. > + > + (self bounds containsPoint: evt position) ifTrue: [ > + self > + handleInteraction: [editor mouseDown: evt] > + fromEvent: evt].! > - self > - handleInteraction: [editor mouseDown: evt] > - fromEvent: evt. > - ! > > |
Hi Chris,
"Window active on first click" still works fine here. What did you try and where did it break? Best, Marcel |
In reply to this post by commits-2
Hi, there.
I am referring to this discussion: http://forum.world.st/Deceptive-focus-cue-in-4-6-browsers-td4827358.html Best, Marcel |
In reply to this post by marcel.taeumel
> "Window active on first click" still works fine here.
> > What did you try and where did it break? Before your change: 0) PreState: turn off Focus Follows Mouse, mosueOverForKeyboardFocus. Turn on Window Active On First Click and Windows Raise On Click. ... then ... 1) select some text in some code pane 2) select something in another window 3) now try to select different text in the original code pane 4) because "Window Active On First Click" is set, it should *immediately* change your selection however, due to your chage, this now broken. The window is not active on the first click and I first have to make it active before I can interact with it. |
Hi Chris,
here you can see that this still works fine: So, what other preference might interfere with this change? Best, Marcel |
In reply to this post by Chris Muller-3
Hi Chris,
if you take a look at SystemWindow >> #mouseDown:, you see that my change in TextMorph cannot possibly break that "window active on first click" because an inactive window has first to process #mouseDown: and activate its submorphs (including any (Pluggable)TextMorph) before the additonal check for #containsPoint: is even executed. Best, Marcel |
By coincidence, I had tested it against a selection in the Transcript
window in the image after loading your code, but against two code windows for the test before your change. Because, for some odd reason, Window Active On First Click does not work with Transcript windows (though I assumed it did), I concluded it was your change that broke it. In fact, I just needed to do the *exact* same test in both images. So, it appears you're right, sorry for the false alarm.. (strange about the Transcript window though) On Fri, May 13, 2016 at 10:47 AM, marcel.taeumel <[hidden email]> wrote: > Hi Chris, > > if you take a look at SystemWindow >> #mouseDown:, you see that my change in > TextMorph cannot possibly break that "window active on first click" because > an inactive window has first to process #mouseDown: and activate its > submorphs (including any (Pluggable)TextMorph) before the additonal check > for #containsPoint: is even executed. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894687.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |