Skip to content
Snippets Groups Projects
Commit b550a10c authored by nkour's avatar nkour
Browse files

motion-notify on TC window now works and works as expected

parent dea0e53d
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,10 @@ def __init__(self, user, plugin, account):
self.window.resize(gajim.config.get('chat-width'),
gajim.config.get('chat-height'))
# gtk+ doesn't make use of the motion notify on gtkwindow by default
# so this line adds that
self.window.set_events(gtk.gdk.POINTER_MOTION_MASK)
self.window.show_all()
def save_var(self, jid):
......@@ -91,8 +95,9 @@ def load_var(self, jid, var):
var['gpg_enabled'])
def on_tabbed_chat_window_motion_notify_event(self, widget, event):
print widget, widget.is_focus()
if widget.is_focus(): # change chatstate only if window has focus
'''it gets called no matter if it is the active window or not'''
if widget.get_property('has-toplevel-focus'):
# change chatstate only if window is the active one
self.mouse_over_in_last_5_secs = True
self.mouse_over_in_last_30_secs = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment