- Do not send mouse events and emulated up/down keys to programs when read-only mode is enabled.
- Set the currentTerminalDisplay before sending key events, like in keyPressEvent.
- wheelEvent code is restructured a bit to easily separate code not allowed in read-only mode.
Details
Details
- Reviewers
hindenburg - Group Reviewers
Konsole - Commits
- R319:52f1c0153d1b: Properly handle mouse in read-only mode
R319:0ca1391cf50d: Properly handle mouse in read-only mode
- Start Konsole
- Run man man, do not press any key after enter
- Turn on read only mode
- Try to scroll using mouse wheel.
- Expected result: scrolling does not work in read-only mode
- Actual result: scrolling works in read only mode (but only when no key has been pressed before on 2nd terminal screen)
- Start konsole
- Run a program which uses mouse events, e.g. vim (enable mouse with :set mouse=a)
- Make the program state suitable for using mouse events, e.g. enter a few lines of text
- Confirm that mouse events (clicks, selection, wheel) work in the program
- Turn on read-only mode
- Try:
- Click (left/right/middle button), double click
- Mouse wheel
- Click and move (selecting)
- Expected result: mouse events are not passed to the program in read-only mode; nothing happens
- Actual result: mouse events are passed to the program
Diff Detail
Diff Detail
- Repository
- R319 Konsole
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
To be clear the "test" area is after applying the patch correct? I can't tell the difference following those steps
Comment Actions
- Removed tests for things fixed in latest commits and added one new test
- Added proper mouse clicks handling in programs with mouse support in read-only mode
Comment Actions
Yes, tests should work after patching. You are partially right, 1st and 3rd test did show something that was fixed in latest commits. I fixed the tests and description.