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
10e55a24
Commit
10e55a24
authored
Apr 15, 2007
by
Filippo Carone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly implement VOUT_REPARENT in windows
parent
9f3d094c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+25
-13
No files found.
modules/video_output/directx/events.c
View file @
10e55a24
...
...
@@ -968,35 +968,47 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
case
VOUT_CLOSE
:
ShowWindow
(
p_vout
->
p_sys
->
hwnd
,
SW_HIDE
);
case
VOUT_REPARENT
:
/* Change window style, borders and title bar */
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
p_vout
->
p_sys
->
hparent
=
0
;
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
/* Retrieve the window position */
point
.
x
=
point
.
y
=
0
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
int
d
=
0
;
HWND
d
=
0
;
if
(
i_query
==
VOUT_REPARENT
)
d
=
va_arg
(
args
,
int
);
if
(
i_query
==
VOUT_REPARENT
)
d
=
(
HWND
)
va_arg
(
args
,
int
);
if
(
!
d
)
{
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
p_vout
->
p_sys
->
hparent
=
0
;
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
0
);
p_vout
->
p_sys
->
i_window_style
=
WS_CLIPCHILDREN
|
WS_OVERLAPPEDWINDOW
|
WS_SIZEBOX
;
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
|
(
i_query
==
VOUT_CLOSE
?
0
:
WS_VISIBLE
)
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_EXSTYLE
,
WS_EX_APPWINDOW
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
else
{
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
p_vout
->
p_sys
->
hparent
=
d
;
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
lock
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
d
);
p_vout
->
p_sys
->
i_window_style
=
WS_CLIPCHILDREN
;
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
|
(
i_query
==
VOUT_CLOSE
?
0
:
WS_VISIBLE
)
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_EXSTYLE
,
WS_EX_APPWINDOW
);
/* Retrieve the parent size */
RECT
rect
;
GetClientRect
(
d
,
&
rect
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
d
,
point
.
x
,
point
.
y
,
rect
.
right
,
rect
.
bottom
,
SWP_FRAMECHANGED
);
}
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
|
(
i_query
==
VOUT_CLOSE
?
0
:
WS_VISIBLE
)
);
SetWindowLong
(
p_vout
->
p_sys
->
hwnd
,
GWL_EXSTYLE
,
WS_EX_APPWINDOW
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
point
.
x
,
point
.
y
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
return
vout_vaControlDefault
(
p_vout
,
i_query
,
args
);
...
...
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