[Containment Interface] Honor plasma/containment_context_menu restriction
AbandonedPublic

Authored by broulik on Apr 20 2018, 12:44 PM.

Details

Reviewers
sitter
Group Reviewers
Plasma
Summary

Allows disabling context menus. This got lost in the port from Plasma 4.

CHANGELOG: Most context menus in Plasma can now be disabled using the plasma/containment_context_menu KIOSK restriction

Test Plan

Right clicked kickoff, right clicked clock, right clicked desktop, no context menu showed up.
Also disables any other menu actions, e.g. when you assign "application launcher" to left click

System tray needs a separate patch

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Apr 20 2018, 12:44 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 20 2018, 12:44 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
broulik requested review of this revision.Apr 20 2018, 12:44 PM
broulik updated this revision to Diff 32644.Apr 20 2018, 12:47 PM
  • Also reject QMouseEvent
sitter requested changes to this revision.EditedApr 20 2018, 2:45 PM

quick dump from irc

[14:48] <sitter> kbroulik: hm, doesn't mousePressEvent get called for all clicks? (i.e. original line 1021-2026 are where the call chain goes into addContainmentActions whcih is where containment_actions is checked), so this implementation would make containment_context_menu=false imply containment_actions=false, no?
[14:49] <kbroulik> kinda
[14:49] <kbroulik> but you can also restrict just containment ations without context menu
[14:49] <kbroulik> oh sod this shit :(
[14:50] <sitter> but not vice versa (:
[14:50] <sitter> I'd think they are orthogonal from the documentation
[14:50] <sitter> i.e. as previously mentioned one is disable-left/middle-click the other is disable-right-click
[14:51] <kbroulik> so containment_actions should do what my patch doies
[14:51] <kbroulik> and containment_context_menu should burn in hell
[14:51] <sitter> I'd be content with that :)

Or easier to parse perhaps: either containment_context_menu and containment_actions should be orthogonal (applying to right-click and all-other-clicks respectively) OR containment_actions applies to all clicks while containment_context_menu only applies to context menu clicks (right clicks) as suggested by Kai.

Previous documentation on the two is as follows:

;plasma/containment_actions (since Plasma 4.4)
:Whether or not to allow Plasma mouse actions on containments (usually menus that pop up on mouse clicks).

;plasma/containment_context_menu (4.4)
:Whether a context menu should be shown on containments; this can be used to shut off the desktop context menu in plasma-desktop, for instance.
This revision now requires changes to proceed.Apr 20 2018, 2:45 PM
broulik abandoned this revision.Aug 11 2018, 3:39 PM
Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptAug 11 2018, 3:39 PM