Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
dd1222e9
Commit
dd1222e9
authored
Jun 10, 2018
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: remove hack for macOS Mavericks
parent
126fb118
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
45 deletions
+6
-45
modules/gui/macosx/CompatibilityFixes.h
modules/gui/macosx/CompatibilityFixes.h
+1
-3
modules/gui/macosx/NSScreen+VLCAdditions.m
modules/gui/macosx/NSScreen+VLCAdditions.m
+5
-7
modules/gui/macosx/VLCWindow.m
modules/gui/macosx/VLCWindow.m
+0
-35
No files found.
modules/gui/macosx/CompatibilityFixes.h
View file @
dd1222e9
...
...
@@ -26,14 +26,12 @@
#pragma mark -
#pragma OS detection code
#define OSX_LION_AND_HIGHER (NSAppKitVersionNumber >= 1115.2)
#define OSX_MOUNTAIN_LION_AND_HIGHER (NSAppKitVersionNumber >= 1162)
#define OSX_MAVERICKS_AND_HIGHER (NSAppKitVersionNumber >= 1244)
#define OSX_YOSEMITE_AND_HIGHER (NSAppKitVersionNumber >= 1334)
#define OSX_EL_CAPITAN_AND_HIGHER (NSAppKitVersionNumber >= 1404)
#define OSX_SIERRA_AND_HIGHER (NSAppKitVersionNumber >= 1485)
#define OSX_SIERRA_DOT_TWO_AND_HIGHER (NSAppKitVersionNumber >= 1504.76) // this is needed to check for MPRemoteCommandCenter
#define OSX_HIGH_SIERRA_AND_HIGHER (NSAppKitVersionNumber >= 1560)
#define OSX_MOJAVE_AND_HIGHER (NSAppKitVersionNumber >= 1639.10)
// Sierra only APIs
#ifndef MAC_OS_X_VERSION_10_12
...
...
modules/gui/macosx/NSScreen+VLCAdditions.m
View file @
dd1222e9
...
...
@@ -37,14 +37,12 @@ static bool b_old_spaces_style = YES;
/* init our fake object attribute */
blackoutWindows
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
1
];
if
(
OSX_MAVERICKS_AND_HIGHER
)
{
NSUserDefaults
*
userDefaults
=
[[
NSUserDefaults
alloc
]
init
];
[
userDefaults
addSuiteNamed
:
@"com.apple.spaces"
];
/* this is system settings -> mission control -> monitors using different spaces */
NSNumber
*
o_span_displays
=
[
userDefaults
objectForKey
:
@"spans-displays"
];
NSUserDefaults
*
userDefaults
=
[[
NSUserDefaults
alloc
]
init
];
[
userDefaults
addSuiteNamed
:
@"com.apple.spaces"
];
/* this is system settings -> mission control -> monitors using different spaces */
NSNumber
*
o_span_displays
=
[
userDefaults
objectForKey
:
@"spans-displays"
];
b_old_spaces_style
=
[
o_span_displays
boolValue
];
}
b_old_spaces_style
=
[
o_span_displays
boolValue
];
}
+
(
NSScreen
*
)
screenWithDisplayID
:
(
CGDirectDisplayID
)
displayID
...
...
modules/gui/macosx/VLCWindow.m
View file @
dd1222e9
...
...
@@ -157,39 +157,4 @@
return
nil
;
}
-
(
NSRect
)
constrainFrameRect
:(
NSRect
)
frameRect
toScreen
:(
NSScreen
*
)
screen
{
if
(
!
screen
)
screen
=
[
self
screen
];
NSRect
screenRect
=
[
screen
frame
];
NSRect
constrainedRect
=
[
super
constrainFrameRect
:
frameRect
toScreen
:
screen
];
/*
* Ugly workaround!
* With Mavericks, there is a nasty bug resulting in grey bars on top in fullscreen mode.
* It looks like this is enforced by the os because the window is in the way for the menu bar.
*
* According to the documentation, this constraining can be changed by overwriting this
* method. But in this situation, even the received frameRect is already contrained with the
* menu bars height substracted. This case is detected here, and the full height is
* enforced again.
*
* See #9469 and radar://15583566
*/
BOOL
b_inFullscreen
=
[
self
fullscreen
]
||
([
self
respondsToSelector
:
@selector
(
inFullscreenTransition
)]
&&
[(
VLCVideoWindowCommon
*
)
self
inFullscreenTransition
]);
if
((
OSX_MAVERICKS_AND_HIGHER
&&
!
OSX_YOSEMITE_AND_HIGHER
)
&&
b_inFullscreen
&&
constrainedRect
.
size
.
width
==
screenRect
.
size
.
width
&&
constrainedRect
.
size
.
height
!=
screenRect
.
size
.
height
&&
fabs
(
screenRect
.
size
.
height
-
constrainedRect
.
size
.
height
)
<=
25
.)
{
msg_Dbg
(
getIntf
(),
"Contrain window height %.1f to screen height %.1f"
,
constrainedRect
.
size
.
height
,
screenRect
.
size
.
height
);
constrainedRect
.
size
.
height
=
screenRect
.
size
.
height
;
}
return
constrainedRect
;
}
@end
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