2.5
authorTon Roosendaal <ton@blender.org>
Tue, 21 Jul 2009 12:19:46 +0000 (12:19 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 21 Jul 2009 12:19:46 +0000 (12:19 +0000)
Overlooked WM event.val usage without checking proper #defines.
My previous commit made all input not work on any modifier key press.

source/blender/windowmanager/intern/wm_event_system.c

index 0df0679f98bc2e6d07fe916a7e79f5463c8515cc..5377e351ff05b6050e60ced84f5e9ec60c70e04c 100644 (file)
@@ -1472,23 +1472,23 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
                        
                        /* modifiers */
                        if (event.type==LEFTSHIFTKEY || event.type==RIGHTSHIFTKEY) {
-                               event.shift= evt->shift= event.val;
-                               if(event.val && (evt->ctrl || evt->alt || evt->oskey))
+                               event.shift= evt->shift= (event.val==KM_PRESS);
+                               if(event.val==KM_PRESS && (evt->ctrl || evt->alt || evt->oskey))
                                   event.shift= evt->shift = 3;         // define?
                        } 
                        else if (event.type==LEFTCTRLKEY || event.type==RIGHTCTRLKEY) {
-                               event.ctrl= evt->ctrl= event.val;
-                               if(event.val && (evt->shift || evt->alt || evt->oskey))
+                               event.ctrl= evt->ctrl= (event.val==KM_PRESS);
+                               if(event.val==KM_PRESS && (evt->shift || evt->alt || evt->oskey))
                                   event.ctrl= evt->ctrl = 3;           // define?
                        } 
                        else if (event.type==LEFTALTKEY || event.type==RIGHTALTKEY) {
-                               event.alt= evt->alt= event.val;
-                               if(event.val && (evt->ctrl || evt->shift || evt->oskey))
+                               event.alt= evt->alt= (event.val==KM_PRESS);
+                               if(event.val==KM_PRESS && (evt->ctrl || evt->shift || evt->oskey))
                                   event.alt= evt->alt = 3;             // define?
                        } 
                        else if (event.type==COMMANDKEY) {
-                               event.oskey= evt->oskey= event.val;
-                               if(event.val && (evt->ctrl || evt->alt || evt->shift))
+                               event.oskey= evt->oskey= (event.val==KM_PRESS);
+                               if(event.val==KM_PRESS && (evt->ctrl || evt->alt || evt->shift))
                                   event.oskey= evt->oskey = 3;         // define?
                        }