Skip to content

Commit 04310be

Browse files
committed
[Gtk] One more usless inPixel method removed
1 parent 44ab447 commit 04310be

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ void printWidget (GC gc, long drawable, int depth, int x, int y) {
14471447
for (int i=children.length-1; i>=0; --i) {
14481448
Control child = children [i];
14491449
if (child.getVisible ()) {
1450-
Point location = child.getLocationInPixels ();
1450+
Point location = child.getLocation ();
14511451
child.printWidget (gc, drawable, depth, x + location.x, y + location.y);
14521452
}
14531453
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,11 +1226,6 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
12261226
* </ul>
12271227
*/
12281228
public Point getLocation () {
1229-
checkWidget();
1230-
return getLocationInPixels();
1231-
}
1232-
1233-
Point getLocationInPixels () {
12341229
checkWidget();
12351230
long topHandle = topHandle ();
12361231
GtkAllocation allocation = new GtkAllocation ();

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ public boolean getFullScreen () {
12701270
}
12711271

12721272
@Override
1273-
Point getLocationInPixels () {
1273+
public Point getLocation() {
12741274
checkWidget ();
12751275
// Bug in GTK: when shell is moved and then hidden, its location does not get updated.
12761276
// Move it before getting its location.
@@ -3044,7 +3044,7 @@ public void setVisible (boolean visible) {
30443044
opened = true;
30453045
if (!moved) {
30463046
moved = true;
3047-
Point location = getLocationInPixels();
3047+
Point location = getLocation();
30483048
oldX = location.x;
30493049
oldY = location.y;
30503050
sendEvent (SWT.Move);
@@ -3495,15 +3495,15 @@ Point getWindowOrigin () {
34953495
* window trims etc. from the window manager. That's why getLocation ()
34963496
* is not safe to use for coordinate mappings after the shell has been made visible.
34973497
*/
3498-
return getLocationInPixels ();
3498+
return getLocation ();
34993499
}
35003500
return super.getWindowOrigin( );
35013501
}
35023502

35033503
@Override
35043504
Point getSurfaceOrigin () {
35053505
if (!mapped) {
3506-
return getLocationInPixels ();
3506+
return getLocation ();
35073507
}
35083508
return super.getSurfaceOrigin( );
35093509
}

0 commit comments

Comments
 (0)