Unified · Split
| @@ -2,8 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | -- if it's brought back again. If the player was already paused when minimizing, |
| 3 | 3 | -- then try not to mess with the pause state. |
| 4 | 4 | |
| 5 | −-- Note: currently works with X11 or OS X only. | |
| 6 | − | |
| 7 | 5 | local did_minimize = false |
| 8 | 6 | |
| 9 | 7 | mp.observe_property("window-minimized", "bool", function(name, value) |
| @@ -603,6 +603,9 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, · 602 unmodified lines | ||
| 603 | 603 | signal_events(w32, VO_EVENT_RESIZE); |
| 604 | 604 | MP_VERBOSE(w32, "resize window: %d:%d\n", w32->dw, w32->dh); |
| 605 | 605 | } |
| 606 | + | |
| 607 | + // Window may have been minimized or restored | |
| 608 | + signal_events(w32, VO_EVENT_WIN_STATE); | |
| 606 | 609 | break; |
| 607 | 610 | } |
| 608 | 611 | case WM_SIZING: |
| @@ -1256,6 +1259,9 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) · 647 unmodified lines | ||
| 1256 | 1259 | reinit_window_state(w32); |
| 1257 | 1260 | return VO_TRUE; |
| 1258 | 1261 | } |
| 1262 | + case VOCTRL_GET_WIN_STATE: | |
| 1263 | + *(int *)arg = IsIconic(w32->window) ? VO_WIN_STATE_MINIMIZED : 0; | |
| 1264 | + return VO_TRUE; | |
| 1259 | 1265 | case VOCTRL_SET_CURSOR_VISIBILITY: |
| 1260 | 1266 | w32->cursor_visible = *(bool *)arg; |
| 1261 | 1267 | |