Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
c6a16524
Commit
c6a16524
authored
Oct 01, 2002
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx/events.c: added an "Always on top" entry
in the system menu.
parent
9a6b90b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+35
-3
modules/video_output/directx/vout.h
modules/video_output/directx/vout.h
+2
-1
No files found.
modules/video_output/directx/events.c
View file @
c6a16524
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
* events.c: Windows DirectX video output events handler
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.
1 2002/08/04 17:23:43 sam
Exp $
* $Id: events.c,v 1.
2 2002/10/01 20:43:35 ipkiss
Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -244,6 +244,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
...
@@ -244,6 +244,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
RECT
rect_window
;
RECT
rect_window
;
COLORREF
colorkey
;
COLORREF
colorkey
;
HDC
hdc
;
HDC
hdc
;
HMENU
hMenu
;
HICON
vlc_icon
=
NULL
;
HICON
vlc_icon
=
NULL
;
char
vlc_path
[
_MAX_PATH
+
1
];
char
vlc_path
[
_MAX_PATH
+
1
];
...
@@ -366,6 +367,11 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
...
@@ -366,6 +367,11 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
* We need to use SetWindowLongPtr when it is available in mingw */
* We need to use SetWindowLongPtr when it is available in mingw */
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_USERDATA
,
(
LONG
)
p_vout
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_USERDATA
,
(
LONG
)
p_vout
);
/* append a "Always On Top" entry in the system menu */
hMenu
=
GetSystemMenu
(
p_vout
->
p_sys
->
hwnd
,
FALSE
);
AppendMenu
(
hMenu
,
MF_SEPARATOR
,
0
,
""
);
AppendMenu
(
hMenu
,
MF_STRING
|
MF_UNCHECKED
,
IDM_TOGGLE_ON_TOP
,
"Always on &Top"
);
/* now display the window */
/* now display the window */
ShowWindow
(
p_vout
->
p_sys
->
hwnd
,
SW_SHOW
);
ShowWindow
(
p_vout
->
p_sys
->
hwnd
,
SW_SHOW
);
...
@@ -547,6 +553,32 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
...
@@ -547,6 +553,32 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
case
SC_MONITORPOWER
:
/* catch the monitor turn-off */
case
SC_MONITORPOWER
:
/* catch the monitor turn-off */
msg_Dbg
(
p_vout
,
"WinProc WM_SYSCOMMAND"
);
msg_Dbg
(
p_vout
,
"WinProc WM_SYSCOMMAND"
);
return
0
;
/* this stops them from happening */
return
0
;
/* this stops them from happening */
case
IDM_TOGGLE_ON_TOP
:
/* toggle the "on top" status */
{
HMENU
hMenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
msg_Dbg
(
p_vout
,
"WinProc WM_SYSCOMMAND: IDM_TOGGLE_ON_TOP"
);
// Check if the window is already on top
if
(
GetWindowLong
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_TOPMOST
)
{
CheckMenuItem
(
hMenu
,
IDM_TOGGLE_ON_TOP
,
MF_BYCOMMAND
|
MFS_UNCHECKED
);
SetWindowPos
(
hwnd
,
HWND_NOTOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
);
}
else
{
CheckMenuItem
(
hMenu
,
IDM_TOGGLE_ON_TOP
,
MF_BYCOMMAND
|
MFS_CHECKED
);
SetWindowPos
(
hwnd
,
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
);
}
return
0
;
break
;
}
}
}
break
;
break
;
...
...
modules/video_output/directx/vout.h
View file @
c6a16524
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vout.h: Windows DirectX video output header file
* vout.h: Windows DirectX video output header file
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout.h,v 1.
1 2002/08/04 17:23:43 sam
Exp $
* $Id: vout.h,v 1.
2 2002/10/01 20:43:35 ipkiss
Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -110,3 +110,4 @@ void DirectXUpdateOverlay( vout_thread_t *p_vout );
...
@@ -110,3 +110,4 @@ void DirectXUpdateOverlay( vout_thread_t *p_vout );
* Constants
* Constants
*****************************************************************************/
*****************************************************************************/
#define WM_VLC_HIDE_MOUSE WM_APP
#define WM_VLC_HIDE_MOUSE WM_APP
#define IDM_TOGGLE_ON_TOP WM_USER + 1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment