File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,6 @@ public static void updateResize() {
114114 }
115115 }
116116
117- Display .getDefault (). updateLayout ();
117+ Display .updateMonitor ();
118118 }
119119}
Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ public class Display extends Device {
386386
387387 DesktopItem [] desktopItems ;
388388
389- static String bodyOverflow , htmlOverflow ;
389+ static String bodyHeight , bodyOverflow , htmlOverflow ;
390390
391391 static int AUTO_HIDE_DELAY = 2000 ;
392392
@@ -480,6 +480,7 @@ public Display () {
480480 */
481481public Display (DeviceData data ) {
482482 super (data );
483+ System .out .println ("hi..." );
483484}
484485
485486/*
@@ -3422,6 +3423,10 @@ protected void release () {
34223423 document .body .style .overflow = bodyOverflow ;
34233424 bodyOverflow = null ;
34243425 }
3426+ if (bodyHeight != null ) {
3427+ document .body .style .height = bodyHeight ;
3428+ bodyHeight = null ;
3429+ }
34253430 }
34263431}
34273432
@@ -4569,6 +4574,20 @@ public void updateLayout() {
45694574 }
45704575}
45714576
4577+ public static void updateMonitor () {
4578+ Display disp = Default ;
4579+ if (disp == null || disp .isDisposed ()) {
4580+ for (int i = 0 ; i < Displays .length ; i ++) {
4581+ disp = Displays [i ];
4582+ if (disp != null && !disp .isDisposed ()) {
4583+ break ;
4584+ }
4585+ }
4586+ }
4587+ if (disp != null ) {
4588+ disp .updateLayout ();
4589+ }
4590+ }
45724591/**
45734592 * @j2sIgnore
45744593 */
Original file line number Diff line number Diff line change @@ -49,9 +49,15 @@ public void initialize() {
4949 if (Display .bodyOverflow == null ) {
5050 Element body = document .body ;
5151 Display .bodyOverflow = body .style .overflow ;
52+ Display .bodyHeight = body .style .height ;
5253 Display .htmlOverflow = body .parentNode .style .overflow ;
5354 if (body .style .overflow != "hidden" ) {
5455 body .style .overflow = "hidden" ;
56+ }
57+ if (body .style .height != "100%" ) {
58+ body .style .height = "100%" ;
59+ }
60+ if (body .parentNode .style .overflow != "hidden" ) {
5561 body .parentNode .style .overflow = "hidden" ;
5662 }
5763 }
Original file line number Diff line number Diff line change @@ -357,9 +357,15 @@ public void initialize() {
357357 if (Display .bodyOverflow == null ) {
358358 Element body = document .body ;
359359 Display .bodyOverflow = body .style .overflow ;
360+ Display .bodyHeight = body .style .height ;
360361 Display .htmlOverflow = body .parentNode .style .overflow ;
361362 if (body .style .overflow != "hidden" ) {
362363 body .style .overflow = "hidden" ;
364+ }
365+ if (body .style .height != "100%" ) {
366+ body .style .height = "100%" ;
367+ }
368+ if (body .parentNode .style .overflow != "hidden" ) {
363369 body .parentNode .style .overflow = "hidden" ;
364370 }
365371 }
You can’t perform that action at this time.
0 commit comments