This commit is contained in:
akwizgran
2017-11-16 10:29:18 +00:00
committed by Torsten Grote
parent 27328afe3c
commit 5fa6b0ca1c
109 changed files with 2087 additions and 3450 deletions

View File

@@ -113,17 +113,13 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
final User32 user32 = (User32) Native.loadLibrary("user32",
User32.class, options);
// Create a callback to handle the WM_QUERYENDSESSION message
WindowProc proc = new WindowProc() {
@Override
public LRESULT callback(HWND hwnd, int msg, WPARAM wp,
LPARAM lp) {
if (msg == WM_QUERYENDSESSION) {
// It's safe to delay returning from this message
runShutdownHooks();
}
// Pass the message to the default window procedure
return user32.DefWindowProc(hwnd, msg, wp, lp);
WindowProc proc = (hwnd, msg, wp, lp) -> {
if (msg == WM_QUERYENDSESSION) {
// It's safe to delay returning from this message
runShutdownHooks();
}
// Pass the message to the default window procedure
return user32.DefWindowProc(hwnd, msg, wp, lp);
};
// Create a native window
HWND hwnd = user32.CreateWindowEx(0, "STATIC", "", WS_MINIMIZE,