rxhanson / RectanglePro-Community

Bug reports and discussion for the Rectangle Pro app
https://rectangleapp.com/pro
98 stars 1 forks source link

Rectangle Pro causing unwanted text selection #124

Open RyanRoberts opened 2 years ago

RyanRoberts commented 2 years ago

I'm experiencing a rather strange bug that started recently, maybe with the past two versions. I'm not 100% sure if it is directly caused by Rectangle Pro but I can't repeat the bug with Rectangle fully closed down.

What's happening is when focusing text documents and terminal (basically anything text based) the cursor switches to an actual selection state without holding down the mouse button to select text. Here's a video which shows the issue: https://media.yep.digital/qkGPRy

I'm on macOS 12.6 (21G115), Rectangle is version Version 2.6.2 (124) and can provide my Rectangle config or any more details if you need.

Something to consider, I think this may have kicked off when I enabled "Move" or "Resize" under Window Throw. They're now disabled as I couldn't get the hang of these options. It may also be a coincidence but worth noting.

rxhanson commented 2 years ago

Thanks for reporting.

It would be helpful to get your config, and any logs that might appear when this happens (hold option in the menu bar menu and select view logging, then reproduce the issue).

My initial guess as to what could be happening is that Rectangle Pro could be interfering with the normal event stream for text selection (just by processing events on mouse down). If that's the case, then it could take some time to figure out optimizations that could prevent this. This is one of those fuzzy problems that could be affected by other things, too.

It's not likely that Move/Resize is causing the issue, and if they are not configured then they should have no impact.

RyanRoberts commented 2 years ago

Thanks, I'll do that. Here's the config https://gist.github.com/RyanRoberts/a6c17beb1aca775704147082850dbc9e

Nothing interesting in the Rectangle log window, just:

2022-09-26T15:52:11+01:00: Obtained window from window number under cursor
2022-09-26T15:52:12+01:00: Obtained window from window number under cursor
2022-09-26T15:52:13+01:00: Obtained window from window number under cursor
2022-09-26T15:52:15+01:00: Obtained window from window number under cursor

I've noticed this isn't just text selection but if I switch from one window to another and the mouse is over the title bar area of the window, it'll select the window to move it about without clicking and holding 😆

So far I've not been able to pin it down to any other app than Rectangle Pro (or another app + Rectangle).

RyanRoberts commented 2 years ago

I'm fairly sure I've found the problem, if I uncheck Disable fast dragging to Mission Control and restart RP I can't reproduce the problem. Checking it again and restarting the issue returns!

I've tested it a few times now and I can't get the weird behaviour to return with it disabled.

rxhanson commented 2 years ago

Thanks for the detective work. This does make sense to me that this would be the culprit, and I'll post back once I figure out how to stabilize that feature.

(Details) In order for this feature to work, the app discards mouse dragged events when a window is being dragged at the top of the screen. Looks like there's a glitch in properly discarding results only in the desired scenario of dragging a window at the top.