tilorenz / compact_pager

A compact pager (virtual desktop switcher) for the KDE Plasma desktop.
Other
32 stars 5 forks source link

Add support for the kwin Overview on mouse click #6

Closed sfrcorne closed 7 months ago

sfrcorne commented 7 months ago

Add config options to launch the kwin Overview on mouse click. The kwin Overview must be enabled in settings for this to work.

tilorenz commented 7 months ago

Looks like github doesn't recognize the PR as merged when you do a manual rebase and merge... Anyways, thanks again, I think this could be a pretty handy feature. I also rewrote the logic slightly so the View Desktop effect can also be triggered directly from compact layout.

sfrcorne commented 7 months ago

thanks, for merging the PR!

I did notice that on line 67 of the file CRep.qml the mouse wheel code:

onWheel: (wheel) => { plasmoid.configuration.enableScrolling ? switchDesktop(wheel) : {} }

got added again when this got merged. In my first PR I moved that line to the main.qml file and removed it here. Now there are two onWheel events over the same area. I don't know what will happen if you add two onWheel events over the same area. Will the function switchDesktop(wheel) be called twice or only once? I think it would be better to remove it again, just to be sure.

sfrcorne commented 7 months ago

fyi: there is now also a branch overview in your repository, which is probably also an artifact of the manual rebase and merge.

tilorenz commented 7 months ago

thanks for the heads ups.

I don't know what will happen if you add two onWheel events over the same area

It would work just fine, because as soon as one of the MouseAreas handles the event it gets consumed and doesn't propagate further. Of course, it's still better to have only one.