From 0b03ca9d27df2576fc2026389d3d60abacd3808f Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 28 Aug 2002 15:55:58 +0000 Subject: removed old input code git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7112 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 2 -- libvo/vo_gl2.c | 2 -- libvo/vo_sdl.c | 41 +++-------------------------------------- libvo/vo_xv.c | 2 -- libvo/x11_common.c | 6 ++---- 5 files changed, 5 insertions(+), 48 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index bee1767d45..d202503a09 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -205,9 +205,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask -#ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask -#endif ); // printf("Window setup ok\n"); diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 800dc4a442..31d35345c4 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -709,9 +709,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin //XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!! vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask -#ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask -#endif ); glVersion = glGetString(GL_VERSION); diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 80948b107d..656e7c20f8 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -121,10 +121,8 @@ #include "x11_common.h" #endif -#ifdef HAVE_NEW_INPUT #include "../input/input.h" #include "../input/mouse.h" -#endif LIBVO_EXTERN(sdl) @@ -490,6 +488,9 @@ static int sdl_open (void *plugin, void *name) //} #endif + if (vo_doublebuffering) + priv->sdlflags |= SDL_DOUBLEBUF; + /* Setup Keyrepeats (500/30 are defaults) */ SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 /*SDL_DEFAULT_REPEAT_INTERVAL*/); @@ -1208,50 +1209,14 @@ static void check_events (void) break; case SDL_MOUSEBUTTONDOWN: -#ifdef HAVE_NEW_INPUT if(event.button.button == 4 || event.button.button == 5) mplayer_put_key(MOUSE_BASE+event.button.button-1); else mplayer_put_key((MOUSE_BASE+event.button.button-1) | MP_KEY_DOWN); -#else - switch(event.button.button) { - case 1: modifiers |= 1; break; - case 2: modifiers |= 2; break; - case 3: modifiers |= 4; break; - case 4: /* wheel up */ - if ((modifiers & 1)) - mplayer_put_key(KEY_LEFT); - else if ((modifiers & 2)) - mplayer_put_key('/'); - else if ((modifiers & 4)) - mplayer_put_key(KEY_PAGE_DOWN); - else - mplayer_put_key(KEY_DOWN); - break; - case 5: /* wheel down */ - if ((modifiers & 1)) - mplayer_put_key(KEY_RIGHT); - else if ((modifiers & 2)) - mplayer_put_key('*'); - else if ((modifiers & 4)) - mplayer_put_key(KEY_PAGE_UP); - else - mplayer_put_key(KEY_UP); - break; - } -#endif break; case SDL_MOUSEBUTTONUP: -#ifdef HAVE_NEW_INPUT mplayer_put_key(MOUSE_BASE+event.button.button-1); -#else - switch(event.button.button) { - case 1: modifiers &= ~1; break; - case 2: modifiers &= ~2; break; - case 3: modifiers &= ~4; break; - } -#endif break; /* graphics mode selection shortcuts */ diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 96b2c68579..31e874c67f 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -397,9 +397,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32 vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask | ((WinID==0) ? 0 : (PointerMotionMask -#ifdef HAVE_NEW_INPUT | ButtonPressMask | ButtonReleaseMask -#endif ))); XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); XSetWMNormalHints( mDisplay,vo_window,&hint ); diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 2d9e5438d1..d352974be2 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -32,10 +32,8 @@ #include #endif -#ifdef HAVE_NEW_INPUT #include "../input/input.h" #include "../input/mouse.h" -#endif #ifdef HAVE_NEW_GUI #include "../Gui/interface.h" @@ -366,6 +364,7 @@ int vo_init( void ) vo_wm_type=vo_wm_detect(); + saver_off(mDisplay); return 1; } @@ -532,6 +531,7 @@ XSizeHints vo_hint; void vo_x11_uninit() { + saver_on(mDisplay); if(vo_window!=None) vo_showcursor( mDisplay,vo_window ); #ifdef HAVE_NEW_GUI @@ -624,7 +624,6 @@ int vo_x11_check_events(Display *mydisplay){ case MotionNotify: if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; } break; -#ifdef HAVE_NEW_INPUT case ButtonPress: if ( vo_mouse_autohide ) { vo_showcursor( mydisplay,vo_window ); vo_mouse_counter=vo_mouse_timer_const; } // Ignore mouse whell press event @@ -646,7 +645,6 @@ int vo_x11_check_events(Display *mydisplay){ #endif mplayer_put_key(MOUSE_BTN0+Event.xbutton.button-1); break; -#endif case PropertyNotify: { char * name = XGetAtomName( mydisplay,Event.xproperty.atom ); -- cgit v1.2.3