Cleanups of the frame activation code.
Do not hide the frame on clicks.
This commit is contained in:
parent
0ef5c4b891
commit
4f72fd1c27
@ -138,7 +138,6 @@ class Frame(object):
|
||||
self._shell = shell
|
||||
self._current_position = 0.0
|
||||
self._animator = None
|
||||
self._hover = False
|
||||
|
||||
self._event_area = EventArea()
|
||||
self._event_area.connect('enter', self._enter_corner_cb)
|
||||
@ -289,24 +288,14 @@ class Frame(object):
|
||||
gobject.timeout_add(2000, lambda: self.hide())
|
||||
|
||||
def _enter_notify_cb(self, window, event):
|
||||
# FIXME clicks cause leave/notify, ignore
|
||||
if event.state == gtk.gdk.BUTTON1_MASK:
|
||||
return
|
||||
if self._hover:
|
||||
return
|
||||
|
||||
self._hover = True
|
||||
if event.detail != gtk.gdk.NOTIFY_INFERIOR:
|
||||
self._mouse_listener.mouse_enter()
|
||||
|
||||
def _leave_notify_cb(self, window, event):
|
||||
# FIXME clicks cause leave/notify, ignore
|
||||
if event.state == gtk.gdk.BUTTON1_MASK:
|
||||
return
|
||||
if not self._hover:
|
||||
if event.detail == gtk.gdk.NOTIFY_INFERIOR:
|
||||
return
|
||||
|
||||
if not self._is_hover() and not self._palette_group.is_up():
|
||||
self._hover = False
|
||||
self._mouse_listener.mouse_leave()
|
||||
|
||||
def _palette_group_popdown_cb(self, group):
|
||||
|
@ -93,9 +93,11 @@ class FrameWindow(gtk.Window):
|
||||
self.window.set_accept_focus(False)
|
||||
|
||||
def _enter_notify_cb(self, window, event):
|
||||
if event.detail != gtk.gdk.NOTIFY_INFERIOR:
|
||||
self.hover = True
|
||||
|
||||
def _leave_notify_cb(self, window, event):
|
||||
if event.detail != gtk.gdk.NOTIFY_INFERIOR:
|
||||
self.hover = False
|
||||
|
||||
def _size_changed_cb(self, screen):
|
||||
|
Loading…
Reference in New Issue
Block a user