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>
master
Carlos Garnacho 12 years ago committed by Simon Schampijer
parent 5a1b380dd6
commit 297cd72757

@ -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)

Loading…
Cancel
Save