Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
721daa70
Commit
721daa70
authored
Sep 14, 2012
by
David Fuhrmann
Browse files
macosx: small cleanup in VLCWindow
parent
9e7821d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/Windows.h
View file @
721daa70
...
...
@@ -31,13 +31,13 @@
* Missing extension to NSWindow
*****************************************************************************/
@interface
VLCWindow
:
NSWindow
<
NSWindowDelegate
>
@interface
VLCWindow
:
NSWindow
{
BOOL
b_canBecomeKeyWindow
;
BOOL
b_isset_canBecomeKeyWindow
;
BOOL
b_canBecomeMainWindow
;
BOOL
b_isset_canBecomeMainWindow
;
NSViewAnimation
*
animation
;
NSViewAnimation
*
o_current_
animation
;
}
@property
(
readwrite
)
BOOL
canBecomeKeyWindow
;
@property
(
readwrite
)
BOOL
canBecomeMainWindow
;
...
...
modules/gui/macosx/Windows.m
View file @
721daa70
...
...
@@ -38,7 +38,6 @@
{
self
=
[
super
initWithContentRect
:
contentRect
styleMask
:
styleMask
backing
:
backingType
defer
:
flag
];
if
(
self
)
{
b_isset_canBecomeKeyWindow
=
NO
;
/* we don't want this window to be restored on relaunch */
if
(
!
OSX_SNOW_LEOPARD
)
[
self
setRestorable
:
NO
];
...
...
@@ -127,20 +126,19 @@
[
anim
setUserInfo
:
callback
];
@synchronized
(
self
)
{
current_anim
=
self
->
animation
;
current_anim
=
self
->
o_current_
animation
;
if
([[[
current_anim
viewAnimations
]
objectAtIndex
:
0
]
objectForKey
:
NSViewAnimationEffectKey
]
==
NSViewAnimationFadeOutEffect
&&
[
current_anim
isAnimating
])
{
[
anim
release
];
}
else
{
if
(
current_anim
)
{
[
current_anim
stopAnimation
];
[
anim
setCurrentProgress
:
1
.
0
-
[
current_anim
currentProgress
]];
[
anim
setCurrentProgress
:
1
.
0
-
[
current_anim
currentProgress
]];
[
current_anim
release
];
}
else
[
anim
setCurrentProgress
:
1
.
0
-
[
self
alphaValue
]];
self
->
animation
=
anim
;
[
self
setDelegate
:
self
];
self
->
o_current_animation
=
anim
;
[
anim
startAnimation
];
}
}
...
...
@@ -180,7 +178,7 @@
[
anim
setFrameRate
:
30
];
@synchronized
(
self
)
{
current_anim
=
self
->
animation
;
current_anim
=
self
->
o_current_
animation
;
if
([[[
current_anim
viewAnimations
]
objectAtIndex
:
0
]
objectForKey
:
NSViewAnimationEffectKey
]
==
NSViewAnimationFadeInEffect
&&
[
current_anim
isAnimating
])
{
[
anim
release
];
...
...
@@ -192,8 +190,7 @@
}
else
[
anim
setCurrentProgress
:[
self
alphaValue
]];
self
->
animation
=
anim
;
[
self
setDelegate
:
self
];
self
->
o_current_animation
=
anim
;
[
self
orderFront
:
sender
];
[
anim
startAnimation
];
}
...
...
@@ -211,11 +208,6 @@
}
}
-
(
IBAction
)
fullscreen
:(
id
)
sender
{
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
}
@end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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