Skip to content

Commit fe52c61

Browse files
committed
Fix #132
1 parent 7b92690 commit fe52c61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

FluentWPF/AcrylicWindow.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ protected static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lPar
364364
var monitorRectangle = monitorInfo.rcMonitor;
365365

366366
var win = (Window)HwndSource.FromHwnd(hwnd).RootVisual;
367-
var maxWidth = Math.Min(Math.Abs(workingRectangle.right - monitorRectangle.left), (int)win.MaxWidth);
368-
var maxHeight = Math.Min(Math.Abs(workingRectangle.bottom - monitorRectangle.top), (int)win.MaxHeight);
367+
var maxWidth = (int)Math.Min(Math.Abs(workingRectangle.right - monitorRectangle.left), win.MaxWidth);
368+
var maxHeight = (int)Math.Min(Math.Abs(workingRectangle.bottom - monitorRectangle.top), win.MaxHeight);
369369

370370
info.ptMaxPosition.x = Math.Abs(workingRectangle.left - monitorRectangle.left);
371371
info.ptMaxPosition.y = Math.Abs(workingRectangle.top - monitorRectangle.top);
@@ -416,8 +416,8 @@ protected static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lPar
416416
pos.y = cur.y - 8;
417417
}
418418

419-
var maxWidth = Math.Min(pos.cx, (int)win.MaxWidth);
420-
var maxHeight = Math.Min(pos.cy, (int)win.MaxHeight);
419+
var maxWidth = (int)Math.Min(pos.cx, win.MaxWidth);
420+
var maxHeight = (int)Math.Min(pos.cy, win.MaxHeight);
421421
pos.cx = maxWidth;
422422
pos.cy = maxHeight;
423423

0 commit comments

Comments
 (0)