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
+2 -2
View File
@@ -1150,8 +1150,8 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const messages::Link &link
auto *userPopup = new UserInfoPopup; auto *userPopup = new UserInfoPopup;
userPopup->setData(user, this->channel_); userPopup->setData(user, this->channel_);
userPopup->setAttribute(Qt::WA_DeleteOnClose); userPopup->setAttribute(Qt::WA_DeleteOnClose);
userPopup->move(QCursor::pos() - QPoint offset(int(150 * this->getScale()), int(70 * this->getScale()));
QPoint(int(150 * this->getScale()), int(70 * this->getScale()))); userPopup->move(QCursor::pos() - offset);
userPopup->show(); userPopup->show();
qDebug() << "Clicked " << user << "s message"; qDebug() << "Clicked " << user << "s message";
+2
View File
@@ -28,6 +28,8 @@ UserInfoPopup::UserInfoPopup()
{ {
this->setStayInScreenRect(true); this->setStayInScreenRect(true);
this->setWindowFlag(Qt::Popup);
auto app = getApp(); auto app = getApp();
auto layout = util::LayoutCreator<UserInfoPopup>(this).setLayoutType<QVBoxLayout>(); auto layout = util::LayoutCreator<UserInfoPopup>(this).setLayoutType<QVBoxLayout>();