aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsService.java17
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java7
2 files changed, 21 insertions, 3 deletions
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java
index 34682feeedb..052793eabaf 100644
--- a/java/org/gnu/emacs/EmacsService.java
+++ b/java/org/gnu/emacs/EmacsService.java
@@ -387,6 +387,23 @@ public final class EmacsService extends Service
387 EmacsService.<Void>syncRunnable (task); 387 EmacsService.<Void>syncRunnable (task);
388 } 388 }
389 389
390 public void
391 getLocationInWindow (final EmacsView view, final int[] coordinates)
392 {
393 FutureTask<Void> task;
394
395 task = new FutureTask<Void> (new Callable<Void> () {
396 public Void
397 call ()
398 {
399 view.getLocationInWindow (coordinates);
400 return null;
401 }
402 });
403
404 EmacsService.<Void>syncRunnable (task);
405 }
406
390 407
391 408
392 public static void 409 public static void
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index 91e97fa8b61..911e082144e 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -1551,10 +1551,11 @@ public final class EmacsWindow extends EmacsHandleObject
1551 { 1551 {
1552 int[] array; 1552 int[] array;
1553 1553
1554 /* This is supposed to translate coordinates to the root 1554 /* This is supposed to translate coordinates to the root window,
1555 window. */ 1555 whose origin point, in this context, is that of the toplevel
1556 activity host to this view. */
1556 array = new int[2]; 1557 array = new int[2];
1557 EmacsService.SERVICE.getLocationOnScreen (view, array); 1558 EmacsService.SERVICE.getLocationInWindow (view, array);
1558 1559
1559 /* Now, the coordinates of the view should be in array. Offset X 1560 /* Now, the coordinates of the view should be in array. Offset X
1560 and Y by them. */ 1561 and Y by them. */