fthx / dock-from-dash

GNU General Public License v3.0
96 stars 20 forks source link

Keep dock when app menu is shown #29

Closed rastersoft closed 2 years ago

rastersoft commented 2 years ago

When the user right-click on an icon, the dock must remain. This MR implements this.

Fix https://github.com/fthx/dock-from-dash/issues/28

fthx commented 2 years ago

What do you think of my way? https://github.com/fthx/dock-from-dash/commit/9c40d62a7232678e2c73731c15e3a817cd31f0ac It's working except if: right click, leave the popup menu without clicking on an item => the dock does not hide.

rastersoft commented 2 years ago

Mmm... do you really need to touch the prototype? Wouldn't it work just by replacing the method in the Dock class?

fthx commented 2 years ago

(I'm reworking some points.) Could you tell me how to make these prototypes modifs to be clean? There is another one in code: is there another way of modifying the app icon click? Sorry, these points are not clear for me, that was the first time I did that.

rastersoft commented 2 years ago

I did some changes to my MR. Check it out.

rastersoft commented 2 years ago

I think that it is better to just have a centralized place where to decide it the mouse is hovering the dock or not.

rastersoft commented 2 years ago

Check this MR: I just overrode the _itemMenuStateChanged() method and just called the original method with super. It does work because we don't need to modify the behavior of all and every dash, but only the dock, which is our own class derived from dash.

fthx commented 2 years ago

What do you think of: https://github.com/fthx/dock-from-dash/commit/fa21caf95e7cafc947e145ae53682333476b6014 ? This way makes the new code very short. I'll look at your latest commits now.

fthx commented 2 years ago

Argh, you pointed out the second popup menu issue in your comment. I'll look at this and if I don't find a correct and short way I'll push your code.

fthx commented 2 years ago

I had to remove the 'super' line because it does not work after resume from sleep.