diff options
-rw-r--r-- | src/caribou.py | 6 | ||||
-rw-r--r-- | src/keyboard.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/caribou.py b/src/caribou.py index 1e1abac..e03018f 100644 --- a/src/caribou.py +++ b/src/caribou.py @@ -41,7 +41,7 @@ class Test: def __set_text_location(self, acc): text = acc.queryText() [x, y, width, height] = text.getCharacterExtents(text.caretOffset, pyatspi.DESKTOP_COORDS) - cp.set_cursor_location(x, y + height) + cp.set_cursor_location(x, y, width, height) cp.show_all() def __set_entry_location(self, acc): @@ -50,9 +50,9 @@ class Test: if x == 0 and y == 0 and width == 0 and height == 0: component = acc.queryComponent() bb = component.getExtents(pyatspi.DESKTOP_COORDS) - cp.set_cursor_location(bb.x, bb.y + bb.height) + cp.set_cursor_location(bb.x, bb.y, bb.width, bb.height) else: - cp.set_cursor_location(x, y + height) + cp.set_cursor_location(x, y, width, height) cp.show_all() def on_state_changed_focused(self, event): diff --git a/src/keyboard.py b/src/keyboard.py index b67f88f..c9455ee 100644 --- a/src/keyboard.py +++ b/src/keyboard.py @@ -113,9 +113,9 @@ class CaribouWindow(gtk.VBox): self.__cursor_location = (0, 0) self.pack_start(CaribouKeyboard(qwerty)) - def set_cursor_location(self, x, y): #print "----> SET CURSOR LOCATION" - self.__cursor_location = (x, y) + def set_cursor_location(self, x, y, width, height): + self.__cursor_location = (x, y, width, height) self.__check_position() def do_size_request(self, requisition): @@ -137,9 +137,9 @@ class CaribouWindow(gtk.VBox): x = self.__cursor_location[0] if by > sy: - y = sy - self.__toplevel.allocation.height + y = self.__cursor_location[1] - self.__toplevel.allocation.height else: - y = self.__cursor_location[1] + y = self.__cursor_location[1] + self.__cursor_location[3] self.move(x, y) |