From 29c0bdba8f5e4570b2d72bce6244cfb272fad84e Mon Sep 17 00:00:00 2001
From: Shahzaib Ibrahim
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index 01ec5ea9f21..9f2d36794a9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -5417,7 +5417,7 @@ LRESULT WM_SETCURSOR (long wParam, long lParam) { if (control == null) return null; Cursor cursor = control.findCursor (); if (cursor != null) { - OS.SetCursor (cursor.handle); + OS.SetCursor (Cursor.win32_getHandle(cursor, getZoom())); return LRESULT.ONE; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java index f30872a8c3a..1495e253461 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java @@ -2624,7 +2624,7 @@ LRESULT WM_SETCURSOR (long wParam, long lParam) { RECT rect = new RECT (); OS.GetClientRect (handle, rect); if (OS.PtInRect (rect, pt)) { - OS.SetCursor (cursor.handle); + OS.SetCursor (Cursor.win32_getHandle(cursor, getZoom())); switch (msg) { case OS.WM_LBUTTONDOWN: case OS.WM_RBUTTONDOWN: 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 a5a422d1d4f..f340d38e918 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 @@ -823,7 +823,7 @@ public void setCursor(Cursor newCursor) { checkWidget(); clientCursor = newCursor; if (newCursor != null) { - if (inEvent) OS.SetCursor (clientCursor.handle); + if (inEvent) OS.SetCursor (Cursor.win32_getHandle(clientCursor, getZoom())); } } @@ -892,7 +892,7 @@ long transparentProc (long hwnd, long msg, long wParam, long lParam) { break; case OS.WM_SETCURSOR: if (clientCursor != null) { - OS.SetCursor (clientCursor.handle); + OS.SetCursor (Cursor.win32_getHandle(clientCursor, getZoom())); return 1; } if (resizeCursor != 0) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java index 2e8df2cbde9..d85ed201706 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java @@ -4663,7 +4663,7 @@ void setCursor () { * is IDC_ARROW. */ Cursor cursor = findCursor (); - long hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : cursor.handle; + long hCursor = cursor == null ? OS.LoadCursor (0, OS.IDC_ARROW) : Cursor.win32_getHandle(cursor, getZoom()); OS.SetCursor (hCursor); }