Skip to content

Commit aa607b8

Browse files
committed
Found places
Composite:handleDPIChange Composite:setSize,:sendResize layout() sendBoundsInPixels() Gridlayout.layout Image:win32_getHandle() - maybe all resources? (20%)
1 parent 0a68dea commit aa607b8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,9 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
10631063
state &= ~(RESIZE_OCCURRED | MOVE_OCCURRED);
10641064
state |= RESIZE_DEFERRED | MOVE_DEFERRED;
10651065
}
1066+
if (x == this.x && this.y == y && this.width == width && this.height == height && this.flags == flags) {
1067+
return;
1068+
}
10661069
super.setBoundsInPixels (x, y, width, height, flags, defer);
10671070
if (!defer && (state & CANVAS) != 0) {
10681071
boolean wasMoved = (state & MOVE_OCCURRED) != 0;

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3193,6 +3193,11 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags) {
31933193
}
31943194

31953195
void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean defer) {
3196+
long lol = topHandle ();
3197+
if(x == this.x && this.y == y && this.width == width && this.height == height && this.flags == flags) {
3198+
// System.out.println("yo " + lol);
3199+
return;
3200+
}
31963201
if (findImageControl () != null) {
31973202
if (backgroundImage == null) flags |= OS.SWP_NOCOPYBITS;
31983203
} else {
@@ -3202,7 +3207,8 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
32023207
}
32033208
}
32043209
}
3205-
long topHandle = topHandle ();
3210+
long topHandle = lol;
3211+
// System.out.println(topHandle);
32063212
if (defer && parent != null) {
32073213
forceResize ();
32083214
if (parent.lpwp != null) {
@@ -3229,8 +3235,12 @@ void setBoundsInPixels (int x, int y, int width, int height, int flags, boolean
32293235
}
32303236
}
32313237
OS.SetWindowPos (topHandle, 0, x, y, width, height, flags);
3238+
this.x = x;
3239+
this.y = y;this.width = width; this.height = height; this.flags = flags;
32323240
}
32333241

3242+
int x, y, width, height, flags;
3243+
32343244
/**
32353245
* Sets the receiver's size and location in points to the rectangular
32363246
* area specified by the argument. The <code>x</code> and

0 commit comments

Comments
 (0)