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
Hide 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,7 +126,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -126,7 +126,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
/* setup the styled interface */
/* setup the styled interface */
b_nativeFullscreenMode
=
NO
;
b_nativeFullscreenMode
=
NO
;
#ifdef MAC_OS_X_VERSION_10_7
#ifdef MAC_OS_X_VERSION_10_7
b_nativeFullscreenMode
=
config_GetInt
(
VLCIntf
,
"macosx-nativefullscreenmode"
);
if
(
OSX_LION
)
b_nativeFullscreenMode
=
config_GetInt
(
VLCIntf
,
"macosx-nativefullscreenmode"
);
#endif
#endif
i_lastShownVolume
=
-
1
;
i_lastShownVolume
=
-
1
;
t_hide_mouse_timer
=
nil
;
t_hide_mouse_timer
=
nil
;
...
@@ -187,7 +188,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -187,7 +188,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low"
]];
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track"
]];
[
o_volume_up_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-high"
]];
[
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
setImage
:
[
NSImage
imageNamed
:
@"effects-one-button"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue"
]];
...
@@ -239,7 +240,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -239,7 +240,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low_dark"
]];
[
o_volume_down_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-low_dark"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track_dark"
]];
[
o_volume_track_view
setImage
:
[
NSImage
imageNamed
:
@"volume-slider-track_dark"
]];
[
o_volume_up_btn
setImage
:
[
NSImage
imageNamed
:
@"volume-high_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
setImage
:
[
NSImage
imageNamed
:
@"effects-one-button_dark"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue_dark"
]];
[
o_effects_btn
setAlternateImage
:
[
NSImage
imageNamed
:
@"effects-one-button-blue_dark"
]];
...
@@ -287,7 +288,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -287,7 +288,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_temp_view
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
[
o_temp_view
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
[
o_dropzone_view
setFrame
:
[
o_playlist_table
frame
]];
[
o_dropzone_view
setFrame
:
[
o_playlist_table
frame
]];
[
o_left_split_view
setFrame
:
[
o_sidebar_view
frame
]];
[
o_left_split_view
setFrame
:
[
o_sidebar_view
frame
]];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
{
NSRect
frame
;
NSRect
frame
;
[
self
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenPrimary
];
[
self
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenPrimary
];
...
@@ -1375,7 +1376,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -1375,7 +1376,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
id
)
setupVideoView
-
(
id
)
setupVideoView
{
{
vout_thread_t
*
p_vout
=
getVout
();
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
)
if
([
o_video_view
window
]
!=
self
)
{
{
...
@@ -1420,7 +1421,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -1420,7 +1421,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
!
b_videoPlayback
)
if
(
!
b_videoPlayback
)
[
o_detached_video_window
orderOut
:
nil
];
[
o_detached_video_window
orderOut
:
nil
];
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
{
if
(
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
)
if
(
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
)
[
o_bottombar_view
setHidden
:
b_videoPlayback
];
[
o_bottombar_view
setHidden
:
b_videoPlayback
];
...
@@ -1436,14 +1437,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -1436,14 +1437,14 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
!
b_videoPlayback
&&
b_fullscreen
)
if
(
!
b_videoPlayback
&&
b_fullscreen
)
{
{
if
(
!
b_nativeFullscreenMode
||
!
OSX_LION
)
if
(
!
b_nativeFullscreenMode
)
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
}
}
}
}
-
(
void
)
resizeWindow
-
(
void
)
resizeWindow
{
{
if
(
b_fullscreen
||
(
OSX_LION
&&
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
&&
b_nativeFullscreenMode
)
)
if
(
b_fullscreen
||
(
b_nativeFullscreenMode
&&
[
NSApp
presentationOptions
]
&
NSApplicationPresentationFullScreen
)
)
return
;
return
;
NSPoint
topleftbase
=
NSMakePoint
(
0
,
[
self
frame
].
size
.
height
);
NSPoint
topleftbase
=
NSMakePoint
(
0
,
[
self
frame
].
size
.
height
);
...
...
modules/gui/macosx/intf.m
View file @
de742db2
...
@@ -614,7 +614,8 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -614,7 +614,8 @@ static VLCMain *_o_sharedMainInstance = nil;
/* yeah, we are done */
/* yeah, we are done */
b_nativeFullscreenMode
=
NO
;
b_nativeFullscreenMode
=
NO
;
#ifdef MAC_OS_X_VERSION_10_7
#ifdef MAC_OS_X_VERSION_10_7
b_nativeFullscreenMode
=
config_GetInt
(
p_intf
,
"macosx-nativefullscreenmode"
);
if
(
OSX_LION
)
b_nativeFullscreenMode
=
config_GetInt
(
p_intf
,
"macosx-nativefullscreenmode"
);
#endif
#endif
nib_main_loaded
=
TRUE
;
nib_main_loaded
=
TRUE
;
}
}
...
@@ -697,7 +698,7 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -697,7 +698,7 @@ static VLCMain *_o_sharedMainInstance = nil;
int
returnedValue
=
0
;
int
returnedValue
=
0
;
/* always exit fullscreen on quit, otherwise we get ugly artifacts on the next launch */
/* 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
];
[
o_mainwindow
toggleFullScreen
:
self
];
[
NSApp
setPresentationOptions
:(
NSApplicationPresentationDefault
)];
[
NSApp
setPresentationOptions
:(
NSApplicationPresentationDefault
)];
...
@@ -1371,7 +1372,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1371,7 +1372,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
BOOL
b_fullscreen
=
var_GetBool
(
p_playlist
,
"fullscreen"
);
BOOL
b_fullscreen
=
var_GetBool
(
p_playlist
,
"fullscreen"
);
if
(
OSX_LION
&&
b_nativeFullscreenMode
)
if
(
b_nativeFullscreenMode
)
{
{
[
o_mainwindow
toggleFullScreen
:
self
];
[
o_mainwindow
toggleFullScreen
:
self
];
if
(
b_fullscreen
)
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