<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hi Chris,</p>
<p><br>
</p>
<p>what do you think about <span>Morphic-ct.1666? :-) It would be nice if we did not completely lose the opportunity to manually activate the message and interact with it via keyboard.</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Chris Cunningham <cunningham.cb@gmail.com><br>
<b>Gesendet:</b> Samstag, 6. Juni 2020 04:41:50<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Morphic-cbc.1665.mcz</font>
<div> </div>
</div>
<div>
<div dir="ltr">This fixes the mangling I accidentally did to Marcel's changes, following his suggestion (roughly).
<div><br>
</div>
<div>I now get the best of both worlds in my image.  If noone objects, I'll move it to trunk in a few days.</div>
<div><br>
</div>
<div>-cbc</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Jun 5, 2020 at 7:38 PM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-cbc.1665.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Morphic-cbc.1665.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-cbc.1665<br>
Author: cbc<br>
Time: 5 June 2020, 7:38:31.284262 pm<br>
UUID: c887ffd7-40ae-3547-8240-13186db081c8<br>
Ancestors: Morphic-cbc.1664<br>
<br>
Add support for locking a morph so that it doesn't accept keyboard actions - but is still accessible with the mouse.  Sending #rejectKeyboardFocus will make that morph completely ignore keyboard events of any kind.  A morph can be tested with #shouldRejectKeyboardFocus
 to see if this should happen.<br>
DialogWindow has been modified to reject keyboard focus, so that in (say, ConfirmDialogs) you can still use the keyboard to interact with the keys AND you can interact with the message text via the mouse.<br>
(Also updated StringMorph similarly.)<br>
<br>
=============== Diff against Morphic-cbc.1664 ===============<br>
<br>
Item was changed:<br>
  ----- Method: DialogWindow>>createMessage: (in category 'initialization') -----<br>
  createMessage: aString <br>
<br>
        messageMorph := aString asText asMorph.<br>
        messageMorph<br>
                name: 'Message';<br>
                readOnly: true;<br>
                setProperty: #indicateKeyboardFocus toValue: #never;<br>
+               rejectKeyboardFocus.<br>
-               lock.<br>
        self setMessageParameters.      <br>
        ^ messageMorph!<br>
<br>
Item was added:<br>
+ ----- Method: Morph>>rejectKeyboardFocus (in category 'accessing') -----<br>
+ rejectKeyboardFocus<br>
+       self rejectKeyboardFocus: true.!<br>
<br>
Item was added:<br>
+ ----- Method: Morph>>rejectKeyboardFocus: (in category 'accessing') -----<br>
+ rejectKeyboardFocus: boolean<br>
+       self setProperty: #rejectKeyboardFocus toValue: boolean!<br>
<br>
Item was changed:<br>
  ----- Method: Morph>>rejectsEvent: (in category 'events-processing') -----<br>
  rejectsEvent: anEvent<br>
        "Return true to reject the given event. Rejecting an event means neither the receiver nor any of it's submorphs will be given any chance to handle it."<br>
+       ^self isLocked or: [self visible not or: [anEvent isKeyboard and: [self shouldRejectKeyboardFocus]]]!<br>
-       ^self isLocked or:[self visible not]!<br>
<br>
Item was added:<br>
+ ----- Method: Morph>>rejectsKeyboardFocus (in category 'testing') -----<br>
+ rejectsKeyboardFocus<br>
+       ^self valueOfProperty: #rejectKeyboardFocus ifAbsent: [false]!<br>
<br>
Item was added:<br>
+ ----- Method: Morph>>shouldRejectKeyboardFocus (in category 'testing') -----<br>
+ shouldRejectKeyboardFocus<br>
+       ^self valueOfProperty: #rejectKeyboardFocus ifAbsent: [false]!<br>
<br>
Item was changed:<br>
  ----- Method: StringMorph>>wouldAcceptKeyboardFocus (in category 'event handling') -----<br>
  wouldAcceptKeyboardFocus<br>
+       ^ self isLocked not and: [self shouldRejectKeyboardFocus not]!<br>
-       ^ self isLocked not!<br>
<br>
<br>
</blockquote>
</div>
</div>
</div>
</body>
</html>