Skip to content

Commit

Permalink
this was too much, re-handle the WM_NCPAINT message (for better paint…
Browse files Browse the repository at this point in the history
…ing)
  • Loading branch information
punker76 committed Mar 1, 2015
1 parent ada352b commit 5ae97f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MahApps.Metro/Behaviours/BorderlessWindowBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, re
var returnval = IntPtr.Zero;

switch (msg) {
case Constants.WM_NCPAINT:
handled = true;
break;
case Constants.WM_NCACTIVATE:
/* As per http://msdn.microsoft.com/en-us/library/ms632633(VS.85).aspx , "-1" lParam "does not repaint the nonclient area to reflect the state change." */
returnval = UnsafeNativeMethods.DefWindowProc(hwnd, msg, wParam, new IntPtr(-1));
Expand Down

0 comments on commit 5ae97f9

Please sign in to comment.