[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36573] trunk/blender/intern/ghost/intern/ GHOST_SystemX11.cpp: fixed scrolling lists with the mousewheel for some X11 windowmanagers.
M.G. Kishalmi
lmg at kishalmi.net
Mon May 9 14:47:00 CEST 2011
Revision: 36573
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36573
Author: lmg
Date: 2011-05-09 12:46:59 +0000 (Mon, 09 May 2011)
Log Message:
-----------
fixed scrolling lists with the mousewheel for some X11 windowmanagers.
some WMs not only send 'crossing' events when really moving from one
window to another, but also when mousewheeling.
distinguishing those events 'mode' property fixed this.
brecht++ for figuring out the details.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp 2011-05-09 11:02:04 UTC (rev 36572)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp 2011-05-09 12:46:59 UTC (rev 36573)
@@ -700,19 +700,24 @@
case EnterNotify:
case LeaveNotify:
{
- // XCrossingEvents pointer leave enter window.
- // also do cursor move here, MotionNotify only
- // happens when motion starts & ends inside window
+ /* XCrossingEvents pointer leave enter window.
+ also do cursor move here, MotionNotify only
+ happens when motion starts & ends inside window.
+ we only do moves when the crossing mode is 'normal'
+ (really crossing between windows) since some windowmanagers
+ also send grab/ungrab crossings for mousewheel events.
+ */
XCrossingEvent &xce = xe->xcrossing;
-
- g_event = new
- GHOST_EventCursor(
- getMilliSeconds(),
- GHOST_kEventCursorMove,
- window,
- xce.x_root,
- xce.y_root
- );
+ if( xce.mode == NotifyNormal ) {
+ g_event = new
+ GHOST_EventCursor(
+ getMilliSeconds(),
+ GHOST_kEventCursorMove,
+ window,
+ xce.x_root,
+ xce.y_root
+ );
+ }
break;
}
case MapNotify:
More information about the Bf-blender-cvs
mailing list