[vlc-commits] macosx: use fabs for windows coordinates
    David Fuhrmann 
    git at videolan.org
       
    Wed Apr 22 20:38:51 CEST 2015
    
    
  
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Apr 22 20:38:26 2015 +0200| [9557c3eb822ff378205edd9c91ecc9e45196fd60] | committer: David Fuhrmann
macosx: use fabs for windows coordinates
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9557c3eb822ff378205edd9c91ecc9e45196fd60
---
 modules/gui/macosx/Windows.m |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index b0de912..92d0718 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -258,7 +258,7 @@
 
     if((OSX_MAVERICKS || OSX_YOSEMITE) && b_inFullscreen && constrainedRect.size.width == screenRect.size.width
           && constrainedRect.size.height != screenRect.size.height
-          && abs(screenRect.size.height - constrainedRect.size.height) <= 25.) {
+          && fabs(screenRect.size.height - constrainedRect.size.height) <= 25.) {
 
         msg_Dbg(VLCIntf, "Contrain window height %.1f to screen height %.1f",
                 constrainedRect.size.height, screenRect.size.height);
@@ -475,10 +475,10 @@
     maxRect = [self customConstrainFrameRect: maxRect toScreen: [self screen]];
 
     // Compare the new frame with the current one
-    if ((abs(NSMaxX(maxRect) - NSMaxX(currentFrame)) < DIST)
-        && (abs(NSMaxY(maxRect) - NSMaxY(currentFrame)) < DIST)
-        && (abs(NSMinX(maxRect) - NSMinX(currentFrame)) < DIST)
-        && (abs(NSMinY(maxRect) - NSMinY(currentFrame)) < DIST)) {
+    if ((fabs(NSMaxX(maxRect) - NSMaxX(currentFrame)) < DIST)
+        && (fabs(NSMaxY(maxRect) - NSMaxY(currentFrame)) < DIST)
+        && (fabs(NSMinX(maxRect) - NSMinX(currentFrame)) < DIST)
+        && (fabs(NSMinY(maxRect) - NSMinY(currentFrame)) < DIST)) {
         // Already in zoomed mode, reset user frame, if stored
         if ([self frameAutosaveName] != nil) {
             [self setFrame: previousSavedFrame display: YES animate: YES];
    
    
More information about the vlc-commits
mailing list