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
681329fa
Commit
681329fa
authored
Oct 09, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
window: check and set window type in all plugins
parent
53b1f060
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
5 deletions
+61
-5
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+5
-0
modules/gui/minimal_macosx/intf.m
modules/gui/minimal_macosx/intf.m
+5
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+10
-3
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/skin_main.cpp
+15
-0
modules/video_output/android/nativewindow.c
modules/video_output/android/nativewindow.c
+5
-0
modules/video_output/drawable.c
modules/video_output/drawable.c
+5
-1
modules/video_output/wayland/shell_surface.c
modules/video_output/wayland/shell_surface.c
+5
-0
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+10
-0
src/video_output/window.c
src/video_output/window.c
+1
-1
No files found.
modules/gui/macosx/intf.m
View file @
681329fa
...
...
@@ -118,6 +118,10 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
int
WindowOpen
(
vout_window_t
*
p_wnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_NSOBJECT
)
return
VLC_EGENERIC
;
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_intf
)
{
...
...
@@ -156,6 +160,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
[
o_vout_provider_lock
unlock
];
p_wnd
->
type
=
VOUT_WINDOW_TYPE_NSOBJECT
;
p_wnd
->
control
=
WindowControl
;
[
o_pool
release
];
...
...
modules/gui/minimal_macosx/intf.m
View file @
681329fa
...
...
@@ -148,6 +148,10 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
int
WindowOpen
(
vout
_
window
_
t
*
p
_
wnd
,
const
vout
_
window
_
cfg
_
t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT
_
WINDOW
_
TYPE
_
INVALID
&&
cfg
->
type
!=
VOUT
_
WINDOW
_
TYPE
_
NSOBJECT
)
return
VLC
_
EGENERIC
;
NSAutoreleasePool
*
o
_
pool
=
[[
NSAutoreleasePool
alloc
]
init
]
;
NSRect
proposedVideoViewPosition
=
NSMakeRect
(
cfg
->
x
,
cfg
->
y
,
cfg
->
width
,
cfg
->
height
)
;
...
...
@@ -168,6 +172,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
if
(
var
_
GetBool
(
pl
_
Get
(
p
_
wnd
)
,
"fullscreen"
))
[
o
_
window
performSelectorOnMainThread
:@
selector
(
enterFullscreen
)
withObject
:
nil
waitUntilDone
:
NO
]
;
p
_
wnd
->
type
=
VOUT
_
WINDOW
_
TYPE
_
NSOBJECT
;
p
_
wnd
->
control
=
WindowControl
;
[
o
_
pool
release
]
;
...
...
modules/gui/qt4/qt4.cpp
View file @
681329fa
...
...
@@ -659,9 +659,12 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
msg_Dbg
(
p_wnd
,
"Qt interface not found"
);
return
VLC_EGENERIC
;
}
if
(
p_intf
->
p_sys
->
voutWindowType
!=
cfg
->
type
)
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
p_intf
->
p_sys
->
voutWindowType
)
return
VLC_EGENERIC
;
switch
(
cfg
->
type
)
switch
(
p_intf
->
p_sys
->
voutWindowType
)
{
case
VOUT_WINDOW_TYPE_XID
:
if
(
var_InheritBool
(
p_wnd
,
"video-wallpaper"
)
)
...
...
@@ -685,7 +688,9 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
if
(
!
wid
)
return
VLC_EGENERIC
;
switch
(
cfg
->
type
)
p_wnd
->
type
=
p_intf
->
p_sys
->
voutWindowType
;
switch
(
p_wnd
->
type
)
{
case
VOUT_WINDOW_TYPE_XID
:
p_wnd
->
handle
.
xid
=
(
uintptr_t
)
wid
;
...
...
@@ -697,6 +702,8 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
case
VOUT_WINDOW_TYPE_NSOBJECT
:
p_wnd
->
handle
.
nsobject
=
(
void
*
)
wid
;
break
;
default:
assert
(
0
);
}
p_wnd
->
control
=
WindowControl
;
...
...
modules/gui/skins2/src/skin_main.cpp
View file @
681329fa
...
...
@@ -344,6 +344,16 @@ static void WindowCloseLocal( intf_thread_t* pIntf, vlc_object_t *pObj )
static
int
WindowOpen
(
vout_window_t
*
pWnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
)
{
#ifdef X11_SKINS
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_XID
)
#else
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_HWND
)
#endif
return
VLC_EGENERIC
;
}
vout_window_sys_t
*
sys
;
vlc_mutex_lock
(
&
skin_load
.
mutex
);
...
...
@@ -372,6 +382,11 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
pWnd
->
sys
=
sys
;
pWnd
->
sys
->
cfg
=
*
cfg
;
pWnd
->
sys
->
pIntf
=
pIntf
;
#ifdef X11_SKINS
pWnd
->
type
=
VOUT_WINDOW_TYPE_XID
;
#else
pWnd
->
type
=
VOUT_WINDOW_TYPE_HWND
;
#endif
pWnd
->
control
=
WindowControl
;
// force execution in the skins2 thread context
...
...
modules/video_output/android/nativewindow.c
View file @
681329fa
...
...
@@ -74,6 +74,10 @@ struct vout_window_sys_t
*/
static
int
Open
(
vout_window_t
*
wnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_ANDROID_NATIVE
)
return
VLC_EGENERIC
;
vout_window_sys_t
*
p_sys
=
malloc
(
sizeof
(
*
p_sys
));
if
(
p_sys
==
NULL
)
return
VLC_ENOMEM
;
...
...
@@ -100,6 +104,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
if
(
p_sys
->
window
==
NULL
)
goto
error
;
wnd
->
type
=
VOUT_WINDOW_TYPE_ANDROID_NATIVE
;
wnd
->
handle
.
anativewindow
=
p_sys
->
window
;
wnd
->
control
=
Control
;
wnd
->
sys
=
p_sys
;
...
...
modules/video_output/drawable.c
View file @
681329fa
...
...
@@ -67,7 +67,10 @@ static uintptr_t *used = NULL;
*/
static
int
Open
(
vout_window_t
*
wnd
,
const
vout_window_cfg_t
*
cfg
)
{
VLC_UNUSED
(
cfg
);
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_HWND
)
return
VLC_EGENERIC
;
uintptr_t
val
=
var_InheritInteger
(
wnd
,
"drawable-hwnd"
);
if
(
val
==
0
)
return
VLC_EGENERIC
;
...
...
@@ -100,6 +103,7 @@ skip:
if
(
val
==
0
)
return
VLC_EGENERIC
;
wnd
->
type
=
VOUT_WINDOW_TYPE_HWND
;
wnd
->
handle
.
hwnd
=
(
void
*
)
val
;
wnd
->
control
=
Control
;
wnd
->
sys
=
(
void
*
)
val
;
...
...
modules/video_output/wayland/shell_surface.c
View file @
681329fa
...
...
@@ -193,6 +193,10 @@ static const struct wl_registry_listener registry_cbs =
*/
static
int
Open
(
vout_window_t
*
wnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_WAYLAND
)
return
VLC_EGENERIC
;
vout_window_sys_t
*
sys
=
malloc
(
sizeof
(
*
sys
));
if
(
unlikely
(
sys
==
NULL
))
return
VLC_ENOMEM
;
...
...
@@ -256,6 +260,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
wl_display_flush
(
display
);
wnd
->
type
=
VOUT_WINDOW_TYPE_WAYLAND
;
wnd
->
handle
.
wl
=
surface
;
wnd
->
display
.
wl
=
display
;
wnd
->
control
=
Control
;
...
...
modules/video_output/xcb/window.c
View file @
681329fa
...
...
@@ -202,6 +202,10 @@ static void CacheAtoms (vout_window_sys_t *p_sys)
*/
static
int
Open
(
vout_window_t
*
wnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_XID
)
return
VLC_EGENERIC
;
xcb_generic_error_t
*
err
;
xcb_void_cookie_t
ck
;
...
...
@@ -259,6 +263,7 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
goto
error
;
}
wnd
->
type
=
VOUT_WINDOW_TYPE_XID
;
wnd
->
handle
.
xid
=
window
;
wnd
->
display
.
x11
=
display
;
wnd
->
control
=
Control
;
...
...
@@ -552,6 +557,10 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
*/
static
int
EmOpen
(
vout_window_t
*
wnd
,
const
vout_window_cfg_t
*
cfg
)
{
if
(
cfg
->
type
!=
VOUT_WINDOW_TYPE_INVALID
&&
cfg
->
type
!=
VOUT_WINDOW_TYPE_XID
)
return
VLC_EGENERIC
;
xcb_window_t
window
=
var_InheritInteger
(
wnd
,
"drawable-xid"
);
if
(
window
==
0
)
return
VLC_EGENERIC
;
...
...
@@ -566,6 +575,7 @@ static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
p_sys
->
embedded
=
true
;
p_sys
->
keys
=
NULL
;
wnd
->
type
=
VOUT_WINDOW_TYPE_XID
;
wnd
->
display
.
x11
=
NULL
;
wnd
->
handle
.
xid
=
window
;
wnd
->
control
=
Control
;
...
...
src/video_output/window.c
View file @
681329fa
...
...
@@ -97,7 +97,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
/* Hook for screensaver inhibition */
if
(
var_InheritBool
(
obj
,
"disable-screensaver"
)
&&
cfg
->
type
==
VOUT_WINDOW_TYPE_XID
)
{
window
->
type
==
VOUT_WINDOW_TYPE_XID
)
{
w
->
inhibit
=
vlc_inhibit_Create
(
VLC_OBJECT
(
window
));
if
(
w
->
inhibit
!=
NULL
)
vlc_inhibit_Set
(
w
->
inhibit
,
VLC_INHIBIT_VIDEO
);
...
...
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