Skip to content

Commit

Permalink
Merge pull request #564 from alex-ds13/main
Browse files Browse the repository at this point in the history
Notify system of move/resize event start and end
  • Loading branch information
RamonUnch authored Nov 11, 2024
2 parents 9d89359 + 2ed9fe3 commit 8e31ea4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,8 +2663,9 @@ __declspec(dllexport) LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wP
if (state.action || state.alt) {
enum action action = state.action;
HideTransWin();
// Send WM_EXITSIZEMOVE
// Send WM_EXITSIZEMOVE and EVENT_SYSTEM_MOVESIZEEND
SendSizeMove(WM_EXITSIZEMOVE);
NotifyWinEvent(EVENT_SYSTEM_MOVESIZEEND, state.hwnd, 0, 0);

state.alt = 0;
state.alt1 = 0;
Expand Down Expand Up @@ -4960,8 +4961,9 @@ static int init_movement_and_actions(POINT pt, HWND hwnd, enum action action, in
UpdateCursor(pt);
SetWindowTrans(state.hwnd);

// Send WM_ENTERSIZEMOVE
// Send WM_ENTERSIZEMOVE and EVENT_SYSTEM_MOVESIZESTART
SendSizeMove(WM_ENTERSIZEMOVE);
NotifyWinEvent(EVENT_SYSTEM_MOVESIZESTART, state.hwnd, 0, 0);
} else if(button == BT_WHEEL || button == BT_HWHEEL) {
// Wheel actions, directly return here
// because maybe the action will not be done
Expand Down Expand Up @@ -5102,8 +5104,9 @@ static void FinishMovement()
}

HideTransWin();
// Send WM_EXITSIZEMOVE
// Send WM_EXITSIZEMOVE and EVENT_SYSTEM_MOVESIZEEND
SendSizeMove(WM_EXITSIZEMOVE);
NotifyWinEvent(EVENT_SYSTEM_MOVESIZEEND, state.hwnd, 0, 0);

state.action = AC_NONE;
state.moving = 0;
Expand Down

0 comments on commit 8e31ea4

Please sign in to comment.