Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garnacho <carlos@lanedo.com>2012-11-26 16:40:15 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-11-27 18:07:16 (GMT)
commit297cd72757f6ac6784af6689a74a7680a0c77857 (patch)
tree707fb688c608ac0ac82039e5b1dfbba159c54476
parent5a1b380dd6099d7455d67e00718388fa79b57e01 (diff)
window: Avoid odd scrolling on OSK presence
Now it suffices to have the widget and osk rectangles intersect, to have "clear-request-area" emitted, so cater for the situations where the focus rect lies outside the osk area. Signed-off-by: Carlos Garnacho <carlos@lanedo.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/graphics/window.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py
index d754795..6f19ad7 100644
--- a/src/sugar3/graphics/window.py
+++ b/src/sugar3/graphics/window.py
@@ -297,11 +297,18 @@ class Window(Gtk.Window):
def __request_clear_area_cb(self, activity, osk_rect, cursor_rect):
self._clear_area_dy = cursor_rect.y + cursor_rect.height - osk_rect.y
+
+ if self._clear_area_dy < 0:
+ self._clear_area_dy = 0
+ return False
+
self.queue_resize()
+ return True
def __unset_clear_area_cb(self, activity, snap_back):
self._clear_area_dy = 0
self.queue_resize()
+ return True
def __size_allocate_cb(self, widget, allocation):
self.set_allocation(allocation)