*** empty log message ***
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
index 8e439db..99d2218 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
@@ -1407,6 +1407,7 @@
 }
 
 int kEventRawKeyModifiersChanged (int nextHandler, int theEvent, int userData) {
+	Display display = this.display;
 	int [] modifiers = new int [1];
 	OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, modifiers.length * 4, null, modifiers);
 	int lastModifiers = display.lastModifiers;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java
index f126ba4..a262a75 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java
@@ -573,7 +573,6 @@
 				OS.GetEventParameter (theEvent, OS.kEventParamCGContextRef, OS.typeCGContextRef, null, 4, null, context);
 
 				/* Draw the key */
-				short left = rect.left;	
 				int modifierIndex = modifierIndex (accelText);
 				char [] buffer = new char [length - modifierIndex - 1];
 				accelText.getChars (modifierIndex + 1, length, buffer, 0);
@@ -589,17 +588,19 @@
 				OS.GetThemeMetric (OS.kThemeMetricMenuIconTrailingEdgeMargin, metric);
 				rect.left = (short) (rect.right - info.widMax - metric [0]);
 				int str = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, buffer.length);
-				OS.DrawThemeTextBox (str, (short) font, OS.kThemeStateActive, false, rect, (short) OS.teFlushDefault, context [0]);
+				OS.DrawThemeTextBox (str, (short) font, OS.kThemeStateActive, false, rect, (short) OS.teFlushLeft, context [0]);
 				OS.CFRelease (str);
 				
 				/* Draw the modifiers */
 				if (modifierIndex != -1) {
 					buffer = new char [modifierIndex + 1];
 					accelText.getChars (0, buffer.length, buffer, 0);
-					rect.right = rect.left;
-					rect.left = left;
 					str = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, buffer.length);
-					OS.DrawThemeTextBox (str, (short) OS.kThemeMenuItemCmdKeyFont, OS.kThemeStateActive, false, rect, (short) OS.teFlushRight, context [0]);
+					org.eclipse.swt.internal.carbon.Point size1 = new org.eclipse.swt.internal.carbon.Point ();
+					OS.GetThemeTextDimensions (str, (short) OS.kThemeMenuItemCmdKeyFont, 0, false, size1, null);
+					rect.right = rect.left;
+					rect.left = (short) (rect.right - size1.h);
+					OS.DrawThemeTextBox (str, (short) OS.kThemeMenuItemCmdKeyFont, OS.kThemeStateActive, false, rect, (short) OS.teFlushLeft, context [0]);
 					OS.CFRelease (str);
 				}
 				return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
index dc78516..9922bf3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
@@ -158,18 +158,18 @@
 
 public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget ();
+	Rect oldBounds = new Rect ();
+	OS.GetControlBounds (handle, oldBounds);
 	Rect bounds = new Rect ();
-	OS.GetControlBounds (handle, bounds);
+	bounds.right = bounds.bottom = 100;
+	OS.SetControlBounds (handle, bounds);
 	Rect client = new Rect ();
-	OS.GetControlData (handle, (short)OS.kControlEntireControl, OS.kControlTabContentRectTag, Rect.sizeof, client, null);
-	x -= Math.max (3, client.left - bounds.left);
-	if ((style & SWT.BOTTOM) != 0) {
-		y -= client.top - bounds.top;
-	} else {
-		y -= Math.max (34, client.top - bounds.top);
-	}
-	width += Math.max (6, (bounds.right - bounds.left) - (client.right - client.left));
-	height += Math.max (37, (bounds.bottom - bounds.top) - (client.bottom - client.top));
+	OS.GetTabContentRect (handle, client);
+	OS.SetControlBounds (handle, oldBounds);
+	x -= client.left - bounds.left;
+	y -= client.top - bounds.top;
+	width += (bounds.right - bounds.left) - (client.right - client.left);
+	height += (bounds.bottom - bounds.top) - (client.bottom - client.top);
 	Rect inset = getInset ();
 	x -= inset.left;
 	y -= inset.top;