From patchwork Sun Jan 12 22:52:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 23145 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B9FDA20A64 for ; Sun, 12 Jan 2014 23:11:22 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oy12sf13338109veb.1 for ; Sun, 12 Jan 2014 15:11:21 -0800 (PST) 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=XrLdpOxTTPhN3sc84CrUlE/ynhh76bC/nwybxqZpIWQ=; b=SngqoTU7uCpoateNK1HqX51/rM5N+KlmZvOgj2Wt4btvTPY27pAiTBBbJ+rDM/49mS xHf676lW4VXRc+gtV3uRqTbOlzvKDbKpos/Up/Lhv0fea+mKtY1ROubSGuQEi4lwYu+3 hEdbMK4fp3tPoYlxpqDeKokrgy4hx9tLFyQqti7B/xG0l4GUDFJvTLennkGyMsPTH+YR Ndx+su5ObVc/wZAwfLFBTkP8rgS7pHV3fTshRO21VoKXNWntDbExjDbMXXxk8s+/gVu8 zsytnQ3qrSo8s4icCjhCR/NE0ORS2iphJc+46aS1DGyIO5XUC3Ij6B/23i9OkLQwrJPI T1YA== X-Gm-Message-State: ALoCoQnuMy0EUTz2a3/Wx9UzbPFf1C/iuhf9OJuTiHtwrfpnZ32BJIRpSkvM7ElZa9CW8wAHVTfj X-Received: by 10.58.34.2 with SMTP id v2mr8503702vei.25.1389568281699; Sun, 12 Jan 2014 15:11:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.51 with SMTP id r19ls1952257qeu.21.gmail; Sun, 12 Jan 2014 15:11:21 -0800 (PST) X-Received: by 10.52.170.241 with SMTP id ap17mr13417982vdc.13.1389568281588; Sun, 12 Jan 2014 15:11:21 -0800 (PST) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id gq3si9838053vdc.106.2014.01.12.15.11.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Jan 2014 15:11:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id oz11so119345veb.23 for ; Sun, 12 Jan 2014 15:11:21 -0800 (PST) X-Received: by 10.58.186.198 with SMTP id fm6mr16155261vec.16.1389568281499; Sun, 12 Jan 2014 15:11:21 -0800 (PST) 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.59.13.131 with SMTP id ey3csp93420ved; Sun, 12 Jan 2014 15:11:21 -0800 (PST) X-Received: by 10.224.161.75 with SMTP id q11mr33107165qax.69.1389568280877; Sun, 12 Jan 2014 15:11:20 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w8si14617403qag.22.2014.01.12.15.11.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 12 Jan 2014 15:11:20 -0800 (PST) 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]:39763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2TwF-0001gq-Op for patch@linaro.org; Sun, 12 Jan 2014 17:55:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Ttl-00063j-Rn for qemu-devel@nongnu.org; Sun, 12 Jan 2014 17:52:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2Ttj-00055r-Pa for qemu-devel@nongnu.org; Sun, 12 Jan 2014 17:52:53 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:44745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Ttj-00055e-Hm for qemu-devel@nongnu.org; Sun, 12 Jan 2014 17:52:51 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1W2TtX-00085f-10; Sun, 12 Jan 2014 22:52:39 +0000 From: Peter Maydell To: Anthony Liguori Date: Sun, 12 Jan 2014 22:52:31 +0000 Message-Id: <1389567158-31066-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389567158-31066-1-git-send-email-peter.maydell@linaro.org> References: <1389567158-31066-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: Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 2/9] ui/cocoa: Correct typos in comments and variable names 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=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 Fix various non-user-visible typos in comments and variable names. Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil Message-id: 1386543546-31919-3-git-send-email-peter.maydell@linaro.org --- ui/cocoa.m | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 34b58d5..1edb944 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -52,7 +52,7 @@ #define COCOA_MOUSE_EVENT \ if (isTabletEnabled) { \ kbd_mouse_event((int)(p.x * 0x7FFF / (screen.width - 1)), (int)((screen.height - p.y) * 0x7FFF / (screen.height - 1)), 0, buttons); \ - } else if (isMouseGrabed) { \ + } else if (isMouseGrabbed) { \ kbd_mouse_event((int)[event deltaX], (int)[event deltaY], 0, buttons); \ } else { \ [NSApp sendEvent:event]; \ @@ -204,7 +204,7 @@ int keymap[] = 200,// 126 0x7E 0xc8 E0,48 U ARROW QZ_UP /* completed according to http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/quartz/SDL_QuartzKeys.h?rev=1.6&content-type=text/x-cvsweb-markup */ -/* Aditional 104 Key XP-Keyboard Scancodes from http://www.computer-engineering.org/ps2keyboard/scancodes1.html */ +/* Additional 104 Key XP-Keyboard Scancodes from http://www.computer-engineering.org/ps2keyboard/scancodes1.html */ /* 221 // 0xdd e0,5d APPS // E0,2A,E0,37 PRNT SCRN @@ -259,7 +259,7 @@ static int cocoa_keycode_to_qemu(int keycode) float cx,cy,cw,ch,cdx,cdy; CGDataProviderRef dataProviderRef; int modifiers_state[256]; - BOOL isMouseGrabed; + BOOL isMouseGrabbed; BOOL isFullscreen; BOOL isAbsoluteEnabled; BOOL isTabletEnabled; @@ -270,7 +270,7 @@ static int cocoa_keycode_to_qemu(int keycode) - (void) toggleFullScreen:(id)sender; - (void) handleEvent:(NSEvent *)event; - (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled; -- (BOOL) isMouseGrabed; +- (BOOL) isMouseGrabbed; - (BOOL) isAbsoluteEnabled; - (float) cdx; - (float) cdy; @@ -492,7 +492,7 @@ QemuCocoaView *cocoaView; case NSFlagsChanged: keycode = cocoa_keycode_to_qemu([event keyCode]); - if ((keycode == 219 || keycode == 220) && !isMouseGrabed) { + if ((keycode == 219 || keycode == 220) && !isMouseGrabbed) { /* Don't pass command key changes to guest unless mouse is grabbed */ keycode = 0; } @@ -523,7 +523,7 @@ QemuCocoaView *cocoaView; keycode = cocoa_keycode_to_qemu([event keyCode]); // forward command key combos to the host UI unless the mouse is grabbed - if (!isMouseGrabed && ([event modifierFlags] & NSCommandKeyMask)) { + if (!isMouseGrabbed && ([event modifierFlags] & NSCommandKeyMask)) { [NSApp sendEvent:event]; return; } @@ -587,7 +587,7 @@ QemuCocoaView *cocoaView; // don't pass the guest a spurious key-up if we treated this // command-key combo as a host UI action - if (!isMouseGrabed && ([event modifierFlags] & NSCommandKeyMask)) { + if (!isMouseGrabbed && ([event modifierFlags] & NSCommandKeyMask)) { return; } @@ -648,7 +648,7 @@ QemuCocoaView *cocoaView; case NSLeftMouseUp: if (isTabletEnabled) { COCOA_MOUSE_EVENT - } else if (!isMouseGrabed) { + } else if (!isMouseGrabbed) { if (p.x > -1 && p.x < screen.width && p.y > -1 && p.y < screen.height) { [self grabMouse]; } else { @@ -665,7 +665,7 @@ QemuCocoaView *cocoaView; COCOA_MOUSE_EVENT break; case NSScrollWheel: - if (isTabletEnabled || isMouseGrabed) { + if (isTabletEnabled || isMouseGrabbed) { kbd_mouse_event(0, 0, -[event deltaY], 0); } else { [NSApp sendEvent:event]; @@ -688,7 +688,7 @@ QemuCocoaView *cocoaView; } [NSCursor hide]; CGAssociateMouseAndMouseCursorPosition(FALSE); - isMouseGrabed = TRUE; // while isMouseGrabed = TRUE, QemuCocoaApp sends all events to [cocoaView handleEvent:] + isMouseGrabbed = TRUE; // while isMouseGrabbed = TRUE, QemuCocoaApp sends all events to [cocoaView handleEvent:] } - (void) ungrabMouse @@ -703,11 +703,11 @@ QemuCocoaView *cocoaView; } [NSCursor unhide]; CGAssociateMouseAndMouseCursorPosition(TRUE); - isMouseGrabed = FALSE; + isMouseGrabbed = FALSE; } - (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled {isAbsoluteEnabled = tIsAbsoluteEnabled;} -- (BOOL) isMouseGrabed {return isMouseGrabed;} +- (BOOL) isMouseGrabbed {return isMouseGrabbed;} - (BOOL) isAbsoluteEnabled {return isAbsoluteEnabled;} - (float) cdx {return cdx;} - (float) cdy {return cdy;} @@ -778,7 +778,7 @@ QemuCocoaView *cocoaView; { COCOA_DEBUG("QemuCocoaAppController: applicationDidFinishLaunching\n"); - // Display an open dialog box if no argument were passed or + // Display an open dialog box if no arguments were passed or // if qemu was launched from the finder ( the Finder passes "-psn" ) if( gArgc <= 1 || strncmp ((char *)gArgv[1], "-psn", 4) == 0) { NSOpenPanel *op = [[NSOpenPanel alloc] init]; @@ -1010,7 +1010,7 @@ static void cocoa_refresh(DisplayChangeListener *dcl) if (kbd_mouse_is_absolute()) { if (![cocoaView isAbsoluteEnabled]) { - if ([cocoaView isMouseGrabed]) { + if ([cocoaView isMouseGrabbed]) { [cocoaView ungrabMouse]; } }