Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
66042f7a
Commit
66042f7a
authored
May 07, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx/*: embedded vout plays nicer with multi-monitor setups.
parent
8987cc14
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+20
-7
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+7
-2
No files found.
modules/video_output/directx/directx.c
View file @
66042f7a
...
@@ -514,26 +514,36 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -514,26 +514,36 @@ static int Manage( vout_thread_t *p_vout )
/* We need to switch between Maximized and Normal sized window */
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
if
(
p_vout
->
b_fullscreen
)
{
{
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
POINT
point
;
/* Retrieve the window position */
point
.
x
=
point
.
y
=
0
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hwnd
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hwnd
);
}
}
/* Maximized window */
/* Maximized window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
/* Change window style, no borders and no title bar */
/* Change window style, no borders and no title bar */
i_style
=
WS_CLIPCHILDREN
;
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_POPUP
;
}
}
else
else
{
{
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
)
{
{
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_CHILD
;
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
|
WS_CHILD
;
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
}
else
else
{
{
...
@@ -542,6 +552,7 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -542,6 +552,7 @@ static int Manage( vout_thread_t *p_vout )
}
}
/* Normal window */
/* Normal window */
GetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
/* Make sure the mouse cursor is displayed */
/* Make sure the mouse cursor is displayed */
...
@@ -551,6 +562,8 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -551,6 +562,8 @@ static int Manage( vout_thread_t *p_vout )
/* Change window style, borders and title bar */
/* Change window style, borders and title bar */
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
i_style
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
i_style
);
SetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
SetWindowPlacement
(
p_vout
->
p_sys
->
hwnd
,
&
window_placement
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
/* Update the object variable and trigger callback */
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
val
.
b_bool
=
p_vout
->
b_fullscreen
;
...
...
modules/video_output/directx/events.c
View file @
66042f7a
...
@@ -893,6 +893,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
...
@@ -893,6 +893,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
{
{
double
f_arg
;
double
f_arg
;
RECT
rect_window
;
RECT
rect_window
;
POINT
point
;
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -921,12 +922,16 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
...
@@ -921,12 +922,16 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
p_vout
->
p_sys
->
hparent
=
0
;
p_vout
->
p_sys
->
hparent
=
0
;
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
/* Retrieve the window position */
point
.
x
=
point
.
y
=
0
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
GetDesktopWindow
()
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
|
WS_VISIBLE
);
WS_SIZEBOX
|
WS_VISIBLE
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
0
,
0
,
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SWP_NO
MOVE
|
SWP_NO
SIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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