History

w32_common: support the "window-minimized" property

James Ross-Gowan committed 11 years ago

Commit a26ea501 parent 3efbc1a2 files · +6 −2Browse files

Unified · Split

2 files
  1. TOOLS/lua/pause-when-minimize.lua +0 −2
  2. video/out/w32_common.c +6 −0
TOOLS/lua/pause-when-minimize.lua+0−2
@@ -2,8 +2,6 @@ · 1 unmodified line
22 -- if it's brought back again. If the player was already paused when minimizing,
33 -- then try not to mess with the pause state.
44
5−-- Note: currently works with X11 or OS X only.
6−
75 local did_minimize = false
86
97 mp.observe_property("window-minimized", "bool", function(name, value)
video/out/w32_common.c+6−0
@@ -603,6 +603,9 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, · 602 unmodified lines
603603 signal_events(w32, VO_EVENT_RESIZE);
604604 MP_VERBOSE(w32, "resize window: %d:%d\n", w32->dw, w32->dh);
605605 }
606+
607+ // Window may have been minimized or restored
608+ signal_events(w32, VO_EVENT_WIN_STATE);
606609 break;
607610 }
608611 case WM_SIZING:
@@ -1256,6 +1259,9 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) · 647 unmodified lines
12561259 reinit_window_state(w32);
12571260 return VO_TRUE;
12581261 }
1262+ case VOCTRL_GET_WIN_STATE:
1263+ *(int *)arg = IsIconic(w32->window) ? VO_WIN_STATE_MINIMIZED : 0;
1264+ return VO_TRUE;
12591265 case VOCTRL_SET_CURSOR_VISIBILITY:
12601266 w32->cursor_visible = *(bool *)arg;
12611267

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t