Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2004-03-30 12:54:02 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2004-03-30 12:54:02 +0400
commit514edaa6bba32e167c1deb64f9b818d94110bf77 (patch)
tree43a2e21109ac3c529ae098bd7870cea2b35f9238 /source/blender/src/ghostwinlay.c
parentc2a691a94eed48bd310c110a96729eb8aeb5bf25 (diff)
Fixes bug #948 (http://projects.blender.org/tracker/index.php?func=detail&aid=948&group_id=9&atid=125)
Fixed Blender crashing on f3 with tooltip showing and renderwin active. Searching for the source of this problem it became apparent that on win32 the UI kept being responsive to mousemovement events, even with Blender not being the active application. This commit fixes this too.
Diffstat (limited to 'source/blender/src/ghostwinlay.c')
-rw-r--r--source/blender/src/ghostwinlay.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c
index df0ad959653..b6a7c8ba354 100644
--- a/source/blender/src/ghostwinlay.c
+++ b/source/blender/src/ghostwinlay.c
@@ -368,16 +368,17 @@ static int event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
switch (type) {
case GHOST_kEventCursorMove: {
- GHOST_TEventCursorData *cd= data;
- int cx, cy;
-
- GHOST_ScreenToClient(win->ghostwin, cd->x, cd->y, &cx, &cy);
- win->lmouse[0]= cx;
- win->lmouse[1]= (win->size[1]-1) - cy;
-
- window_handle(win, MOUSEX, win->lmouse[0]);
- window_handle(win, MOUSEY, win->lmouse[1]);
-
+ if(win->active == 1) {
+ GHOST_TEventCursorData *cd= data;
+ int cx, cy;
+
+ GHOST_ScreenToClient(win->ghostwin, cd->x, cd->y, &cx, &cy);
+ win->lmouse[0]= cx;
+ win->lmouse[1]= (win->size[1]-1) - cy;
+
+ window_handle(win, MOUSEX, win->lmouse[0]);
+ window_handle(win, MOUSEY, win->lmouse[1]);
+ }
break;
}
case GHOST_kEventButtonDown: