Skip to content

Conversation

@alex-ds13
Copy link
Contributor

@alex-ds13 alex-ds13 commented Oct 25, 2024

This sends a NotifyWinEvent to notify that the window has started/ended moving/resizing.

This should fix compatibility with Komorebi. With this change the movements and resizes are now picked up by komorebi correctly.
Although there is still an issue with komorebi borders, since when moving they check if left mouse button is pressed to keep updating, but somehow AltSnap is preventing the left mouse down from being picked up by komorebi, it checks using GetKeyState(VK_LBUTTON) but this returns 0 for some reason. The borders update properly once you finish the move/resize though.

@RamonUnch Can you help me out here to understand why is the left mouse button not being picked up properly? Is it because AltSnap returns 1 on LowLevelMouseProc when starting a move/resize? Is there any way around it?

I've made a PR on komorebi to fix this on their side. So that PR along with this one should make AltSnap and komorebi work really well together!

Fix #535

@DreamMaoMao
Copy link

Very good, this also solves his use problem on glazewm

@alex-ds13
Copy link
Contributor Author

alex-ds13 commented Oct 31, 2024

@RamonUnch I've changed this PR to use the actual event constants EVENT_SYSTEM_MOVESIZESTART and EVENT_SYSTEM_MOVESIZEEND instead of the codes 0x0A and 0x0B.

I've also been using this PR for a while now and didn't noticed any issue with it so far.

@DreamMaoMao
Copy link

It works very stable, this is not only intended for use with glazewm and komorebi, in fact, this event is normally triggered by the system when we drag the window title bar, and resize the window by the window edge, this pr just corrects the normal event.It can benefit from any application that requires window change events when these tools are used in conjunction with altsnap.

@RamonUnch
Copy link
Owner

This is a very good finding, thanks a lot for the Help,
I would have responded earlier but I was too busy with work and far from my main PC.

@RamonUnch RamonUnch merged commit 8e31ea4 into RamonUnch:main Nov 11, 2024
@alex-ds13
Copy link
Contributor Author

This is a very good finding, thanks a lot for the Help, I would have responded earlier but I was too busy with work and far from my main PC.

No problem! Do you intend to release 1.64 soon?

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 this pull request may close these issues.

Compatibility with Komorebi

3 participants