Supress paste in screen locker
AbandonedPublic

Authored by davidedmundson on Aug 18 2018, 8:59 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

KScreenlocker tries to clear the clipboard on load. However, klipper
also (by default) automatically keeps the last relevant item in the
clipboard. Whilst both parts work correctly, Plasma as a whole does not.

This became a problem when we added the reveal password button as it is
a data leak.

MF doesn't want an X specific fix, which is fair enough. My earlier
patch removing the reveal button was blocked, which is fair enough.
That doesn't leave many nice places, but we do need to do something.

This patch intercepts the paste shortcut at the window level.

Doing it at a theme level doesn't easily work with QQC1 as the child
gets key events first. With QQC2 it probably whould, but PC3 doesn't
have the reveal button.

Test Plan

Reproduced issue
Added patch
Couldn't reproduce
Also can't show the context menu of the screen locker due to kwin behaviour.

Diff Detail

Repository
R133 KScreenLocker
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1982
Build 2000: arc lint + arc unit
davidedmundson created this revision.Aug 18 2018, 8:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 18 2018, 8:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Aug 18 2018, 8:59 PM

Added bug no.

davidedmundson abandoned this revision.Aug 18 2018, 10:50 PM

I like this solution. As a matter of fact the default options of Klipper are also fine. Only if the not default prevent empty clipboard option is used this breaks.

rkflx added a subscriber: rkflx.EditedAug 19 2018, 6:48 AM

Added bug no.

I don't think that worked. Try with arc diff --edit ;)

To take it from the commit message:

git commit --amend
arc diff --verbatim

(A bit longer, obviously.)

. As a matter of fact the default options of Klipper are also fine. Only if the not default prevent empty clipboard option is used this breaks.

Code says otherwise.

klipper.kcfg: <entry name="PreventEmptyClipboard" type="Bool">
klipper.kcfg- <label>Prevent empty clipboard</label>
klipper.kcfg- <default>true</default>

. As a matter of fact the default options of Klipper are also fine. Only if the not default prevent empty clipboard option is used this breaks.

Code says otherwise.

klipper.kcfg: <entry name="PreventEmptyClipboard" type="Bool">
klipper.kcfg- <label>Prevent empty clipboard</label>
klipper.kcfg- <default>true</default>

wow, sorry. I was sure it's the default. Must have been my two years on Wayland without klipper ;-)