diff options
author | Felipe Heidrich <fheidric> | 2006-01-11 21:56:19 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2006-01-11 21:56:19 +0000 |
commit | b661df81625358aa30ab7d20408cf4df222bba1d (patch) | |
tree | 1b69ccf060533635e1979ae22cf2eaac9201a221 | |
parent | 7046379104cb458b612f93b1d6dd6a46900f690e (diff) | |
download | eclipse.platform.swt-b661df81625358aa30ab7d20408cf4df222bba1d.tar.gz eclipse.platform.swt-b661df81625358aa30ab7d20408cf4df222bba1d.tar.xz eclipse.platform.swt-b661df81625358aa30ab7d20408cf4df222bba1d.zip |
86825 - CLabel not correctly captured by WM_PRINT
force widget to redraw when fonts is changed (consistent with gtk and carbon)
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java index 5b582309c6..3eee5d7850 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java @@ -1282,6 +1282,11 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) { if (hooks (SWT.Paint) || filters (SWT.Paint)) { GCData data = new GCData (); data.device = display; + data.foreground = getForegroundPixel (); + Control control = findBackgroundControl (); + if (control == null) control = this; + data.background = control.getBackgroundPixel (); + data.hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); GC gc = GC.win32_new (wParam, data); Event event = new Event (); event.gc = gc; @@ -1299,6 +1304,9 @@ LRESULT WM_PRINTCLIENT (int wParam, int lParam) { } LRESULT WM_SETFONT (int wParam, int lParam) { + if (lParam != 0) { + OS.InvalidateRect (handle, null, true); + } return super.WM_SETFONT (font = wParam, lParam); } |