Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
[Desktop] fix OnMonitorChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSt committed Jun 2, 2016
1 parent ee1a4a2 commit ea09f03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/SharpDX.Desktop/RenderForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class RenderForm : Form
private const uint PBT_APMQUERYSUSPEND = 0;
private const int SC_MONITORPOWER = 0xF170;
private const int SC_SCREENSAVE = 0xF140;
private const int WM_DISPLAYCHANGE = 0x007E;
private const int MNC_CLOSE = 1;
private System.Drawing.Size cachedSize;
private FormWindowState previousWindowState;
Expand Down Expand Up @@ -435,6 +436,9 @@ protected override void WndProc(ref Message m)
}
}
break;
case WM_DISPLAYCHANGE:
OnMonitorChanged(EventArgs.Empty);
break;
}

base.WndProc(ref m);
Expand Down

0 comments on commit ea09f03

Please sign in to comment.