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
de742db2
Commit
de742db2
authored
Mar 17, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: set b_nativeFullscreenMode to true only if we really use this mode
This simplifies the code in several lines.
parent
73592ab3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+9
-8
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+4
-3
No files found.
modules/gui/macosx/MainWindow.m
View file @
de742db2
...
...
@@ -126,6 +126,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* setup the styled interface */
b_nativeFullscreenMode
=
NO
;
#ifdef MAC_OS_X_VERSION_10_7
if
(
OSX_LION
)
b_nativeFullscreenMode
=
config_GetInt
(
VLCIntf
,
"macosx-nativefullscreenmode"
);
#endif
i_lastShownVolume
=
-
1
;
...
...
@@ -187,7 +188,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track"
]];
[
o_volume_up_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-high"
]];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
[
o_effects_btn
setImage
:
[
NSImage
imageNamed
:
@"effects-one-button"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue"
]];
...
...
@@ -239,7 +240,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low_dark"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track_dark"
]];
[
o_volume_up_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-high_dark"
]];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
[
o_effects_btn
setImage
:
[
NSImage
imageNamed
:
@"effects-one-button_dark"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue_dark"
]];
...
...
@@ -287,7 +288,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_temp_view
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
[
o_dropzone_view
setFrame
:
[
o_playlist_table
frame
]];
[
o_left_split_view
setFrame
:
[
o_sidebar_view
frame
]];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
NSRect
frame
;
[
self
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenPrimary
];
...
...
@@ -1375,7 +1376,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
id
)
setupVideoView
{
vout_thread_t
*
p_vout
=
getVout
();
if
(
config_GetInt
(
VLCIntf
,
"embedded-video"
)
||
(
OSX_LION
&&
b_nativeFullscreenMode
)
)
if
(
config_GetInt
(
VLCIntf
,
"embedded-video"
)
||
b_nativeFullscreenMode
)
{
if
([
o_video_view
window
]
!=
self
)
{
...
...
@@ -1420,7 +1421,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
!
b_videoPlayback
)
[
o_detached_video_window
orderOut
:
nil
];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
if
(
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
)
[
o_bottombar_view
setHidden
:
b_videoPlayback
];
...
...
@@ -1436,14 +1437,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
!
b_videoPlayback
&&
b_fullscreen
)
{
if
(
!
b_nativeFullscreenMode
||
!
OSX_LION
)
if
(
!
b_nativeFullscreenMode
)
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
}
}
-
(
void
)
resizeWindow
{
if
(
b_fullscreen
||
(
OSX_LION
&&
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
&&
b_nativeFullscreenMode
)
)
if
(
b_fullscreen
||
(
b_nativeFullscreenMode
&&
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
)
)
return
;
NSPoint
topleftbase
=
NSMakePoint
(
0
,
[
self
frame
].
size
.
height
);
...
...
modules/gui/macosx/intf.m
View file @
de742db2
...
...
@@ -614,6 +614,7 @@ static VLCMain *_o_sharedMainInstance = nil;
/* yeah, we are done */
b_nativeFullscreenMode
=
NO
;
#ifdef MAC_OS_X_VERSION_10_7
if
(
OSX_LION
)
b_nativeFullscreenMode
=
config_GetInt
(
p_intf
,
"macosx-nativefullscreenmode"
);
#endif
nib_main_loaded
=
TRUE
;
...
...
@@ -697,7 +698,7 @@ static VLCMain *_o_sharedMainInstance = nil;
int
returnedValue
=
0
;
/* always exit fullscreen on quit, otherwise we get ugly artifacts on the next launch */
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
[
o_mainwindow
toggleFullScreen
:
self
];
[
NSApp
setPresentationOptions
:(
NSApplicationPresentationDefault
)];
...
...
@@ -1371,7 +1372,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
BOOL
b_fullscreen
=
var_GetBool
(
p_playlist
,
"fullscreen"
);
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
[
o_mainwindow
toggleFullScreen
:
self
];
if
(
b_fullscreen
)
...
...
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