37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From: hanpinlong <hanpinlong@kylinos.cn>
|
|
Date: Sat, 14 Sep 2024 03:16:43 +0000
|
|
Subject: =?utf-8?q?!26_forward_the_property_to_the_window_handle_if_it_is_a?=
|
|
=?utf-8?q?_ukui=5Fsurface_property_Merge_pull_request_!26_from_=E5=88=98?=
|
|
=?utf-8?q?=E6=9D=B0/openkylin/nile?=
|
|
|
|
---
|
|
src/widgets/kernel/qwidget.cpp | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
|
|
index e7f03bb..69e0b00 100644
|
|
--- a/src/widgets/kernel/qwidget.cpp
|
|
+++ b/src/widgets/kernel/qwidget.cpp
|
|
@@ -1259,6 +1259,10 @@ void QWidgetPrivate::create()
|
|
for (const QByteArray &propertyName : dynamicPropertyNames) {
|
|
if (!qstrncmp(propertyName, "_q_platform_", 12))
|
|
win->setProperty(propertyName, q->property(propertyName));
|
|
+
|
|
+ // Forward the property to the window handle if it is a ukui_surface property
|
|
+ if (!qstrncmp(propertyName, "ukui_surface_", 13))
|
|
+ win->setProperty(propertyName, q->property(propertyName));
|
|
}
|
|
|
|
Qt::WindowFlags &flags = data.window_flags;
|
|
@@ -9102,6 +9106,10 @@ bool QWidget::event(QEvent *event)
|
|
}
|
|
if (windowHandle() && !qstrncmp(propName, "_q_platform_", 12))
|
|
windowHandle()->setProperty(propName, property(propName));
|
|
+
|
|
+ // Forward the property to the window handle if it is a ukui_surface property
|
|
+ if (windowHandle() && !qstrncmp(propName, "ukui_surface_", 13))
|
|
+ windowHandle()->setProperty(propName, property(propName));
|
|
Q_FALLTHROUGH();
|
|
}
|
|
#endif
|