Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@ public class OS extends C {
public static final int WM_DEADCHAR = 0x103;
public static final int WM_DESTROY = 0x2;
public static final int WM_DPICHANGED = 0x02E0;
public static final int WM_DISPLAYCHANGE = 0x7E;
public static final int WM_DRAWITEM = 0x2b;
public static final int WM_ENDSESSION = 0x16;
public static final int WM_ENTERIDLE = 0x121;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4856,6 +4856,7 @@ long windowProc (long hwnd, int msg, long wParam, long lParam) {
case OS.WM_XBUTTONDOWN: result = WM_XBUTTONDOWN (wParam, lParam); break;
case OS.WM_XBUTTONUP: result = WM_XBUTTONUP (wParam, lParam); break;
case OS.WM_DPICHANGED: result = WM_DPICHANGED (wParam, lParam); break;
case OS.WM_DISPLAYCHANGE: result = WM_DISPLAYCHANGE(wParam, lParam); break;
}
if (result != null) return result.value;
// widget could be disposed at this point
Expand Down Expand Up @@ -4967,6 +4968,14 @@ LRESULT WM_DPICHANGED (long wParam, long lParam) {
return LRESULT.ONE;
}

LRESULT WM_DISPLAYCHANGE (long wParam, long lParam) {
if (getDisplay().isRescalingAtRuntime()) {
Device.win32_destroyUnusedHandles(getDisplay());
return LRESULT.ZERO;
}
return LRESULT.ONE;
}

LRESULT WM_DRAWITEM (long wParam, long lParam) {
DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof);
Expand Down
Loading