]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins2: ignore WM_PAINT events on the vout window
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 14 Nov 2004 17:29:39 +0000 (17:29 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 14 Nov 2004 17:29:39 +0000 (17:29 +0000)
   This gives better results when moving the window, but resizing is still
   flickering

modules/gui/skins2/src/generic_window.hpp
modules/gui/skins2/src/vout_window.hpp
modules/gui/skins2/win32/win32_loop.cpp

index 7276ce221a20768533c9e12c42c432a4ed653b92..6dabdb7d9ce9202b90f237bcd86c0b4357d6a8a0 100644 (file)
@@ -76,6 +76,9 @@ class GenericWindow: public SkinObject, public Observer<VarBool>
         /// Give access to the visibility variable
         VarBool &getVisibleVar() { return m_varVisible; }
 
+        /// Window type, mainly useful when overloaded (for VoutWindow)
+        virtual string getType() const { return "Generic"; }
+
     protected:
         /// Get the OS window
         OSWindow *getOSWindow() const { return m_pOsWindow; }
index c1da91a63d4e2713e652fce269d6d3442d3b4fc3..7e752ed4f11c32b85e5a4a8b6312f1b9c68ba6b4 100644 (file)
@@ -56,6 +56,8 @@ class VoutWindow: public GenericWindow
         /// Refresh an area of the window
         virtual void refresh( int left, int top, int width, int height );
 
+        virtual string getType() const { return "Vout"; }
+
     private:
         /// Image when there is no video
         OSGraphics *m_pImage;
index 4b50fd07b07e20d376fdeff67a6508183d42eec8..229c1968bcb0c84b0cb1d0d6f2896b82f6e84963 100755 (executable)
@@ -129,7 +129,12 @@ void Win32Loop::run()
                                 Infos.rcPaint.right - Infos.rcPaint.left + 1,
                                 Infos.rcPaint.bottom - Infos.rcPaint.top + 1 );
                 EndPaint( msg.hwnd, &Infos );
-                win.processEvent( evt );
+                // Ignore all the painting events for the vout window,
+                // otherwise we are going to screw up the colorkey
+                if( win.getType() != "Vout" )
+                {
+                    win.processEvent( evt );
+                }
                 break;
             }
             case WM_MOUSEMOVE: