diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-11-04 03:54:02 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-11-04 03:54:05 +0100 |
commit | 132b7623c504071327227503ca9f78d79518b087 (patch) | |
tree | 8e022db09796d2245c0acb4a12b09cdac4e247f5 /src | |
parent | 905a9b962b1464cf2f293b21634d4aa665c009ab (diff) |
Key press event is triggered when textview is disabled...
Diffstat (limited to 'src')
-rw-r--r-- | src/ChatWindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ChatWindow.cpp b/src/ChatWindow.cpp index f7cc5e2..a991e57 100644 --- a/src/ChatWindow.cpp +++ b/src/ChatWindow.cpp @@ -169,8 +169,11 @@ namespace dchat { if((event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter) && !(event->state & Gdk::SHIFT_MASK)) { - currentRoom->publishMessage(chatInput.get_buffer()->get_text()); - chatInput.get_buffer()->set_text(""); + if(chatInput.get_editable()) + { + currentRoom->publishMessage(chatInput.get_buffer()->get_text()); + chatInput.get_buffer()->set_text(""); + } return true; } return false; |