[containmentlayoutmanager] Don't accept button events that only start timers
Needs ReviewPublic

Authored by davidedmundson on Oct 18 2019, 1:16 AM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Otherwise we block containment actions on the left button

BUG: 413104

Test Plan

Click and held applet
Set up action on left click, clicked

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17839
Build 17857: arc lint + arc unit
davidedmundson created this revision.Oct 18 2019, 1:16 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 18 2019, 1:16 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Oct 18 2019, 1:16 AM
wbauer added a subscriber: wbauer.Oct 19 2019, 11:34 PM

The patch fixes the problem here, and I didn't notice regressions either so far.
I only did a quick test though, and cannot really comment on the patch per se.

One thing maybe: with the Desktop layout, if you switch an applet to edit mode (by pressing and holding the left mouse button), it's not possible to exit edit mode by left-clicking on the desktop (even if no left-click action is configured). You need to click on a different applet now, but what if there is none...

Without this patch it works.

anthonyfieroni added a subscriber: anthonyfieroni.EditedOct 22 2019, 4:48 PM

You can try it like that:

if (!m_editMode) {
    event->setAccepted(false);
}

or

event->setAccepted(m_editMode);

You can try it like that:

if (!m_editMode) {
    event->setAccepted(false);
}

or

event->setAccepted(m_editMode);

That doesn't help, unfortunately.

This patch fixes the bug, but it does indeed break leaving per-widget edit mode. Could we also exit that on left-click regardless of what other action it performs?