[vlc-commits] minimal_macosx: implement VOUT_WINDOW_SET_SIZE and VOUT_WINDOW_SET_STATE
Felix Paul Kühne
git at videolan.org
Wed Dec 19 19:53:15 CET 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Dec 19 19:33:11 2012 +0100| [fe22c45fac717531bd43a63e7209862a9a33fe27] | committer: Felix Paul Kühne
minimal_macosx: implement VOUT_WINDOW_SET_SIZE and VOUT_WINDOW_SET_STATE
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe22c45fac717531bd43a63e7209862a9a33fe27
---
modules/gui/minimal_macosx/intf.m | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index dd88a71..55251e4 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -196,19 +196,21 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
case VOUT_WINDOW_SET_STATE:
{
unsigned i_state = va_arg(args, unsigned);
- // TODO
-// [o_window performSelectorOnMainThread:@selector(setWindowLevel:) withObject:[NSNumber numberWithUnsignedInt:i_state] waitUntilDone:NO];
+
+ [o_window setLevel: i_state];
+
return VLC_SUCCESS;
}
case VOUT_WINDOW_SET_SIZE:
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
+ NSRect theFrame = [o_window frame];
unsigned int i_width = va_arg(args, unsigned int);
unsigned int i_height = va_arg(args, unsigned int);
-
- NSSize newSize = NSMakeSize(i_width, i_height);
- // TODO
+ theFrame.size.width = i_width;
+ theFrame.size.height = i_height;
+ [o_window setFrame: theFrame display: YES animate: YES];
[o_pool release];
return VLC_SUCCESS;
More information about the vlc-commits
mailing list