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

Drag/Move Wheel Actions #362

Closed
Ichisich opened this issue Feb 13, 2023 · 16 comments · Fixed by #363
Closed

Drag/Move Wheel Actions #362

Ichisich opened this issue Feb 13, 2023 · 16 comments · Fixed by #363

Comments

@Ichisich
Copy link

Ichisich commented Feb 13, 2023

#232 (comment)

Indeed could be nice, but I was more thinking about Using the mouse wheel while in Snap to zone mode, like this people that you can go next/previous layout.

In light of this, I would suggest expanding the drag-free actions to mouse wheel actions, but without the "free" limitation.

e.g.
Wheel while move: Zoom Window
Wheel while resize: Roll/Unroll Window

@RamonUnch
Copy link
Owner

I should rather generalize click combo action so that Any button can be mapped to a new action if we are within a movement or resize.

I will start with generalizing the Wheel action on move/resize.

@RamonUnch
Copy link
Owner

Well it is quite crazy, almost ready:

Try with those options in the [Input] section of the .ini file:

ScrollM=Zoom
ScrollR=Roll

M suffix is for Move, R suffix is for Resize
Of course you also have MB and RB suffixes if you are really in need of more stuff.
In total you have up to 8 possible actions for each button (depending on the context).

Of course as usual experimental build:
AltSnap1.59test5_x64.zip
AltSnap1.59test5_i386.zip

As soon as you start the extra action, movement gets locked and you have to release before being able to drag again.

@Ichisich
Copy link
Author

Ichisich commented Feb 13, 2023

As soon as you start the extra action, movement gets locked and you have to release before being able to drag again.

Is this a technical limitation or by design?

@RamonUnch
Copy link
Owner

It is a bit of both, It would be perfectly possible not to lock the window, but then it becomes quite quirky and more work would be needed to handle it properly.

@Ichisich
Copy link
Author

Ichisich commented Feb 13, 2023

It depends on the action.
Transparency/Unroll/NPStacked would be better off without stopping moving/resizing.

BTW, the action combo ScrollM=NPStacked is quite nifty.
As you can quickly switch the focused window while moving it.
Although the laser variation would be even better as the mouse courser is the primary focus point during a move action.

@RamonUnch
Copy link
Owner

Indeed there is no Next/Previous stacked window laser mode, it is an oversight, I will add that (easy).

As long as the combo action does not change the size of the window it should not add any quirk not to disable movement, so I might do that as well.

@RamonUnch
Copy link
Owner

This build tries to be smarter and locks movement only for some specific actions, namely those that can move/resize the window and those that can minimize/close it, or that pop up a new menu
Also fixes the laser stack action: NPStacked2 = Next/Perv laser stacked window.

When the Move action is not locked, moving will always move the initial window, doing otherwise would be tricky and would require too much specific code to to handle it.

AltSnap1.59test6_x64.zip
AltSnap1.59test6_i386.zip

@Ichisich
Copy link
Author

Works great so far.

The only bug I could detect is that the drag-free actions are broken (test5 and test6).

@RamonUnch
Copy link
Owner

indeed, I forgot to update this part with the new action system, same for GrabWithAlt stuff.
AltSnap1.59test7_x64.zip
AltSnap1.59test7_i386.zip

@Ichisich
Copy link
Author

When using a while action without moving/resizing the window, a drag-free action will be triggered afterward.
Not sure if this desirable or not.

@RamonUnch
Copy link
Owner

When using a while action without moving/resizing the window, a drag-free action will be triggered afterward.
Not sure if this desirable or not.

This is indeed an oversight, I think it is undesirable, and drag-free action should only trigger if no other cation was done in the meantime.

@RamonUnch
Copy link
Owner

This one should fix it.

AltSnap1.59test16_x64.zip

@zhichaoh
Copy link

Love the additional support! Unfortunately, I found with AltSnap1.59test16_x64.zip, the command line option "-af" no longer triggers. Can you please confirm?

@RamonUnch
Copy link
Owner

I found with AltSnap1.59test16_x64.zip, the command line option "-af" no longer triggers. Can you please confirm?

For me it works just fine, both -af and -ap, maybe you have a specific command in mind?

@zhichaoh
Copy link

I figured out why. I launched AltSnap elevated. But the ahk script that triggers the action is not running from an elevated script/session. Once I elevated the ahk script, the command line option works like before. Sorry for the false alarm.

@RamonUnch
Copy link
Owner

No problems, it is still informative, I will keep this in mind if someone else gets the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants