]> git.sesse.net Git - vlc/commitdiff
minimal_macosx: implement VOUT_WINDOW_SET_SIZE and VOUT_WINDOW_SET_STATE
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 19 Dec 2012 18:33:11 +0000 (19:33 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 19 Dec 2012 18:53:12 +0000 (19:53 +0100)
modules/gui/minimal_macosx/intf.m

index dd88a71a6658c02c23bb1b8c70c860a6c0ddcfe9..55251e422e5af4746ccceedbea804a16659c36fb 100644 (file)
@@ -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;