Mercurial > mplayer.hg
comparison libvo/w32_common.c @ 11542:85e503ddf65f
runtime 'stay-on-top' functionality
author | joey |
---|---|
date | Sun, 30 Nov 2003 16:36:10 +0000 |
parents | 5d76d070b44b |
children | 494a93a19242 |
comparison
equal
deleted
inserted
replaced
11541:753ca0c44913 | 11542:85e503ddf65f |
---|---|
144 vo_dwidth = o_dwidth; | 144 vo_dwidth = o_dwidth; |
145 vo_dheight = o_dheight; | 145 vo_dheight = o_dheight; |
146 } | 146 } |
147 | 147 |
148 int createRenderingContext(void) { | 148 int createRenderingContext(void) { |
149 HWND layer = HWND_NOTOPMOST; | |
149 if (wglContext) return 1; | 150 if (wglContext) return 1; |
150 | 151 |
152 if (vo_fs || vo_ontop) layer = HWND_TOPMOST; | |
151 if (vo_fs) { | 153 if (vo_fs) { |
152 changeMode(); | 154 changeMode(); |
153 SetWindowPos(vo_hwnd, HWND_TOPMOST, 0, 0, vo_screenwidth, vo_screenheight, SWP_SHOWWINDOW); | 155 SetWindowPos(vo_hwnd, layer, 0, 0, vo_screenwidth, vo_screenheight, SWP_SHOWWINDOW); |
154 if (cursor) { | 156 if (cursor) { |
155 ShowCursor(0); | 157 ShowCursor(0); |
156 cursor = 0; | 158 cursor = 0; |
157 } | 159 } |
158 } else { | 160 } else { |
159 resetMode(); | 161 resetMode(); |
160 SetWindowPos(vo_hwnd, HWND_NOTOPMOST, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); | 162 SetWindowPos(vo_hwnd, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); |
161 if (!cursor) { | 163 if (!cursor) { |
162 ShowCursor(1); | 164 ShowCursor(1); |
163 cursor = 1; | 165 cursor = 1; |
164 } | 166 } |
165 } | 167 } |
254 | 256 |
255 destroyRenderingContext(); | 257 destroyRenderingContext(); |
256 createRenderingContext(); | 258 createRenderingContext(); |
257 } | 259 } |
258 | 260 |
261 void vo_w32_ontop( void ) | |
262 { | |
263 vo_ontop = !vo_ontop; | |
264 if (!vo_fs) { | |
265 HWND layer = HWND_NOTOPMOST; | |
266 if (vo_ontop) layer = HWND_TOPMOST; | |
267 SetWindowPos(vo_hwnd, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); | |
268 } | |
269 } | |
270 | |
259 void vo_w32_uninit() { | 271 void vo_w32_uninit() { |
260 mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n"); | 272 mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n"); |
261 resetMode(); | 273 resetMode(); |
262 ShowCursor(1); | 274 ShowCursor(1); |
263 vo_depthonscreen = 0; | 275 vo_depthonscreen = 0; |