Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
9713391c86
@ -55,7 +55,8 @@ class _MouseListener(object):
|
||||
self._hide_sid = 0
|
||||
|
||||
def mouse_enter(self):
|
||||
if self._frame.mode == MODE_NONE:
|
||||
if self._frame.mode == MODE_NONE or \
|
||||
self._frame.mode == MODE_MOUSE:
|
||||
self._show_frame()
|
||||
|
||||
def mouse_leave(self):
|
||||
@ -125,6 +126,7 @@ class Frame(object):
|
||||
self._shell = shell
|
||||
self._current_position = 0.0
|
||||
self._animator = None
|
||||
self._hover = False
|
||||
|
||||
self._event_frame = EventFrame()
|
||||
self._event_frame.connect('enter-corner', self._enter_corner_cb)
|
||||
@ -286,15 +288,24 @@ class Frame(object):
|
||||
self._mouse_listener.mouse_enter()
|
||||
|
||||
def _popup_context_deactivated_cb(self, popup_context):
|
||||
if not self._is_hover():
|
||||
if not self._hover:
|
||||
self._mouse_listener.mouse_leave()
|
||||
|
||||
def _enter_notify_cb(self, window, event):
|
||||
if self._hover:
|
||||
return
|
||||
|
||||
self._hover = True
|
||||
self._mouse_listener.mouse_enter()
|
||||
|
||||
def _leave_notify_cb(self, window, event):
|
||||
if not self._popup_context.is_active():
|
||||
self._mouse_listener.mouse_leave()
|
||||
if not self._hover:
|
||||
return
|
||||
|
||||
if not self._is_hover():
|
||||
self._hover = False
|
||||
if not self._popup_context.is_active():
|
||||
self._mouse_listener.mouse_leave()
|
||||
|
||||
def _drag_motion_cb(self, window, context, x, y, time):
|
||||
self._mouse_listener.mouse_enter()
|
||||
|
Loading…
Reference in New Issue
Block a user