Skip to content

Instantly share code, notes, and snippets.

@mattn
Created December 15, 2011 08:29
Show Gist options
  • Select an option

  • Save mattn/1480371 to your computer and use it in GitHub Desktop.

Select an option

Save mattn/1480371 to your computer and use it in GitHub Desktop.
diff -r 8b8ef1fed009 src/gui_w32.c
--- a/src/gui_w32.c Wed Dec 14 21:17:39 2011 +0100
+++ b/src/gui_w32.c Thu Dec 15 17:29:44 2011 +0900
@@ -798,7 +798,7 @@
if (pt.y < rect.top)
{
show_tabline_popup_menu();
- return 0;
+ return 0L;
}
}
return MyWindowProc(hwnd, uMsg, wParam, lParam);
@@ -827,8 +827,10 @@
return FALSE; /* Do NOT allow system to go down. */
case WM_ENDSESSION:
- if (wParam) /* system only really goes down when wParam is TRUE */
+ if (wParam) { /* system only really goes down when wParam is TRUE */
_OnEndSession();
+ return 0L;
+ }
break;
case WM_CHAR:
@@ -866,7 +868,7 @@
* are received, mouse pointer remains hidden. */
return MyWindowProc(hwnd, uMsg, wParam, lParam);
#else
- return 0;
+ return 0L;
#endif
case WM_SIZING: /* HANDLE_MSG doesn't seem to handle this one */
@@ -874,7 +876,7 @@
case WM_MOUSEWHEEL:
_OnMouseWheel(hwnd, HIWORD(wParam));
- break;
+ return 0L;
/* Notification for change in SystemParametersInfo() */
case WM_SETTINGCHANGE:
@@ -1079,18 +1081,18 @@
case WM_IME_NOTIFY:
if (!_OnImeNotify(hwnd, (DWORD)wParam, (DWORD)lParam))
return MyWindowProc(hwnd, uMsg, wParam, lParam);
- break;
+ return 1L;
case WM_IME_COMPOSITION:
if (!_OnImeComposition(hwnd, wParam, lParam))
return MyWindowProc(hwnd, uMsg, wParam, lParam);
- break;
+ return 1L;
#endif
default:
if (uMsg == msh_msgmousewheel && msh_msgmousewheel != 0)
{ /* handle MSH_MOUSEWHEEL messages for Intellimouse */
_OnMouseWheel(hwnd, HIWORD(wParam));
- break;
+ return 0L;
}
#ifdef MSWIN_FIND_REPLACE
else if (uMsg == s_findrep_msg && s_findrep_msg != 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment