File tree 1 file changed +15
-16
lines changed
1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -1092,29 +1092,28 @@ namespace MainWindow
1092
1092
// Note that if there's a screensaver password, this simple method
1093
1093
// doesn't work on Vista or higher.
1094
1094
case WM_SYSCOMMAND:
1095
- {
1096
- // Disable Alt key for menu if "Ignore Windows Key" is on (likely related)
1097
- if (g_Config. bIgnoreWindowsKey && wParam == SC_KEYMENU && (lParam >> 16 ) <= 0 ) {
1095
+ // Disable Alt key for menu if it's been mapped.
1096
+ if (wParam == SC_KEYMENU && (lParam >> 16 ) <= 0 ) {
1097
+ if (KeyMap::IsKeyMapped (DEVICE_ID_KEYBOARD, NKCODE_ALT_LEFT) || KeyMap::IsKeyMapped (DEVICE_ID_KEYBOARD, NKCODE_ALT_RIGHT) ) {
1098
1098
return 0 ;
1099
1099
}
1100
- if (g_keepScreenBright) {
1101
- switch (wParam) {
1102
- case SC_SCREENSAVE:
1100
+ }
1101
+ if (g_keepScreenBright) {
1102
+ switch (wParam) {
1103
+ case SC_SCREENSAVE:
1104
+ return 0 ;
1105
+ case SC_MONITORPOWER:
1106
+ if (lParam == 1 || lParam == 2 ) {
1103
1107
return 0 ;
1104
- case SC_MONITORPOWER:
1105
- if (lParam == 1 || lParam == 2 ) {
1106
- return 0 ;
1107
- } else {
1108
- break ;
1109
- }
1110
- default :
1111
- // fall down to DefWindowProc
1108
+ } else {
1112
1109
break ;
1113
1110
}
1111
+ default :
1112
+ // fall down to DefWindowProc
1113
+ break ;
1114
1114
}
1115
- return DefWindowProc (hWnd, message, wParam, lParam);
1116
1115
}
1117
- break ;
1116
+ return DefWindowProc (hWnd, message, wParam, lParam) ;
1118
1117
case WM_SETTINGCHANGE:
1119
1118
{
1120
1119
if (g_darkModeSupported && IsColorSchemeChangeMessage (lParam))
You can’t perform that action at this time.
0 commit comments