[polari/wip/kunaljain/bug-fixes: 2/3] chatView: Listen to crossover events
- From: Kunal Jain <kunaljain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/kunaljain/bug-fixes: 2/3] chatView: Listen to crossover events
- Date: Wed, 23 Dec 2015 15:04:34 +0000 (UTC)
commit 78ca6c59ff8ea0a3092f829d42e16f0eacbbd56a
Author: Kunaal Jain <kunaalus gmail com>
Date: Wed Dec 23 01:13:19 2015 +0530
chatView: Listen to crossover events
We use motion notify event to listen to motion, and
update button tags hover but it is not called when
entering or leaving the chatview, so listen to
crossover events which are called when we enter or
leave chatView.
src/chatView.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 6dc54c1..77e3dcc 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -379,6 +379,9 @@ const ChatView = new Lang.Class({
wrap_mode: Gtk.WrapMode.WORD_CHAR,
right_margin: MARGIN });
+ this._view.add_events(Gdk.EventMask.LEAVE_NOTIFY_MASK);
+ this._view.add_events(Gdk.EventMask.ENTER_NOTIFY_MASK);
+
this.widget.add(this._view);
this.widget.show_all();
@@ -399,6 +402,10 @@ const ChatView = new Lang.Class({
this._view.connect('key-press-event', Lang.bind(this, this._onKeyPress));
this._view.connect('motion-notify-event',
Lang.bind(this, this._handleButtonTagsHover));
+ this._view.connect('enter-notify-event',
+ Lang.bind(this, this._handleButtonTagsHover));
+ this._view.connect('leave-notify-event',
+ Lang.bind(this, this._handleButtonTagsHover));
},
_onDestroy: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]