* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.21 2003/06/24 22:26:01 asmax Exp $
+ * $Id: xcommon.c,v 1.22 2003/07/16 15:25:32 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
while( XCheckWindowEvent( p_vout->p_sys->p_display,
p_vout->p_sys->p_win->base_window,
- StructureNotifyMask | KeyPressMask |
+ StructureNotifyMask, &xevent ) == True
+ || XCheckWindowEvent( p_vout->p_sys->p_display,
+ p_vout->p_sys->p_win->video_window,
+ KeyPressMask | PointerMotionMask |
ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask | Button1MotionMask , &xevent )
- == True )
+ Button1MotionMask, &xevent ) == True )
{
/* ConfigureNotify event: prepare */
if( xevent.type == ConfigureNotify )
&dummy2, &dummy3 );
}
+ /* We cannot put ButtonPressMask in the list, because according to
+ * the XSelectInput manpage, only one client at a time can select a
+ * ButtonPress event. Programs such as Mozilla may be already selecting
+ * this event. */
XSelectInput( p_vout->p_sys->p_display, p_win->base_window,
- StructureNotifyMask | KeyPressMask |
- ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask );
+ StructureNotifyMask );
#ifdef MODULE_NAME_IS_x11
if( p_win->b_owned &&
XMapWindow( p_vout->p_sys->p_display, p_win->video_window );
XSelectInput( p_vout->p_sys->p_display, p_win->video_window,
- ExposureMask );
+ ExposureMask | KeyPressMask | ButtonPressMask |
+ ButtonReleaseMask | PointerMotionMask );
/* make sure the video window will be centered in the next ManageVideo() */
p_vout->i_changes |= VOUT_SIZE_CHANGE;