[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [albireo-dev] 1.5 Linux initial display problem
|
Gordon Hirsch wrote:
> > Very consistently, on Linux under 1.5, in certain views (e.g.
> > EmbeddedJTable), the SwingControl is not displayed at all for me on
> > initial creation. As soon as any sort of user-initiated resize is done,
> > the SwingControl will appear.
> ...
> > For now, I've added a version check to hack around this problem in
> > handleSetBounds(). I know its not the long-term solution. We need to
> > revisit our use of the inhibit flag and the cachedSizesInitialized int.
>
> I found the same problem under Windows and SWT3.3, no matter which JDK
> version I used. I've added another version check to handle this case,
> and have consolidated internal version query code.
Same problem also under Windows, SWT 3.4M4, JDK 1.6. This fixes it for me:
Index: src/org/eclipse/albireo/core/SwingControl.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.albireo/org.eclipse.albireo.core/src/org/eclipse/albireo/core/SwingControl.java,v
retrieving revision 1.47
diff -c -3 -r1.47 SwingControl.java
*** src/org/eclipse/albireo/core/SwingControl.java 27 Feb 2008 16:01:48 -0000 1.47
--- src/org/eclipse/albireo/core/SwingControl.java 27 Feb 2008 16:47:47 -0000
***************
*** 654,666 ****
// values then! It is better than to use them.
//
// Do not optimize with the cachedSizesInitialized flag on GTK/Java5 or
! // win32/SWT3.3 since this may prevent the initial contents of the control
! // from being displayed. Testcase: EmbeddedJTableView.
// TODO: research the initial content display problem further
synchronized (this) {
if ((cachedSizesInitialized >= 2) ||
(Platform.isGtk() && Platform.JAVA_VERSION < Platform.javaVersion(1, 6, 0)) ||
! (Platform.isWin32() && Platform.SWT_VERSION < Platform.SWT_34)) {
setAWTSize(width, height);
}
}
--- 654,666 ----
// values then! It is better than to use them.
//
// Do not optimize with the cachedSizesInitialized flag on GTK/Java5 or
! // win32 since this may prevent the initial contents of the control
! // from being displayed. Testcases: EmbeddedJTableView, TestResizeView.
// TODO: research the initial content display problem further
synchronized (this) {
if ((cachedSizesInitialized >= 2) ||
(Platform.isGtk() && Platform.JAVA_VERSION < Platform.javaVersion(1, 6, 0)) ||
! Platform.isWin32()) {
setAWTSize(width, height);
}
}