[319/906] [win32 backend] fix transmition message to the parent.
authorJulien Isorce <julien.isorce@gmail.com>
Fri, 6 Mar 2009 21:43:41 +0000 (22:43 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:21 +0000 (19:31 +0000)
The Qt mouvexoverlay example shows how to rotate the cube
by moving (+click) the mouve over a qwidget using xoverlay
interface.

gst-libs/gst/gl/gstglwindow_win32.c

index 33dbccf..61dda5a 100644 (file)
@@ -536,7 +536,13 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
         return TRUE;
 
       default:
-        return DefWindowProc (hWnd, uMsg, wParam, lParam);
+        {
+          /* transmit messages to the parrent (ex: mouse/keyboard input) */
+          HWND parent_id = GetProp (hWnd, "gl_window_parent_id");
+          if (parent_id)
+            PostMessage (parent_id, uMsg, wParam, lParam);
+          return DefWindowProc (hWnd, uMsg, wParam, lParam);
+        }
     }
 
     return 0;