[Folder View] Replay mouse click so left button containment actions work
ClosedPublic

Authored by broulik on Jul 7 2017, 1:47 PM.

Details

Summary

When we don't initiate a rubber band selection, replay the mouse event so containment actions assigned to the left mouse button work.

BUG: 357367

Test Plan

Assigned application launcher containment action to left mouse button, clicked folder view, menu showed up. Same with Ctrl+left click.

Not sure if it's a good idea to just send a mouse *press* event.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jul 7 2017, 1:47 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 7 2017, 1:47 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein edited edge metadata.Jul 8 2017, 7:42 AM

Wouldn't it make more sense to use or extend EventGenerator than introduce a new MouseEventFaker?

Sure, I was thinking about that, but couldn't recall the name of it :D I'll have a look

broulik updated this revision to Diff 16330.Jul 8 2017, 10:55 AM
broulik retitled this revision from RFC: [Folder View] Reply mouse click so left button containment actions work to [Folder View] Replay mouse click so left button containment actions work.
  • Use EventGenerator – wow. from a 100 loc patch to 4 lines :D
hein added a comment.Jul 9 2017, 8:14 AM

Is there some way we can reuse the EG in main.qml, or does this have to be in the widget code too? (I think the answer is "yes", but double-checking.)

broulik updated this revision to Diff 16434.Jul 10 2017, 8:21 AM
  • Re-use existing eventGenerator
hein accepted this revision.Jul 10 2017, 8:59 AM

Yay down to one line :)

This revision is now accepted and ready to land.Jul 10 2017, 8:59 AM
This revision was automatically updated to reflect the committed changes.