Skip to content

Commit 41e5dbe

Browse files
tsic404deepin-bot[bot]
authored andcommitted
fix: unable to hide popup click twice on treeland
close popup later, beacause dock still get click event log: as title
1 parent d400622 commit 41e5dbe

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frame/popupwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void PopupWindow::mouseReleaseEvent(QMouseEvent *event)
1717
QQuickWindowQmlImpl::mouseReleaseEvent(event);
1818
auto rect = geometry();
1919
if (!m_dragging && !rect.contains(event->globalPosition().toPoint()) && type() == Qt::Popup) {
20-
close();
20+
QMetaObject::invokeMethod(this, &QWindow::close, Qt::QueuedConnection);
2121
}
2222
m_dragging = false;
2323
m_pressing = false;

panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ AppletItemButton {
4040
contentItem: Item {
4141
id: pluginItem
4242
property var plugin: DockCompositor.findSurface(model.surfaceId)
43-
implicitHeight: plugin.height
44-
implicitWidth: plugin.width
43+
implicitHeight: plugin?.height
44+
implicitWidth: plugin?.width
4545

4646
property var itemGlobalPoint: {
4747
var a = pluginItem

panels/dock/tray/quickpanel/PluginItem.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Control {
2727
anchors.fill: parent
2828
dragItem: root
2929
dragTextData: `${root.pluginId}::${root.itemKey}`
30-
fallbackIconSize: traySurface ? traySurface.size : Qt.size(16, 16)
30+
fallbackIconSize: traySurface ? Qt.size(traySurface.width, traySurface.height) : Qt.size(16, 16)
3131
enabledDrag: canDrag
3232
}
3333

0 commit comments

Comments
 (0)