[PATCH] containmentlayoutmanager: don't enter edit mode without activefocus
ItemContainer enters edit mode on pressAndHold for desktop widgets not
set to immutable. This causes a problem with menus that open on press -
the container will not receive further mouse events that now go to the
menu, so it still considers itself pressed and unmoved the whole time,
and goes into edit mode after a while, exiting the menu. This makes
on-press menus in desktop widgets borderline unusable, and even if the
user manages to be quick enough to activate the desired entry during the
pressAndHold duration, it'll still enter edit mode unless the user also
does a full click on the applet afterward.
We can circumvent this particular case relatively easily by listening to
the container's activefocus changes - the popup opening does not cause
a focusOut event, but it does take activeFocus away from the container,
so if we stop the timer in that case, it works out as it should.
CCBUG: 416909
(cherry picked from commit
3d9dd7fe1a664b6b4f20523d6c4425eb57dc6b4c)
Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>
Gbp-Pq: Name upstream_8e6b79da_containmentlayoutmanager-don-t-enter-edit-mode-without-activefocus.patch