qTox / qTox

qTox is a chat, voice, video, and file transfer IM client using the encrypted peer-to-peer Tox protocol.
https://qtox.github.io/
GNU General Public License v3.0
4.69k stars 1.03k forks source link

[Regression] Emoticon picker is being opened by groupchat title change in detached window mode #2208

Open zetok opened 8 years ago

zetok commented 8 years ago

Description: Emoticon picker is being opened every time groupchat title changes, after it is being opened by user even once.

OS: Hardened Gentoo Linux x86_64 i3 wm qTox: 7dd66213cbef6d6a6d7d6b2ecc3f89f9d8d8b7b9

Reproducible: Always

Steps to reproduce:

  1. Set Open chats in separate window in settings.
  2. In groupchat, click on emoticon picker.
  3. Change groupchat title, emoticon picker is being opened by it.

Observed Behavior: Emoticon picker is being opened by groupchat title change.

Expected Behavior: Emoticon picker should not be opened by groupchat title change.

Additional info: https://d.maxfile.ro/yxpkasoptm.webm

Reproducible for me on i3wm on Gentoo, and for @ovalseven8:

Can reproduce it. Tested with latest Lubuntu version.

First reported in https://github.com/tux3/qTox/pull/1938#issuecomment-117553543

sudden6 commented 7 years ago

Not reproducible on 76c4cf7d390ece3d0ec57b771fb9aaa21f7337f7 with plasmashell 5.7.3 on openSUSE Tumbleweed. @zetok can you still reproduce?

zetok commented 7 years ago

Still reproducible on 4a5f89bb98fc8657514e35c5022713358a453d49

sudden6 commented 7 years ago

then I need more info, on how to reproduce.

zetok commented 7 years ago

Have you actually changed the groupchat title? Note that when you are alone in a "groupchat" qTox doesn't change its title..

sudden6 commented 7 years ago

Yes, I did it exactly like in your steps. I used two clients on one pc and the different environment.

zetok commented 7 years ago

Perhaps me using i3wm matters

sudden6 commented 7 years ago

Maybe you can try on a different DE?

zetok commented 7 years ago

Can reproduce on XFCE @ OpenSUSE Tubleweed VM on qTox 1.5.0

zetok commented 7 years ago

on qTox 76c4cf7d390ece3d0ec57b771fb9aaa21f7337f7 webm: topic-emoji-picker.zip

sudden6 commented 7 years ago

I still can't reproduce on XFCE @ OpenSUSE Tumbleweed VM emoticon-picker.zip

sudden6 commented 7 years ago

I could reproduce now, but I have no idea what exactly the issue is or how to fix it. So I'll write down what I found out so far.

Problem: Somehow the keypress [Enter] event for the groupchat title widget also triggers https://github.com/qTox/qTox/blob/76c4cf7d390ece3d0ec57b771fb9aaa21f7337f7/src/widget/form/genericchatform.cpp#L370

The issue seems to be present since around 7dd66213cbef6d6a6d7d6b2ecc3f89f9d8d8b7b9.

Diadlo commented 6 years ago

~Seems, after creation ChatFormHeader, call button pressed, but not smiles.~ In a AV group chat or in a friend dialog, call button pressed. In group chat without AV smiles button pressed. It's the reason why you can't reproduce in manually created group.

After debugging, I can suggest that it's result of behaviour like focus stealing: when you press Enter CroppingLabel hides QLineEdit and shows QLabel. Focus was on QLineEdit and probably changed on the next element of the form after => button. And for some reason it activate it too.

It maybe Qt bug or not