summaryrefslogtreecommitdiffstats
path: root/libvo/w32_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r--libvo/w32_common.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index a6d770149a..2a46ee1206 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -146,18 +146,20 @@ static void resetMode(void) {
}
int createRenderingContext(void) {
+ HWND layer = HWND_NOTOPMOST;
if (wglContext) return 1;
+ if (vo_fs || vo_ontop) layer = HWND_TOPMOST;
if (vo_fs) {
changeMode();
- SetWindowPos(vo_hwnd, HWND_TOPMOST, 0, 0, vo_screenwidth, vo_screenheight, SWP_SHOWWINDOW);
+ SetWindowPos(vo_hwnd, layer, 0, 0, vo_screenwidth, vo_screenheight, SWP_SHOWWINDOW);
if (cursor) {
ShowCursor(0);
cursor = 0;
}
} else {
resetMode();
- SetWindowPos(vo_hwnd, HWND_NOTOPMOST, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW);
+ SetWindowPos(vo_hwnd, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW);
if (!cursor) {
ShowCursor(1);
cursor = 1;
@@ -256,6 +258,16 @@ void vo_w32_fullscreen(void) {
createRenderingContext();
}
+void vo_w32_ontop( void )
+{
+ vo_ontop = !vo_ontop;
+ if (!vo_fs) {
+ HWND layer = HWND_NOTOPMOST;
+ if (vo_ontop) layer = HWND_TOPMOST;
+ SetWindowPos(vo_hwnd, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW);
+ }
+}
+
void vo_w32_uninit() {
mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n");
resetMode();