fixed minor bug and made a minor adjustment

This commit is contained in:
joten 2016-04-12 21:16:11 +02:00
parent 644be98ca9
commit 4edfce7450

View file

@ -145,10 +145,10 @@ Window_hide(wndId) {
} }
Window_isChild(wndId) { Window_isChild(wndId) {
WS_POPUP = 0x40000000 WS_CHILD = 0x40000000
WinGet, wndStyle, Style, ahk_id %wndId% WinGet, wndStyle, Style, ahk_id %wndId%
Return, wndStyle & WS_POPUP Return, wndStyle & WS_CHILD
} }
Window_isElevated(wndId) { Window_isElevated(wndId) {
@ -265,7 +265,7 @@ Window_move(wndId, x, y, width, height) {
} Else { } Else {
WinMove, ahk_id %wndId%, , %x%, %y%, %width%, %height% WinMove, ahk_id %wndId%, , %x%, %y%, %width%, %height%
If Not (wndMinMax = 1) Or Not Window_#%wndId%_isDecorated Or Manager_windowNotMaximized(width, height) { ;If Not (wndMinMax = 1) Or Not Window_#%wndId%_isDecorated Or Manager_windowNotMaximized(width, height) {
If Window_getPosEx(wndId, wndX, wndY, wndW, wndH) And (Abs(wndX - x) > 1 Or Abs(wndY - y) > 1 Or Abs(wndW - width) > 1 Or Abs(wndH - height) > 1) { If Window_getPosEx(wndId, wndX, wndY, wndW, wndH) And (Abs(wndX - x) > 1 Or Abs(wndY - y) > 1 Or Abs(wndW - width) > 1 Or Abs(wndH - height) > 1) {
x -= wndX - x x -= wndX - x
y -= wndY - y y -= wndY - y
@ -273,7 +273,7 @@ Window_move(wndId, x, y, width, height) {
height += height - wndH - 1 height += height - wndH - 1
WinMove, ahk_id %wndId%, , %x%, %y%, %width%, %height% WinMove, ahk_id %wndId%, , %x%, %y%, %width%, %height%
} }
} ;}
SendMessage, WM_EXITSIZEMOVE, , , , ahk_id %wndId% SendMessage, WM_EXITSIZEMOVE, , , , ahk_id %wndId%
Return, 0 Return, 0