steventheworker / Dock-Expos--home

Window preview app for MacOS (on the dock) using App Exposé.
https://dockexpose.netlify.app
73 stars 0 forks source link

requested setting - increase mouseout delay #9

Closed kroyster closed 9 months ago

kroyster commented 1 year ago

With multiple monitors, I often have a lot of screen to traverse between mousing over the dock icon and then selecting the desired application preview instance that pops up, sometimes on a separate monitor. I'm struggling to get there fast enough before the mouseout event causes the preview windows to disappear. Can a delay be added, perhaps configurable in the settings?

steventheworker commented 1 year ago

This is technically already implemented. It's hardcoded to close after 1.5 seconds (single monitor), but if the mouse moved to a different monitor, it will add +1.5 more seconds before it will close. So if the delay seems much quicker than 3 seconds, it could be a bug.

You can try to resolve it by swapping the primary monitor, or changing screen arrangements.

Code in question that makes me suspect that bug fix... ``` if ((dT < 1.5 || prevPID == dockPID) && extendedOffsetX) { if ((x >= primaryScreenWidth && lastMouseLocation.x <= primaryScreenWidth) || (x <= primaryScreenWidth && lastMouseLocation.x >= primaryScreenWidth)) { forceProceed = YES; } } ```

If messing with this works, yet it's still too fast, report back and I'll make it configurable when I push the fix. I should also mention, developing on my M1 limits my testing to 1 external monitor max, so Dock Exposé currently only supports 2 displays.

kroyster commented 1 year ago

I have 3 external monitors, in addition to the main laptop screen, so maybe that is part of the problem? I'm seeing the previews close almost immediately if I slow-drag my mouse from the dock towards the previews - definitely much quicker than 1.5 seconds. I'll have to play with my monitor configuration later and get back with you. Thanks for following up!

steventheworker commented 1 year ago

Yeah that's definitely that's what's causing this, it's 2 screens maximum, and that includes the internal laptop screen.

My apps bind to monitors in a very rudimentary way (eg: DockAltTab, screenhook).

The plan is to fix this in screenhook first, then copy into Dock Exposé and DockAltTab once it's working properly.

steventheworker commented 9 months ago

oh yeah I think it works now (2+ monitors)