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:
authorM.G. Kishalmi <lmg@kishalmi.net>2011-05-09 16:46:59 +0400
committerM.G. Kishalmi <lmg@kishalmi.net>2011-05-09 16:46:59 +0400
commit88a13d73958c050bde4364b115faddfe26b0d47c (patch)
tree80310959e9da45f99a65508f56ae68eca574f551 /intern/ghost/intern/GHOST_SystemX11.cpp
parent99ee18c684da65ba774175c0b57a086e8222464a (diff)
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.
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemX11.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 378bc6b90be..b44f2b18225 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -700,19 +700,24 @@ GHOST_SystemX11::processEvent(XEvent *xe)
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: