diff options
author | Silenio Quarti | 2013-05-07 19:28:13 +0000 |
---|---|---|
committer | Arun Thondapu | 2015-02-18 11:36:53 +0000 |
commit | 37fe4e571b46e692e0669d19563efbd517db6907 (patch) | |
tree | ee99aedac11b1b5a46823591f54a338f375d5711 | |
parent | fa9050ae0efc405d836f643f14a952062ee4c215 (diff) | |
download | eclipse.platform.swt-37fe4e571b46e692e0669d19563efbd517db6907.tar.gz eclipse.platform.swt-37fe4e571b46e692e0669d19563efbd517db6907.tar.xz eclipse.platform.swt-37fe4e571b46e692e0669d19563efbd517db6907.zip |
Change-Id: I585cff1ea234e8d4bf5cbecfbd11b65656cc221e
Signed-off-by: Arun Thondapu <arunkumar.thondapu@in.ibm.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java index a181d6eb4f..90ec0368ad 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -49,6 +49,7 @@ public class Tracker extends Widget { Cursor clientCursor; int cursorOrientation = SWT.NONE; boolean inEvent = false; + boolean drawn; int /*long*/ hwndTransparent, hwndOpaque, oldTransparentProc, oldOpaqueProc; int oldX, oldY; @@ -511,7 +512,8 @@ public boolean open () { 0, OS.GetModuleHandle (null), null); - OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA); + OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0, OS.LWA_COLORKEY | OS.LWA_ALPHA); + drawn = false; newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$ int /*long*/ newProcAddress = newProc.getAddress (); if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); @@ -936,6 +938,10 @@ int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ OS.DeleteObject (hBitmap); } OS.EndPaint (hwnd, ps); + if (!drawn) { + OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA); + drawn = true; + } return 0; } } |