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
5cb80582
Commit
5cb80582
authored
Dec 27, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: cascade multiple vout window positions, fix initial window positions
close #7873
parent
25f233cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
7 deletions
+34
-7
extras/package/macosx/Resources/English.lproj/DetachedVideoWindow.xib
...ge/macosx/Resources/English.lproj/DetachedVideoWindow.xib
+5
-5
modules/gui/macosx/VLCVoutWindowController.h
modules/gui/macosx/VLCVoutWindowController.h
+2
-0
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VLCVoutWindowController.m
+27
-2
No files found.
extras/package/macosx/Resources/English.lproj/DetachedVideoWindow.xib
View file @
5cb80582
...
...
@@ -37,8 +37,8 @@
<object
class=
"NSWindowTemplate"
id=
"951447013"
>
<int
key=
"NSWindowStyleMask"
>
15
</int>
<int
key=
"NSWindowBacking"
>
2
</int>
<string
key=
"NSWindowRect"
>
{{
131, 9
7}, {363, 239}}
</string>
<int
key=
"NSWTFlags"
>
19
5402240
0
</int>
<string
key=
"NSWindowRect"
>
{{
91, 46
7}, {363, 239}}
</string>
<int
key=
"NSWTFlags"
>
19
4877952
0
</int>
<string
key=
"NSWindowTitle"
>
VLC media player
</string>
<string
key=
"NSWindowClass"
>
VLCDetachedVideoWindow
</string>
<nil
key=
"NSViewClass"
/>
...
...
@@ -331,7 +331,7 @@
<reference
key=
"NSSuperview"
/>
<string
key=
"NSReuseIdentifierKey"
>
_NS:122
</string>
</object>
<string
key=
"NSScreenRect"
>
{{0, 0}, {1
680, 102
8}}
</string>
<string
key=
"NSScreenRect"
>
{{0, 0}, {1
280, 77
8}}
</string>
<string
key=
"NSMaxSize"
>
{1.7976931348623157e+308, 1.7976931348623157e+308}
</string>
<string
key=
"NSFrameAutosaveName"
>
detachedvideowindow
</string>
<bool
key=
"NSWindowIsRestorable"
>
NO
</bool>
...
...
@@ -1120,9 +1120,9 @@
<object
class=
"NSAffineTransform"
>
<bytes
key=
"NSTransformStruct"
>
AULCAABBMAAAA
</bytes>
</object>
<string>
{{558,
67
7}, {363, 239}}
</string>
<string>
{{558,
51
7}, {363, 239}}
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
{{558,
67
7}, {363, 239}}
</string>
<string>
{{558,
51
7}, {363, 239}}
</string>
<boolean
value=
"NO"
/>
<boolean
value=
"NO"
/>
<string>
{363, 203}
</string>
...
...
modules/gui/macosx/VLCVoutWindowController.h
View file @
5cb80582
...
...
@@ -33,6 +33,8 @@
@interface
VLCVoutWindowController
:
NSObject
{
NSMutableDictionary
*
o_vout_dict
;
NSPoint
top_left_point
;
}
-
(
VLCVoutView
*
)
setupVoutForWindow
:(
vout_window_t
*
)
p_wnd
withProposedVideoViewPosition
:(
NSRect
)
videoViewPosition
;
...
...
modules/gui/macosx/VLCVoutWindowController.m
View file @
5cb80582
...
...
@@ -102,8 +102,13 @@
if
(
b_video_wallpaper
)
[
o_new_video_window
orderBack
:
nil
];
else
{
[
o_new_video_window
center
];
[
o_new_video_window
setFrameAutosaveName
:
@"extra-videowindow"
];
// no frame autosave for additional vout windows
if
(
!
b_multiple_vout_windows
)
{
// initial window position
[
o_new_video_window
center
];
[
o_new_video_window
setFrameAutosaveName
:
@"extra-videowindow"
];
}
[
o_new_video_window
setContentMinSize
:
NSMakeSize
(
f_min_video_height
,
f_min_video_height
)];
}
...
...
@@ -111,15 +116,21 @@
b_nonembedded
=
YES
;
}
else
{
if
((
var_InheritBool
(
VLCIntf
,
"embedded-video"
)
&&
!
b_multiple_vout_windows
)
||
b_nativeFullscreenMode
)
{
// setup embedded video
o_vout_view
=
[[[
VLCMainWindow
sharedInstance
]
videoView
]
retain
];
o_new_video_window
=
[[
VLCMainWindow
sharedInstance
]
retain
];
b_nonembedded
=
NO
;
}
else
{
// setup detached window with controls
NSWindowController
*
o_controller
=
[[
NSWindowController
alloc
]
initWithWindowNibName
:
@"DetachedVideoWindow"
];
[
o_controller
loadWindow
];
o_new_video_window
=
[(
VLCDetachedVideoWindow
*
)[
o_controller
window
]
retain
];
[
o_controller
release
];
// no frame autosave for additional vout windows
if
(
b_multiple_vout_windows
)
[
o_new_video_window
setFrameAutosaveName
:
@""
];
[
o_new_video_window
setDelegate
:
o_new_video_window
];
[
o_new_video_window
setLevel
:
NSNormalWindowLevel
];
[
o_new_video_window
useOptimizedDrawing
:
YES
];
...
...
@@ -136,6 +147,20 @@
NSRect
window_rect
=
[
o_new_video_window
getWindowRectForProposedVideoViewSize
:
videoViewSize
];
[
o_new_video_window
setFrame
:
window_rect
display
:
YES
];
}
// cascade windows if we have more than one vout
if
(
b_multiple_vout_windows
)
{
if
([
o_vout_dict
count
]
==
1
)
{
NSWindow
*
o_first_window
=
[
o_vout_dict
objectForKey
:
[[
o_vout_dict
allKeys
]
objectAtIndex
:
0
]];
NSPoint
topleftbase
=
NSMakePoint
(
0
,
[
o_first_window
frame
].
size
.
height
);
top_left_point
=
[
o_first_window
convertBaseToScreen
:
topleftbase
];
}
top_left_point
=
[
o_new_video_window
cascadeTopLeftFromPoint
:
top_left_point
];
[
o_new_video_window
setFrameTopLeftPoint
:
top_left_point
];
}
[
o_new_video_window
setNativeVideoSize
:
videoViewSize
];
[
o_new_video_window
makeKeyAndOrderFront
:
self
];
...
...
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