@@ -54,7 +54,7 @@ public class Composite extends Scrollable {
5454 Control [] tabList ;
5555 int layoutCount = 0 ;
5656// Control [] children = new Control[0];
57- protected Control [] children ;
57+ Control [] children ;
5858 boolean waitingForLayoutWithResize ;
5959
6060/**
@@ -115,7 +115,7 @@ public Composite (Composite parent, int style) {
115115 Control [] newChildren = new Control [0 ];
116116 for (int i = 0 ; i < count ; i ++) {
117117 Control control = children [i ]; //display.getControl (handle.childNodes[i]);
118- if (control != null && control != this ) {
118+ if (control != null && control != this && !( control instanceof Shell ) ) {
119119 newChildren [index ++] = control ;
120120 }
121121 }
@@ -606,7 +606,7 @@ public void layout (Control [] changed) {
606606 checkWidget ();
607607// System.out.print("control");
608608 if (changed == null ) error (SWT .ERROR_INVALID_ARGUMENT );
609- Date d = new Date ();
609+ // Date d = new Date();
610610 int length = changed .length ;
611611 for (int i =0 ; i < length ; i ++) {
612612 Control control = changed [i ];
@@ -622,7 +622,7 @@ public void layout (Control [] changed) {
622622 if (!ancestor ) error (SWT .ERROR_INVALID_PARENT );
623623 }
624624// System.out.println(":::" + (new Date().getTime() - d.getTime()));
625- d = new Date ();
625+ // d = new Date();
626626 int updateCount = 0 ;
627627 Composite [] update = new Composite [16 ];
628628 for (int i =0 ; i < length ; i ++) {
@@ -645,12 +645,12 @@ public void layout (Control [] changed) {
645645 }
646646 }
647647// System.out.println(":::" + (new Date().getTime() - d.getTime()));
648- d = new Date ();
648+ // d = new Date();
649649 for (int i =updateCount -1 ; i >=0 ; i --) {
650650 update [i ].updateLayout (true , false );
651651 }
652652// System.out.println(":::" + (new Date().getTime() - d.getTime()));
653- d = new Date ();
653+ // d = new Date();
654654}
655655
656656void markLayout (boolean changed , boolean all ) {
@@ -1017,12 +1017,12 @@ protected boolean SetWindowPos(Object hWnd, Object hWndInsertAfter, int X, int Y
10171017
10181018void updateLayout (boolean resize , boolean all ) {
10191019 if (isLayoutDeferred ()) return ;
1020-
10211020 if ((state & LAYOUT_NEEDED ) != 0 && !waitingForLayout ) {
10221021// boolean changed = (state & LAYOUT_CHANGED) != 0;
10231022// state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
10241023// if (resize) setResizeChildren (false);
10251024// layout.layout (this, changed);
1025+ // if (resize) setResizeChildren (true);
10261026 this .waitingForLayout = true ;
10271027 this .waitingForLayoutWithResize = resize ;
10281028 display .sendMessage (new MESSAGE (this , MESSAGE .CONTROL_LAYOUT , new boolean [] {resize , all }));
@@ -1033,6 +1033,7 @@ void updateLayout (boolean resize, boolean all) {
10331033 Control [] children = _getChildren ();
10341034 int length = children .length ;
10351035 for (int i =0 ; i <length ; i ++) {
1036+ // children [i].updateLayout (resize, all);
10361037 if (children [i ] instanceof Composite ) {
10371038 display .sendMessage (new MESSAGE (children [i ], MESSAGE .CONTROL_LAYOUT , new boolean [] {resize , all }));
10381039 }
0 commit comments