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
3d7351e6
Commit
3d7351e6
authored
Jan 20, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: make sure that NSApplicationWillTerminateNotification reaches all of its observers
parent
1fb57312
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
18 deletions
+27
-18
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+24
-18
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+3
-0
No files found.
modules/gui/macosx/MainWindow.m
View file @
3d7351e6
...
...
@@ -112,8 +112,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_color_backdrop
release
];
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
config_PutInt
(
VLCIntf
->
p_libvlc
,
"volume"
,
i_lastShownVolume
);
[
self
saveFrameUsingName
:
[
self
frameAutosaveName
]];
[
o_sidebaritems
release
];
[
super
dealloc
];
}
...
...
@@ -427,12 +425,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
winrect
.
size
.
height
=
winrect
.
size
.
height
-
f_titleBarHeight
;
[
o_split_view
setFrame
:
winrect
];
[
o_video_view
setFrame
:
winrect
];
previousSavedFrame
=
winrect
;
o_color_backdrop
=
[[
VLCColorView
alloc
]
initWithFrame
:
[
o_split_view
frame
]];
[[
self
contentView
]
addSubview
:
o_color_backdrop
positioned
:
NSWindowBelow
relativeTo
:
o_split_view
];
[
o_color_backdrop
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
previousSavedFrame
=
winrect
;
[
self
display
];
}
else
...
...
@@ -459,6 +458,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
someWindowWillClose
:
)
name
:
NSWindowWillCloseNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
someWindowWillMiniaturize
:
)
name
:
NSWindowWillMiniaturizeNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
applicationWillTerminate
:
)
name
:
NSApplicationWillTerminateNotification
object
:
nil
];
}
#pragma mark -
...
...
@@ -894,6 +894,27 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
self
saveFrameUsingName
:
[
self
frameAutosaveName
]];
}
-
(
void
)
applicationWillTerminate
:(
NSNotification
*
)
notification
{
config_PutInt
(
VLCIntf
->
p_libvlc
,
"volume"
,
i_lastShownVolume
);
[
self
saveFrameUsingName
:
[
self
frameAutosaveName
]];
}
-
(
void
)
someWindowWillClose
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
[[
VLCCoreInteraction
sharedInstance
]
stop
];
}
-
(
void
)
someWindowWillMiniaturize
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
{
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
}
}
#pragma mark -
#pragma mark Update interface and respond to foreign events
-
(
void
)
showDropZone
...
...
@@ -1264,21 +1285,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
NSCursor
setHiddenUntilMouseMoves
:
YES
];
}
-
(
void
)
someWindowWillClose
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
[[
VLCCoreInteraction
sharedInstance
]
stop
];
}
-
(
void
)
someWindowWillMiniaturize
:(
NSNotification
*
)
notification
{
if
([
notification
object
]
==
o_nonembedded_window
||
[
notification
object
]
==
self
)
{
if
([[
VLCMain
sharedInstance
]
activeVideoPlayback
])
[[
VLCCoreInteraction
sharedInstance
]
pause
];
}
}
#pragma mark -
#pragma mark Fullscreen support
-
(
void
)
showFullscreenController
...
...
modules/gui/macosx/intf.m
View file @
3d7351e6
...
...
@@ -678,6 +678,9 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
applicationWillTerminate
:(
NSNotification
*
)
notification
{
if
(
notification
==
nil
)
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
NSApplicationWillTerminateNotification
object
:
nil
];
playlist_t
*
p_playlist
;
vout_thread_t
*
p_vout
;
int
returnedValue
=
0
;
...
...
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