Commit 2c90cd6d authored by Cyril Deguet's avatar Cyril Deguet

* mouse wheel scroll for X11 skins

parent 44fb33ab
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_window.cpp: X11 implementation of the Window class * x11_window.cpp: X11 implementation of the Window class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_window.cpp,v 1.7 2003/05/26 02:09:27 gbazin Exp $ * $Id: x11_window.cpp,v 1.8 2003/06/01 17:13:04 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -231,6 +231,20 @@ bool X11Window::ProcessOSEvent( Event *evt ) ...@@ -231,6 +231,20 @@ bool X11Window::ProcessOSEvent( Event *evt )
(int)( (XButtonEvent *)p2 )->y, 2 ); (int)( (XButtonEvent *)p2 )->y, 2 );
break; break;
case 4:
// Scroll up
MouseScroll( (int)( (XButtonEvent *)p2 )->x,
(int)( (XButtonEvent *)p2 )->y,
MOUSE_SCROLL_UP);
break;
case 5:
// Scroll down
MouseScroll( (int)( (XButtonEvent *)p2 )->x,
(int)( (XButtonEvent *)p2 )->y,
MOUSE_SCROLL_DOWN);
break;
default: default:
break; break;
} }
...@@ -248,22 +262,6 @@ bool X11Window::ProcessOSEvent( Event *evt ) ...@@ -248,22 +262,6 @@ bool X11Window::ProcessOSEvent( Event *evt )
case GDK_DROP_START: case GDK_DROP_START:
DropObject->HandleDropStart( ( (GdkEventDND *)p2 )->context ); DropObject->HandleDropStart( ( (GdkEventDND *)p2 )->context );
return true; return true;
case GDK_SCROLL:
switch( ( (GdkEventScroll *)p2 )->direction )
{
case GDK_SCROLL_UP:
MouseScroll( ( (GdkEventScroll *)p2 )->x,
( (GdkEventScroll *)p2 )->y,
MOUSE_SCROLL_UP);
break;
case GDK_SCROLL_DOWN:
MouseScroll( ( (GdkEventScroll *)p2 )->x,
( (GdkEventScroll *)p2 )->y,
MOUSE_SCROLL_DOWN);
break;
}
return true;
*/ */
default: default:
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment