<table><tr><td style="">mglb updated this revision to Diff 30818.<br />mglb retitled this revision from "Properly handle wheel in read-only mode" to "Properly handle mouse in read-only mode".<br />mglb edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-grco54za6dyv2lq/">(Show Details)</a><br />mglb edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-24nqfi4usq7eu3x/">(Show Details)</a><br />mglb removed a subscriber: hindenburg.<br />mglb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11763">View Revision</a></tr></table><br /><div><div><ul class="remarkup-list">
<li class="remarkup-list-item">Removed tests for things fixed in latest commits and added one new test</li>
<li class="remarkup-list-item">Added proper mouse clicks handling in programs with mouse support in read-only mode</li>
</ul></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">* Do not <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">allow </span>send<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ing</span> mouse events and emulated up/down keys to programs<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"><br />
</span> when read-only mode is enabled<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">.<br />
* Set the currentTerminalDisplay before sending key events, like in<br />
keyPressEvent</span>.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* The code is restructured a bit to easily separate code allowed only</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Set the currentTerminalDisplay before sending key events, like in keyPressEvent.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> when read-only m</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* wheelEvent code is restructured a bit to easily separate c</span>ode <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">is disabled</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">not allowed in read-only mode</span>.</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* s</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* S</span>tart Konsole<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* r</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* R</span>un `man man`<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> and</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">,</span> do not press any key<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> after enter</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* try to scroll using mouse wheel - the text should scroll</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Turn on read only mode</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* exit<br />
<br />
* start Konsole</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Try to scroll using mouse wheel.<br />
* Expected result: scrolling does not work in read-only mode</span><br />
* <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">run `man man`<br />
* turn on read only mod</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Actual result: scrolling works in read only mode (but only when no key has been pressed before on 2nd terminal screen)<br />
<br />
* Start konsol</span>e<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* try to scroll using</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Run a program which uses</span> mouse <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">wheel - the text should not scroll</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">events, e.g. `vim` (enable mouse with `:set mouse=a`)</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* turn off read only mode</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Make the program state suitable for using mouse events, e.g. enter a few lines of text</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* try to scroll - the text should scroll normally</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Confirm that mouse events (clicks, selection</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">without jump too far</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">wheel) work in the program</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* exit<br />
<br />
* start Konsole</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Turn on read-only mode<br />
* Try:</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* run `man man`<br />
* press Down key</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> * Click (left/right/middle button), double click</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* turn on read only mode<br />
* try to scroll using m</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> * M</span>ouse wheel<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> - the text should not scroll<br />
* turn off read only mode</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
* Click and move (selecting)</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* try to scroll - the text should scroll normally,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Expected result: mouse events are not passed to the program in read-only mode;</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">without jump too far</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">nothing happens</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">* exit</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">* Actual result: mouse events are passed to the program</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R319 Konsole</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D11763?vs=30776&id=30818">https://phabricator.kde.org/D11763?vs=30776&id=30818</a></div></div><br /><div><strong>BRANCH</strong><div><div>arc/properly-handle-mouse-in-read-only-mode</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11763">https://phabricator.kde.org/D11763</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/TerminalDisplay.cpp</div></div></div><br /><div><strong>To: </strong>mglb, Konsole<br /><strong>Cc: </strong>Konsole, herrold, ngraham, hindenburg<br /></div>