/*****************************************************************************
* vlcshell.cpp: a VLC plugin for Mozilla
*****************************************************************************
- * Copyright (C) 2002-2005 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
#include <npapi.h>
/* This is from mozilla java, do we really need it? */
-#if 0
+#if 0
#include <jri.h>
#endif
******************************************************************************/
#ifdef XP_UNIX
# define VOUT_PLUGINS "xvideo,x11,dummy"
-# define AOUT_PLUGINS "oss,dummy"
+# define AOUT_PLUGINS "alsa,oss,dummy"
+
+static unsigned int i_previous_height = 100000;
+static unsigned int i_previous_width = 100000;
static void Redraw( Widget w, XtPointer closure, XEvent *event );
static void Resize( Widget w, XtPointer closure, XEvent *event );
XResizeWindow( p_plugin->p_display, p_plugin->window,
p_plugin->i_width, p_plugin->i_height );
Widget w = XtWindowToWidget( p_plugin->p_display, p_plugin->window );
+
XtAddEventHandler( w, ExposureMask, FALSE,
(XtEventHandler)Redraw, p_plugin );
XtAddEventHandler( w, StructureNotifyMask, FALSE,
}
#endif /* X11_RESIZE_DEBUG */
+ if( p_plugin->i_height == i_previous_height &&
+ p_plugin->i_width == i_previous_width )
+ {
+ return;
+ }
+ i_previous_height = p_plugin->i_height;
+ i_previous_width = p_plugin->i_width;
+
+
i_ret = XResizeWindow( p_plugin->p_display, p_plugin->window,
p_plugin->i_width, p_plugin->i_height );