Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] AltSnap behaves as if the window started moving despite drag threshold was not reached #575

Closed
emvaized opened this issue Nov 25, 2024 · 9 comments · Fixed by #580
Closed
Labels
bug Something isn't working

Comments

@emvaized
Copy link

I would like AltSnap to apply some threshold before starting to move the window on left click, so that I can set Ctrl key as a modifier, but continue using Ctrl+Click in various apps.

There is DragThreshold option in AltSnap.ini config file, which postpones window movement until mouse cursor has moved for some threshold. However, with this option enabled (either 2 or 3) AltSnap on mouse down still behaves as if the window is already started moving — cursor immediately changes to hand, window opacity changes, and EVENT_SYSTEM_MOVESIZESTART is being sent (which I listen for in my Autohotkey scripts). It makes using Ctrl+Click in apps not very pleasant (although it still works due to PiercingClick option being enabled).

It would be great if AltSnap only started applying all "window started moving" logic only after move threshold was reached, or if there was a separate config option for such a behavior. It also would be great to have a config to change drag threshold, as I couldn't find any in the config file (but that's probably a topic for another issue ticket).

@RamonUnch
Copy link
Owner

RamonUnch commented Nov 26, 2024

Could you try with this version of hooks.dll (x64) replacing the old version.
It should only send the events when movements actually starts.

hooks.zip

You also got the option with the above:

in the [Advanced] section of the .ini file

NotifyWinEvent=1
; Determines if AltSnap should send the EVENT_SYSTEM_MOVESIZESTART/END
; events when moving a window. This is useful when interacting with
; some other accessibility tools (default 1).

@RamonUnch
Copy link
Owner

Sorry the above is not the good one, maybe try with this one:
hooks.zip

@emvaized
Copy link
Author

Hm, I'm afraid that AltSnap doesn't start with this file for me. The program itself starts, but in the disabled state, and I couldn't enable it either by clicking the tray icon or from context menu of the tray icon

@RamonUnch
Copy link
Owner

you use x64 version?

Try with the combo altsnap.exe hooks.dll
AltSnap_test_x64.zip
AltSnap_test_i386.zip

@emvaized
Copy link
Author

Yes, I'm using x64 version.
Just tried the "test_x64" file, but still the same... Background service doesn't start

@RamonUnch
Copy link
Owner

be sure you look at the properties of the exe/dll file to check that they are not blocked for execution, this will happen on Win10/11 if you use the native zip extraction method.

@emvaized
Copy link
Author

check that they are not blocked for execution

How could I check it? There is no "read only" checkbox in the file properties. I also just tried to extract the archive using NanaZip, still same result

@RamonUnch
Copy link
Owner

https://www.tenforums.com/tutorials/5357-unblock-file-windows-10-a.html

I do not get it otherwise
Otherwise try with the 32bit version?

@RamonUnch RamonUnch added the bug Something isn't working label Nov 30, 2024
@emvaized
Copy link
Author

emvaized commented Dec 4, 2024

https://www.tenforums.com/tutorials/5357-unblock-file-windows-10-a.html

I do not get it otherwise Otherwise try with the 32bit version?

It's my bad, I did not notice that you also attached modified .exe file in the x64 archive.

AltSnap now indeed only sends window move event only when window move was actually started — so it behaves much more consitently. However, mouse cursor still changes to the "move" one once I click on window, but didn't move it yet (I use UseCursor=4 config).

I understand that changing a cursor is a way of providing visual feedback to the user that the window will be moved once they move their cursor — so I'm not sure about if this should be changed. My use case for this is probably too much specific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants