Skip to content

Commit

Permalink
Fixed bug with incorrect placement when using multiple monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
david0 committed Mar 4, 2014
1 parent 72d7735 commit 5ac8268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ void centerOnWindow(HWND windowToCenter, HWND windowToCenterOn)
width = rect.right - rect.left;
height = rect.bottom - rect.top;

point.x = max(0, point.x - width / 2);
point.y = max(0, point.y);
point.x = point.x - width / 2;
point.y = point.y;

SetWindowPos(windowToCenter, HWND_TOPMOST, point.x, point.y, 0, 0, SWP_NOSIZE);

Expand Down

0 comments on commit 5ac8268

Please sign in to comment.