Skip to content

Commit f92ce76

Browse files
akoch-yattaHeikoKlare
authored andcommitted
[win32] Fix GC font for composite
This commit reverts moving the initialization of GCData.font in Composite#WM_Paint in commit 033d733. Fixes #2066
1 parent ddd1862 commit f92ce76

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,7 @@ LRESULT WM_PAINT (long wParam, long lParam) {
15251525
Control control = findBackgroundControl ();
15261526
if (control == null) control = this;
15271527
data.background = control.getBackgroundPixel ();
1528+
data.font = SWTFontProvider.getFont(display, OS.SendMessage (handle, OS.WM_GETFONT, 0, 0), getNativeZoom());
15281529
data.uiState = (int)OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
15291530
if ((style & SWT.NO_BACKGROUND) != 0) {
15301531
/* This code is intentionally commented because it may be slow to copy bits from the screen */
@@ -1535,7 +1536,6 @@ LRESULT WM_PAINT (long wParam, long lParam) {
15351536
drawBackground (phdc [0], rect);
15361537
}
15371538
GC gc = createNewGC(phdc [0], data);
1538-
data.font = SWTFontProvider.getFont(display, OS.SendMessage (handle, OS.WM_GETFONT, 0, 0), data.nativeZoom);
15391539

15401540
Event event = new Event ();
15411541
event.gc = gc;

0 commit comments

Comments
 (0)