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
2-- if it's brought back again. If the player was already paused when minimizing,2-- if it's brought back again. If the player was already paused when minimizing,
3-- then try not to mess with the pause state.3-- then try not to mess with the pause state.
4 4
5-- Note: currently works with X11 or OS X only.
6
7local did_minimize = false5local did_minimize = false
8 6
9mp.observe_property("window-minimized", "bool", function(name, value)7mp.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
603 signal_events(w32, VO_EVENT_RESIZE);603 signal_events(w32, VO_EVENT_RESIZE);
604 MP_VERBOSE(w32, "resize window: %d:%d\n", w32->dw, w32->dh);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 break;609 break;
607 }610 }
608 case WM_SIZING: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 reinit_window_state(w32);1259 reinit_window_state(w32);
1257 return VO_TRUE;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 case VOCTRL_SET_CURSOR_VISIBILITY:1265 case VOCTRL_SET_CURSOR_VISIBILITY:
1260 w32->cursor_visible = *(bool *)arg;1266 w32->cursor_visible = *(bool *)arg;
1261 1267

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