Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
58d4ebc3
Commit
58d4ebc3
authored
Mar 03, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: improve handling of playlist view state in case of multiple vouts
close #10761
parent
3c946362
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+2
-3
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VLCVoutWindowController.m
+24
-8
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+4
-7
No files found.
modules/gui/macosx/MainWindow.m
View file @
58d4ebc3
...
...
@@ -783,8 +783,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
// only resize back to minimum view of this is still desired final state
float
f_threshold_height
=
f_min_video_height
+
[
o_controls_bar
height
];
if
(
frameBeforePlayback
.
size
.
height
>
f_threshold_height
||
b_minimized_view
)
if
(
frameBeforePlayback
.
size
.
height
>
f_threshold_height
||
b_minimized_view
)
{
[[
self
animator
]
setFrame
:
frameBeforePlayback
display
:
YES
];
}
}
frameBeforePlayback
=
NSMakeRect
(
0
,
0
,
0
,
0
);
...
...
@@ -810,8 +811,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_fspanel
setNonActive
:
nil
];
}
}
[
self
changePlaylistState
:
psVideoStartedOrStoppedEvent
];
}
#pragma mark -
...
...
modules/gui/macosx/VLCVoutWindowController.m
View file @
58d4ebc3
...
...
@@ -68,7 +68,8 @@
VLCVideoWindowCommon
*
o_new_video_window
;
// should be called before any window resizing occurs
[[
VLCMainWindow
sharedInstance
]
videoplayWillBeStarted
];
if
(
!
b_multiple_vout_windows
)
[[
VLCMainWindow
sharedInstance
]
videoplayWillBeStarted
];
if
(
b_multiple_vout_windows
&&
b_video_wallpaper
)
b_video_wallpaper
=
false
;
...
...
@@ -126,7 +127,6 @@
[
o_new_video_window
setContentMinSize
:
NSMakeSize
(
f_min_video_height
,
f_min_video_height
)];
}
[[
VLCMainWindow
sharedInstance
]
setNonembedded
:
YES
];
b_nonembedded
=
YES
;
}
else
{
if
((
var_InheritBool
(
VLCIntf
,
"embedded-video"
)
&&
!
b_mainwindow_has_video
))
{
...
...
@@ -221,13 +221,18 @@
[
o_new_video_window
setAlphaValue
:
config_GetFloat
(
VLCIntf
,
"macosx-opaqueness"
)];
if
(
!
b_multiple_vout_windows
)
[[
VLCMainWindow
sharedInstance
]
setNonembedded
:
b_nonembedded
];
[
o_vout_view
setVoutThread
:(
vout_thread_t
*
)
p_wnd
->
p_parent
];
[
o_new_video_window
setHasActiveVideo
:
YES
];
[
o_vout_dict
setObject
:[
o_new_video_window
autorelease
]
forKey
:[
NSValue
valueWithPointer
:
p_wnd
]];
[[
VLCMainWindow
sharedInstance
]
setNonembedded
:
!
b_mainwindow_has_video
];
// beware of order, setActiveVideoPlayback:, setHasActiveVideo: and setNonembedded: must be called before
if
([
o_new_video_window
class
]
==
[
VLCMainWindow
class
])
[[
VLCMainWindow
sharedInstance
]
changePlaylistState
:
psVideoStartedOrStoppedEvent
];
if
(
b_nonembedded
)
{
// event occurs before window is created, so call again
[[
VLCMain
sharedInstance
]
playlistUpdated
];
...
...
@@ -244,9 +249,6 @@
return
;
}
if
([
o_window
class
]
==
[
VLCMainWindow
class
])
b_mainwindow_has_video
=
NO
;
if
([
o_window
fullscreen
]
&&
!
[[
VLCMainWindow
sharedInstance
]
nativeFullscreenMode
])
[
o_window
leaveFullscreen
];
...
...
@@ -255,17 +257,31 @@
// set active video to no BEFORE closing the window to avoid stopping playback
// due to NSWindowWillCloseNotification
[
o_window
setHasActiveVideo
:
NO
];
if
([
o_window
class
]
!=
[
VLCMainWindow
class
])
{
[
o_window
close
];
[
o_window
orderOut
:
self
];
// for dark interface
}
[
o_window
retain
];
[
o_vout_dict
removeObjectForKey
:
o_key
];
if
([
o_vout_dict
count
]
==
0
)
{
[[
VLCMain
sharedInstance
]
setActiveVideoPlayback
:
NO
];
i_statusLevelWindowCounter
=
0
;
}
if
([
o_window
class
]
==
[
VLCMainWindow
class
])
{
b_mainwindow_has_video
=
NO
;
// video in main window might get stopped while another vout is open
if
([
o_vout_dict
count
]
>
0
)
[[
VLCMainWindow
sharedInstance
]
setNonembedded
:
YES
];
// beware of order, setActiveVideoPlayback:, setHasActiveVideo: and setNonembedded: must be called before
[[
VLCMainWindow
sharedInstance
]
changePlaylistState
:
psVideoStartedOrStoppedEvent
];
}
[
o_window
release
];
}
...
...
modules/gui/macosx/intf.m
View file @
58d4ebc3
...
...
@@ -135,6 +135,8 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
return
VLC_EGENERIC
;
}
[[
VLCMain
sharedInstance
]
setActiveVideoPlayback
:
YES
];
SEL
sel
=
@selector
(
setupVoutForWindow
:
withProposedVideoViewPosition
:
);
NSInvocation
*
inv
=
[
NSInvocation
invocationWithMethodSignature
:[
o_vout_controller
methodSignatureForSelector
:
sel
]];
[
inv
setTarget
:
o_vout_controller
];
...
...
@@ -148,19 +150,14 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
VLCVoutView
*
videoView
=
nil
;
[
inv
getReturnValue
:
&
videoView
];
if
(
!
videoView
)
{
msg_Err
(
p_wnd
,
"got no video view from the interface"
);
[
o_vout_provider_lock
unlock
];
[
o_pool
release
];
return
VLC_EGENERIC
;
}
// this method is not supposed to fail
assert
(
videoView
!=
nil
);
msg_Dbg
(
VLCIntf
,
"returning videoview with proposed position x=%i, y=%i, width=%i, height=%i"
,
cfg
->
x
,
cfg
->
y
,
cfg
->
width
,
cfg
->
height
);
p_wnd
->
handle
.
nsobject
=
videoView
;
[
o_vout_provider_lock
unlock
];
[[
VLCMain
sharedInstance
]
setActiveVideoPlayback
:
YES
];
p_wnd
->
control
=
WindowControl
;
[
o_pool
release
];
...
...
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