[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20240] trunk/blender/intern/ghost/intern/ GHOST_SystemWin32.cpp: Patch #18758 for bug #17423 by Matt D.
Thomas Dinges
dingto at gmx.de
Sun May 17 17:09:04 CEST 2009
Revision: 20240
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20240
Author: dingto
Date: 2009-05-17 17:09:03 +0200 (Sun, 17 May 2009)
Log Message:
-----------
Patch #18758 for bug #17423 by Matt D. (foom) Thanks!
"Mouse wheel zoom lost after rendering."
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp 2009-05-17 12:51:51 UTC (rev 20239)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemWin32.cpp 2009-05-17 15:09:03 UTC (rev 20240)
@@ -41,7 +41,7 @@
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#include "GHOST_SystemWin32.h"
-
+//#include <stdio.h> //for printf()
// win64 doesn't define GWL_USERDATA
#ifdef WIN32
#ifndef GWL_USERDATA
@@ -747,6 +747,9 @@
* the message is sent asynchronously, so the window is activated immediately.
*/
event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window);
+ /* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL
+ will not be dispatched to OUR active window if we minimize one of OUR windows. */
+ lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
break;
case WM_PAINT:
/* An application sends the WM_PAINT message when the system or another application
@@ -766,6 +769,7 @@
* message without calling DefWindowProc.
*/
event = processWindowEvent(GHOST_kEventWindowSize, window);
+ break;
case WM_CAPTURECHANGED:
window->lostMouseCapture();
break;
@@ -904,7 +908,8 @@
if (event) {
system->pushEvent(event);
- lResult = 0;
+ if(!lResult) //WM_ACTIVATE might have returned something.
+ lResult = 0;
}
else {
lResult = ::DefWindowProc(hwnd, msg, wParam, lParam);
More information about the Bf-blender-cvs
mailing list