Make the UserInfoPopup identify itself as a popup, hinting tiling window manager to not tile it

This commit is contained in:
Rasmus Karlsson 2018-06-19 20:29:58 +00:00
parent e28bc805f6
commit e32841ab81
2 changed files with 4 additions and 2 deletions

View file

@ -1150,8 +1150,8 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const messages::Link &link
auto *userPopup = new UserInfoPopup;
userPopup->setData(user, this->channel_);
userPopup->setAttribute(Qt::WA_DeleteOnClose);
userPopup->move(QCursor::pos() -
QPoint(int(150 * this->getScale()), int(70 * this->getScale())));
QPoint offset(int(150 * this->getScale()), int(70 * this->getScale()));
userPopup->move(QCursor::pos() - offset);
userPopup->show();
qDebug() << "Clicked " << user << "s message";

View file

@ -28,6 +28,8 @@ UserInfoPopup::UserInfoPopup()
{
this->setStayInScreenRect(true);
this->setWindowFlag(Qt::Popup);
auto app = getApp();
auto layout = util::LayoutCreator<UserInfoPopup>(this).setLayoutType<QVBoxLayout>();