]> git.sesse.net Git - vlc/blobdiff - modules/video_output/macosx.m
video_output/mmal: Add mmal based video output plugin
[vlc] / modules / video_output / macosx.m
index 46daebf54561c9c050ae96d9cf909aecbc93bc64..01392045e8e911af0a1fae7f02c531ff7173d35f 100644 (file)
@@ -366,8 +366,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             }
 
             if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE && is_forced
-                && (cfg->display.width != vd->cfg->display.width
-                    || cfg->display.height != vd->cfg->display.height)
                 && vout_window_SetSize (sys->embed, cfg->display.width, cfg->display.height)) {
                 [o_pool release];
                 return VLC_EGENERIC;
@@ -770,24 +768,21 @@ static void OpenglSwap (vlc_gl_t *gl)
 
 - (void)mouseMoved:(NSEvent *)o_event
 {
-    NSPoint ml;
-    NSRect s_rect;
-    BOOL b_inside;
-
     /* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
-    if (OSX_LION)
-        s_rect = [self convertRectToBacking:[self bounds]];
-    else
-        s_rect = [self bounds];
-    ml = [self convertPoint: [o_event locationInWindow] fromView: nil];
-    b_inside = [self mouse: ml inRect: s_rect];
+    NSPoint ml = [self convertPoint: [o_event locationInWindow] fromView: nil];
+    NSRect videoRect = [self bounds];
+    BOOL b_inside = [self mouse: ml inRect: videoRect];
+
+    if (OSX_LION) {
+        ml = [self convertPointToBacking: ml];
+        videoRect = [self convertRectToBacking: videoRect];
+    }
 
     if (b_inside) {
         @synchronized (self) {
             if (vd) {
-
                 vout_display_SendMouseMovedDisplayCoordinates(vd, ORIENT_NORMAL,
-                                                              (int)ml.x, s_rect.size.height - (int)ml.y,
+                                                              (int)ml.x, videoRect.size.height - (int)ml.y,
                                                               &vd->sys->place);
             }
         }