From patchwork Sun May 10 22:19:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 48192 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 177662121F for ; Sun, 10 May 2015 22:19:35 +0000 (UTC) Received: by wgbbd3 with SMTP id bd3sf1562629wgb.2 for ; Sun, 10 May 2015 15:19:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=pOSRDOl03SjY1sUN/rnBEUcroqUNzJn/U7B1MBIucwY=; b=KWpQcRhL79rx7GlfSqpeC2/ixMxcrE32e2ofIufJg9wuKuAF5jPD8PnffSJ/bQTG8n gjRMVo9exAZztR/a9FPPvYCXcLKpt8FqFCwogW7g4bOQNvx/zAakQGfDU6GGXBIhPp8b k1Y6RZDZUqY3SfGluY5bWz3NGfCWXooqUjImfyqM5MFEYVuqNvTSdAqdURBJ9nj9etbn MYNRLHPH12ESteHoObIMPJuVpfqOzTI4i4FIzRDrKXea+dvCLyaqRyQ+Sa1UtVlXTs9L vAdd89oMKdCSq0NRj57W4IHVq6i4OXDCBmqKaxee/qTeK6nvN70cqNfRVPQJcQgzRL7S x28A== X-Gm-Message-State: ALoCoQkL5YpqmYnUUL0/ZXMZXG96zFL3tCLzrShEsUu1z4N5fgX6+P1/L9aDISO0JUOfOlN8YRKE X-Received: by 10.112.14.101 with SMTP id o5mr5706814lbc.3.1431296374385; Sun, 10 May 2015 15:19:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.37 with SMTP id p5ls574703lah.9.gmail; Sun, 10 May 2015 15:19:34 -0700 (PDT) X-Received: by 10.112.234.163 with SMTP id uf3mr6028123lbc.9.1431296374245; Sun, 10 May 2015 15:19:34 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id s10si7262083laj.84.2015.05.10.15.19.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 May 2015 15:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbcga7 with SMTP id ga7so82675230lbc.1 for ; Sun, 10 May 2015 15:19:34 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr5830178lbc.73.1431296374162; Sun, 10 May 2015 15:19:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1195951lbb; Sun, 10 May 2015 15:19:33 -0700 (PDT) X-Received: by 10.68.110.133 with SMTP id ia5mr14282364pbb.44.1431296369010; Sun, 10 May 2015 15:19:29 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id s1si15500341pdf.63.2015.05.10.15.19.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 10 May 2015 15:19:28 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YrZZC-0004QU-1d; Sun, 10 May 2015 23:19:22 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Programmingkid , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf Subject: [PATCH 2/6] ui/cocoa: Remove compatibility ifdefs for OSX 10.4 Date: Sun, 10 May 2015 23:19:17 +0100 Message-Id: <1431296361-16981-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1431296361-16981-1-git-send-email-peter.maydell@linaro.org> References: <1431296361-16981-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Remove compatibility ifdefs that work around OSX 10.4 not providing various typedefs and functions. Signed-off-by: Peter Maydell --- ui/cocoa.m | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 6e69952..f6c5fb4 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -30,9 +30,6 @@ #include "ui/input.h" #include "sysemu/sysemu.h" -#ifndef MAC_OS_X_VERSION_10_4 -#define MAC_OS_X_VERSION_10_4 1040 -#endif #ifndef MAC_OS_X_VERSION_10_5 #define MAC_OS_X_VERSION_10_5 1050 #endif @@ -376,11 +373,7 @@ QemuCocoaView *cocoaView; ); // selective drawing code (draws only dirty rectangles) (OS X >= 10.4) const NSRect *rectList; -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) NSInteger rectCount; -#else - int rectCount; -#endif int i; CGImageRef clipImageRef; CGRect clipRect; @@ -490,33 +483,25 @@ QemuCocoaView *cocoaView; isFullscreen = FALSE; [self ungrabMouse]; [self setContentDimensions]; -// test if host supports "exitFullScreenModeWithOptions" at compile time -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if ([NSView respondsToSelector:@selector(exitFullScreenModeWithOptions:)]) { // test if "exitFullScreenModeWithOptions" is supported on host at runtime [self exitFullScreenModeWithOptions:nil]; } else { -#endif [fullScreenWindow close]; [normalWindow setContentView: self]; [normalWindow makeKeyAndOrderFront: self]; [NSMenu setMenuBarVisible:YES]; -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) } -#endif } else { // switch from desktop to fullscreen isFullscreen = TRUE; [normalWindow orderOut: nil]; /* Hide the window */ [self grabMouse]; [self setContentDimensions]; -// test if host supports "enterFullScreenMode:withOptions" at compile time -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if ([NSView respondsToSelector:@selector(enterFullScreenMode:withOptions:)]) { // test if "enterFullScreenMode:withOptions" is supported on host at runtime [self enterFullScreenMode:[NSScreen mainScreen] withOptions:[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:NO], NSFullScreenModeAllScreens, [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO], kCGDisplayModeIsStretched, nil], NSFullScreenModeSetting, nil]]; } else { -#endif [NSMenu setMenuBarVisible:NO]; fullScreenWindow = [[NSWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame] styleMask:NSBorderlessWindowMask @@ -528,9 +513,7 @@ QemuCocoaView *cocoaView; [self setFrame:NSMakeRect(cx, cy, cw, ch)]; [[fullScreenWindow contentView] addSubview: self]; [fullScreenWindow makeKeyAndOrderFront:self]; -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) } -#endif } }