summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/win32/gstglwindow_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/gl/win32/gstglwindow_win32.c')
-rw-r--r--gst-libs/gst/gl/win32/gstglwindow_win32.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c
index 29d97f23e..a2ed3e677 100644
--- a/gst-libs/gst/gl/win32/gstglwindow_win32.c
+++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c
@@ -409,15 +409,16 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (uMsg) {
case WM_SIZE:
- {
- if (window->resize) {
- window->resize (window->resize_data, LOWORD (lParam),
- HIWORD (lParam));
- }
+ gst_gl_window_resize (window, LOWORD (lParam), HIWORD (lParam));
break;
- }
case WM_PAINT:
{
+ if (window->queue_resize) {
+ guint width, height;
+
+ gst_gl_window_get_surface_dimensions (window, &width, &height);
+ gst_gl_window_resize (window, width, height);
+ }
if (window->draw) {
PAINTSTRUCT ps;
BeginPaint (hWnd, &ps);
@@ -440,6 +441,12 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CAPTURECHANGED:
{
GST_DEBUG ("WM_CAPTURECHANGED");
+ if (window->queue_resize) {
+ guint width, height;
+
+ gst_gl_window_get_surface_dimensions (window, &width, &height);
+ gst_gl_window_resize (window, width, height);
+ }
if (window->draw)
window->draw (window->draw_data);
break;