Resolve disagreements in accounting of tooltip positions on Android
* java/org/gnu/emacs/EmacsService.java (getLocationInWindow): New function. * java/org/gnu/emacs/EmacsWindow.java (translateCoordinates): Derive "root window" position from the origin point of the containing activity's window rather than that of the screen, the two of which differ when "freeform mode" is enabled.
This commit is contained in:
@@ -1551,10 +1551,11 @@ public final class EmacsWindow extends EmacsHandleObject
|
||||
{
|
||||
int[] array;
|
||||
|
||||
/* This is supposed to translate coordinates to the root
|
||||
window. */
|
||||
/* This is supposed to translate coordinates to the root window,
|
||||
whose origin point, in this context, is that of the toplevel
|
||||
activity host to this view. */
|
||||
array = new int[2];
|
||||
EmacsService.SERVICE.getLocationOnScreen (view, array);
|
||||
EmacsService.SERVICE.getLocationInWindow (view, array);
|
||||
|
||||
/* Now, the coordinates of the view should be in array. Offset X
|
||||
and Y by them. */
|
||||
|
||||
Reference in New Issue
Block a user