mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
feat: 提示框添加ToolTip属性
wayland回合master,原始提交: https://gerrit.uniontech.com/c/dde-dock/+/1394 Log: 社区版适配wayland Task: https://pms.uniontech.com/zentao/task-view-81916.html Influence: wayland环境下提示框ToolTip属性 Change-Id: I499ef3ea01747104747e01c43b8b505d0c19fa2d
This commit is contained in:
parent
f95055e0b9
commit
153482248e
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "dockpopupwindow.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QScreen>
|
||||
#include <QApplication>
|
||||
@ -40,7 +41,12 @@ DockPopupWindow::DockPopupWindow(QWidget *parent)
|
||||
compositeChanged();
|
||||
|
||||
setWindowFlags(Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus);
|
||||
setAttribute(Qt::WA_InputMethodEnabled, false);
|
||||
if (Utils::IS_WAYLAND_DISPLAY) {
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
windowHandle()->setProperty("_d_dwayland_window-type", "tooltip");
|
||||
}else {
|
||||
setAttribute(Qt::WA_InputMethodEnabled, false);
|
||||
}
|
||||
|
||||
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &DockPopupWindow::compositeChanged);
|
||||
connect(m_regionInter, &DRegionMonitor::buttonPress, this, &DockPopupWindow::onGlobMouseRelease);
|
||||
|
@ -31,6 +31,8 @@ namespace Utils {
|
||||
|
||||
#define ICBC_CONF_FILE "/etc/deepin/icbc.conf"
|
||||
|
||||
const bool IS_WAYLAND_DISPLAY = !qgetenv("WAYLAND_DISPLAY").isEmpty();
|
||||
|
||||
/**
|
||||
* @brief SettingsPtr 根据给定信息返回一个QGSettings指针
|
||||
* @param schema_id The id of the schema
|
||||
|
Loading…
x
Reference in New Issue
Block a user