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() {
114
114
}
115
115
}
116
116
117
- Display .getDefault (). updateLayout ();
117
+ Display .updateMonitor ();
118
118
}
119
119
}
Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ public class Display extends Device {
386
386
387
387
DesktopItem [] desktopItems ;
388
388
389
- static String bodyOverflow , htmlOverflow ;
389
+ static String bodyHeight , bodyOverflow , htmlOverflow ;
390
390
391
391
static int AUTO_HIDE_DELAY = 2000 ;
392
392
@@ -480,6 +480,7 @@ public Display () {
480
480
*/
481
481
public Display (DeviceData data ) {
482
482
super (data );
483
+ System .out .println ("hi..." );
483
484
}
484
485
485
486
/*
@@ -3422,6 +3423,10 @@ protected void release () {
3422
3423
document .body .style .overflow = bodyOverflow ;
3423
3424
bodyOverflow = null ;
3424
3425
}
3426
+ if (bodyHeight != null ) {
3427
+ document .body .style .height = bodyHeight ;
3428
+ bodyHeight = null ;
3429
+ }
3425
3430
}
3426
3431
}
3427
3432
@@ -4569,6 +4574,20 @@ public void updateLayout() {
4569
4574
}
4570
4575
}
4571
4576
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
+ }
4572
4591
/**
4573
4592
* @j2sIgnore
4574
4593
*/
Original file line number Diff line number Diff line change @@ -49,9 +49,15 @@ public void initialize() {
49
49
if (Display .bodyOverflow == null ) {
50
50
Element body = document .body ;
51
51
Display .bodyOverflow = body .style .overflow ;
52
+ Display .bodyHeight = body .style .height ;
52
53
Display .htmlOverflow = body .parentNode .style .overflow ;
53
54
if (body .style .overflow != "hidden" ) {
54
55
body .style .overflow = "hidden" ;
56
+ }
57
+ if (body .style .height != "100%" ) {
58
+ body .style .height = "100%" ;
59
+ }
60
+ if (body .parentNode .style .overflow != "hidden" ) {
55
61
body .parentNode .style .overflow = "hidden" ;
56
62
}
57
63
}
Original file line number Diff line number Diff line change @@ -357,9 +357,15 @@ public void initialize() {
357
357
if (Display .bodyOverflow == null ) {
358
358
Element body = document .body ;
359
359
Display .bodyOverflow = body .style .overflow ;
360
+ Display .bodyHeight = body .style .height ;
360
361
Display .htmlOverflow = body .parentNode .style .overflow ;
361
362
if (body .style .overflow != "hidden" ) {
362
363
body .style .overflow = "hidden" ;
364
+ }
365
+ if (body .style .height != "100%" ) {
366
+ body .style .height = "100%" ;
367
+ }
368
+ if (body .parentNode .style .overflow != "hidden" ) {
363
369
body .parentNode .style .overflow = "hidden" ;
364
370
}
365
371
}
You can’t perform that action at this time.
0 commit comments