From patchwork Sun Dec 8 22:59:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 22147 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 845B123FDD for ; Sun, 8 Dec 2013 22:59:13 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id v10sf14495460pde.4 for ; Sun, 08 Dec 2013 14:59:12 -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: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=E5+vdoLwjHReUi6cm4xSv0Sf+IDeYm/b0Ts7ig8EHgQ=; b=a9s/MvK1rxo3gYILn748uGAk8ZriU0KmiFovtbomodSC86CnCz8z4BnS4+wG/RQP02 GEGStEF3qq0MD9cC5A2Wuuvlec2v/FyQEj4Z9Z3mdZCHb5ku0ECD0uy0mrHlnuRxUNWz 08Qh8QupOc2Eeyy4YDdTWzn9DaUb6MnYlZFeTT7XP7ejTIXLglqNEI5U3zHjsJYKlwHD cwH3yurCKHhGfYrFfFcN5LPrImfn0e5cuNkK434FJN9VsT21wgu1bqmQWMEM8fe1hSPU JD54C3nTOTvaBLyp6bANHMMJ7byp2MJAQ5Nczpl0MIRtQmjRRphqY3/sLffX8iziWHC3 XBWQ== X-Gm-Message-State: ALoCoQkrj+/x9rXxCLL3LLL7i/Cq2m8WJTpoimjGe35LhP6tGknBylwN9o6RmmgAlhi+gziSqIxu X-Received: by 10.68.136.229 with SMTP id qd5mr9123008pbb.6.1386543552515; Sun, 08 Dec 2013 14:59:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.36.229 with SMTP id t5ls1897912qej.61.gmail; Sun, 08 Dec 2013 14:59:12 -0800 (PST) X-Received: by 10.52.98.194 with SMTP id ek2mr8229466vdb.11.1386543552373; Sun, 08 Dec 2013 14:59:12 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id dl10si2879879veb.19.2013.12.08.14.59.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 14:59:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 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.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so3033818veb.12 for ; Sun, 08 Dec 2013 14:59:12 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr9417631veb.6.1386543552283; Sun, 08 Dec 2013 14:59:12 -0800 (PST) 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.220.174.196 with SMTP id u4csp65226vcz; Sun, 8 Dec 2013 14:59:11 -0800 (PST) X-Received: by 10.68.198.68 with SMTP id ja4mr17307565pbc.24.1386543550235; Sun, 08 Dec 2013 14:59:10 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id pt8si5274893pac.279.2013.12.08.14.59.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 08 Dec 2013 14:59:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VpnJb-0008JP-0p; Sun, 08 Dec 2013 22:59:07 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 2/5] ui/cocoa: Correct typos in comments and variable names Date: Sun, 8 Dec 2013 22:59:03 +0000 Message-Id: <1386543546-31919-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1386543546-31919-1-git-send-email-peter.maydell@linaro.org> References: <1386543546-31919-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=neutral (google.com: 209.85.128.181 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 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: , Fix various non-user-visible typos in comments and variable names. Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil --- ui/cocoa.m | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index d38cf22..f55747f 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 @@ -260,7 +260,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; @@ -271,7 +271,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; @@ -493,7 +493,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; } @@ -524,7 +524,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; } @@ -588,7 +588,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; } @@ -649,7 +649,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 { @@ -666,7 +666,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]; @@ -689,7 +689,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 @@ -704,11 +704,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;} @@ -779,7 +779,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]; @@ -1011,7 +1011,7 @@ static void cocoa_refresh(DisplayChangeListener *dcl) if (kbd_mouse_is_absolute()) { if (![cocoaView isAbsoluteEnabled]) { - if ([cocoaView isMouseGrabed]) { + if ([cocoaView isMouseGrabbed]) { [cocoaView ungrabMouse]; } }