From patchwork Tue May 19 08:23:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 48730 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3FDF5214BA for ; Tue, 19 May 2015 08:24:59 +0000 (UTC) Received: by wixv7 with SMTP id v7sf4345889wix.0 for ; Tue, 19 May 2015 01:24:58 -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:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=BUpX03ggmzoHqovQbrfDeXZYINmYaVJq9GXHSPliKmU=; b=Mw/V/9VYic6BHRcsAmhfGvBMNXE3YbjOKoqQ6QVYjlDCcwSgf0IwRaJeAlHBLWrOb6 DIk2FeIzo/CvAEEYU1vJO9iA7xAEpml0d6WpqC7aAdAKJYgwcNp2c6EvEBsmmmmpigGn N6mt7lX+b8/4az/6ix2eyFevw+Wwxt3CF+Pp8TjCqWhPIOSCcA+V/0DP9/RvJYMT5e0m orjLAvGhbfiWogJ8Z6ZZWlvQs2/fAKoiuYGui0taJSeyhrmPLy3vXp9hjDXDh87c0wQr 97xXUFstdPpwmDTgI9wD1BjfS1+snHAem53rw/xuvilfneyTZsAF8pdkX0q6enr9OKQV g+qw== X-Gm-Message-State: ALoCoQkzcNuI86y4MEEtu2Nc3nxiIewYQOCoiDSyh+8U+1VPTsDsU6ibhqy4rZhoyBLG7DwcrvQS X-Received: by 10.152.43.116 with SMTP id v20mr21115229lal.3.1432023898482; Tue, 19 May 2015 01:24:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.101 with SMTP id p5ls26950laj.53.gmail; Tue, 19 May 2015 01:24:58 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr20312796lbb.76.1432023898265; Tue, 19 May 2015 01:24:58 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id xr5si8373383lbb.76.2015.05.19.01.24.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 May 2015 01:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by laat2 with SMTP id t2so11584461laa.1 for ; Tue, 19 May 2015 01:24:58 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr11418834laa.106.1432023898170; Tue, 19 May 2015 01:24:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp625289lbb; Tue, 19 May 2015 01:24:57 -0700 (PDT) X-Received: by 10.140.231.19 with SMTP id b19mr23607812qhc.22.1432023896036; Tue, 19 May 2015 01:24:56 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u18si10163170qgd.7.2015.05.19.01.24.55 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 May 2015 01:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:44411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yucpb-0007Cn-2v for patch@linaro.org; Tue, 19 May 2015 04:24:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yucol-0006G6-6d for qemu-devel@nongnu.org; Tue, 19 May 2015 04:24:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yucoi-0006HS-R9 for qemu-devel@nongnu.org; Tue, 19 May 2015 04:24:03 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yucoi-0006GF-K4 for qemu-devel@nongnu.org; Tue, 19 May 2015 04:24:00 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Yucoe-0000bS-2j; Tue, 19 May 2015 09:23:56 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 19 May 2015 09:23:50 +0100 Message-Id: <1432023835-2274-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432023835-2274-1-git-send-email-peter.maydell@linaro.org> References: <1432023835-2274-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PULL 05/10] ui/cocoa: Remove compatibility ifdefs for OSX 10.4 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Remove compatibility ifdefs that work around OSX 10.4 not providing various typedefs and functions. Signed-off-by: Peter Maydell Message-id: 1431296361-16981-3-git-send-email-peter.maydell@linaro.org --- 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 } }