Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
6ccde705
Commit
6ccde705
authored
Mar 03, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac OS X gui: Rework VLCVoutWindow behaviour when macosx-black is set. (Pointed by hartman)
parent
394563f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+9
-2
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+16
-8
No files found.
modules/gui/macosx/misc.m
View file @
6ccde705
...
@@ -116,15 +116,22 @@ static NSMutableArray *blackoutWindows = NULL;
...
@@ -116,15 +116,22 @@ static NSMutableArray *blackoutWindows = NULL;
for
(
i
=
0
;
i
<
[[
NSScreen
screens
]
count
];
i
++
)
for
(
i
=
0
;
i
<
[[
NSScreen
screens
]
count
];
i
++
)
{
{
VLCWindow
*
blackoutWindow
;
NSScreen
*
screen
=
[[
NSScreen
screens
]
objectAtIndex
:
i
];
NSScreen
*
screen
=
[[
NSScreen
screens
]
objectAtIndex
:
i
];
VLCWindow
*
blackoutWindow
;
NSRect
screen_rect
;
if
([
self
isScreen
:
screen
])
if
([
self
isScreen
:
screen
])
continue
;
continue
;
screen_rect
=
[
screen
frame
];
screen_rect
.
origin
.
x
=
screen_rect
.
origin
.
y
=
0
.
0
f
;
/* blackoutWindow alloc strategy
/* blackoutWindow alloc strategy
- The NSMutableArray blackoutWindows has the blackoutWindow references
- The NSMutableArray blackoutWindows has the blackoutWindow references
- blackoutOtherDisplays is responsible for alloc/releasing its Windows
- blackoutOtherDisplays is responsible for alloc/releasing its Windows
*/
*/
blackoutWindow
=
[[
VLCWindow
alloc
]
initWithContentRect
:
[
screen
frame
]
styleMask
:
NSBorderlessWindowMask
backing
:
NSBackingStoreBuffered
defer
:
NO
];
blackoutWindow
=
[[
VLCWindow
alloc
]
initWithContentRect
:
screen_rect
styleMask
:
NSBorderlessWindowMask
backing:
NSBackingStoreBuffered
defer
:
NO
screen
:
screen
];
[
blackoutWindow
setBackgroundColor
:[
NSColor
blackColor
]];
[
blackoutWindow
setBackgroundColor
:[
NSColor
blackColor
]];
[
blackoutWindow
setLevel
:
NSFloatingWindowLevel
];
/* Disappear when Expose is triggered */
[
blackoutWindow
setLevel
:
NSFloatingWindowLevel
];
/* Disappear when Expose is triggered */
...
...
modules/gui/macosx/vout.m
View file @
6ccde705
...
@@ -1003,7 +1003,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1003,7 +1003,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
p_real_vout
=
[
VLCVoutView
getRealVout
:
p_vout
];
p_real_vout
=
[
VLCVoutView
getRealVout
:
p_vout
];
i_device
=
var_GetInteger
(
p_real_vout
->
p_libvlc
,
"video-device"
);
i_device
=
var_GetInteger
(
p_real_vout
->
p_libvlc
,
"video-device"
);
b_black
=
var_GetBool
(
p_vout
,
"macosx-black"
)
;
b_black
=
NO
;
b_embedded
=
var_GetBool
(
p_vout
,
"macosx-embedded"
);
b_embedded
=
var_GetBool
(
p_vout
,
"macosx-embedded"
);
/* Find out on which screen to open the window */
/* Find out on which screen to open the window */
...
@@ -1021,6 +1021,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1021,6 +1021,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
NSRect
screen_rect
=
[
o_screen
frame
];
NSRect
screen_rect
=
[
o_screen
frame
];
screen_rect
.
origin
.
x
=
screen_rect
.
origin
.
y
=
0
;
screen_rect
.
origin
.
x
=
screen_rect
.
origin
.
y
=
0
;
b_black
=
var_GetBool
(
p_vout
,
"macosx-black"
);
/* move the FSPanel to front in case that it is currently shown
/* move the FSPanel to front in case that it is currently shown
* this won't and is not supposed to work when it's fading right now */
* this won't and is not supposed to work when it's fading right now */
if
(
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
isDisplayed
]
)
if
(
[[[[
VLCMain
sharedInstance
]
getControls
]
getFSPanel
]
isDisplayed
]
)
...
@@ -1035,9 +1037,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1035,9 +1037,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
backing:
NSBackingStoreBuffered
backing:
NSBackingStoreBuffered
defer:
YES
screen
:
o_screen
];
defer:
YES
screen
:
o_screen
];
if
(
b_black
==
VLC_TRUE
)
[
o_screen
blackoutOtherScreens
];
if
(
b_menubar_screen
)
if
(
b_menubar_screen
)
{
{
SetSystemUIMode
(
kUIModeAllHidden
,
kUIOptionAutoShowMenuBar
);
SetSystemUIMode
(
kUIModeAllHidden
,
kUIOptionAutoShowMenuBar
);
...
@@ -1045,7 +1044,11 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1045,7 +1044,11 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
if
(
b_black
==
VLC_TRUE
)
if
(
b_black
==
VLC_TRUE
)
{
{
CGAcquireDisplayFadeReservation
(
kCGMaxDisplayReservationInterval
,
&
token
);
CGAcquireDisplayFadeReservation
(
kCGMaxDisplayReservationInterval
,
&
token
);
CGDisplayFade
(
token
,
2
,
kCGDisplayBlendSolidColor
,
kCGDisplayBlendNormal
,
0
,
0
,
0
,
false
);
CGDisplayFade
(
token
,
0
.
6
,
kCGDisplayBlendNormal
,
kCGDisplayBlendSolidColor
,
0
,
0
,
0
,
YES
);
[
o_screen
blackoutOtherScreens
];
CGDisplayFade
(
token
,
0
.
3
,
kCGDisplayBlendSolidColor
,
kCGDisplayBlendNormal
,
0
,
0
,
0
,
NO
);
CGReleaseDisplayFadeReservation
(
token
);
CGReleaseDisplayFadeReservation
(
token
);
}
}
}
}
...
@@ -1117,22 +1120,27 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -1117,22 +1120,27 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{
{
/* XXX waitUntilDone = NO to avoid a possible deadlock when hitting
/* XXX waitUntilDone = NO to avoid a possible deadlock when hitting
Command-Q */
Command-Q */
[
self
setContentView
:
NULL
];
[
self
performSelectorOnMainThread
:
@selector
(
closeReal
:)
[
self
performSelectorOnMainThread
:
@selector
(
closeReal
:)
withObject:
NULL
waitUntilDone
:
NO
];
withObject:
NULL
waitUntilDone
:
NO
];
}
}
-
(
id
)
closeReal
:(
id
)
sender
-
(
id
)
closeReal
:(
id
)
sender
{
{
[
NSScreen
unblackoutScreens
];
if
(
b_black
==
VLC_TRUE
)
if
(
b_black
==
VLC_TRUE
)
{
{
CGDisplayFadeReservationToken
token
;
CGDisplayFadeReservationToken
token
;
CGAcquireDisplayFadeReservation
(
kCGMaxDisplayReservationInterval
,
&
token
);
CGAcquireDisplayFadeReservation
(
kCGMaxDisplayReservationInterval
,
&
token
);
CGDisplayFade
(
token
,
2
,
kCGDisplayBlendSolidColor
,
kCGDisplayBlendNormal
,
0
,
0
,
0
,
false
);
CGDisplayFade
(
token
,
0
.
3
,
kCGDisplayBlendNormal
,
kCGDisplayBlendSolidColor
,
0
,
0
,
0
,
YES
);
[
self
disableScreenUpdatesUntilFlush
];
[
self
orderOut
:
self
];
CGDisplayFade
(
token
,
0
.
6
,
kCGDisplayBlendSolidColor
,
kCGDisplayBlendNormal
,
0
,
0
,
0
,
YES
);
CGReleaseDisplayFadeReservation
(
token
);
CGReleaseDisplayFadeReservation
(
token
);
CGDisplayRestoreColorSyncSettings
();
CGDisplayRestoreColorSyncSettings
();
}
}
[
NSScreen
unblackoutScreens
];
SetSystemUIMode
(
kUIModeNormal
,
0
);
SetSystemUIMode
(
kUIModeNormal
,
0
);
[
super
close
];
[
super
close
];
/* this does only work in embedded mode */
/* this does only work in embedded mode */
...
...
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