diff options
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java | 8 |
1 files changed, 7 insertions, 1 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 8a95e01dae..d8607495f2 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 @@ -49,6 +49,7 @@ public class Tracker extends Widget { Cursor clientCursor; int cursorOrientation = SWT.NONE; boolean inEvent = false; + boolean drawn; long /*int*/ 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$ long /*int*/ newProcAddress = newProc.getAddress (); if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); @@ -936,6 +938,10 @@ long /*int*/ transparentProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ 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; } } |