minor fixes of previous commit

This commit is contained in:
Yuhang Zhao 2022-12-16 10:48:38 +08:00
parent 5b36fe8a81
commit c3fa2f6920
3 changed files with 37 additions and 30 deletions

View File

@ -235,9 +235,9 @@ using gchararray = char *;
using gpointer = void *; using gpointer = void *;
using gint64 = int64_t; using gint64 = int64_t;
using guint64 = uint64_t; using guint64 = uint64_t;
using gsize = unsigned long; using gsize = unsigned int;
using GType = gsize; using GType = unsigned long;
using GValue = struct _GValue; using GValue = struct _GValue;
using GObject = struct _GObject; using GObject = struct _GObject;
using GClosure = struct _GClosure; using GClosure = struct _GClosure;

View File

@ -422,6 +422,13 @@ void FramelessWidgetsHelperPrivate::attach()
} }
m_window = window; m_window = window;
if (!window->testAttribute(Qt::WA_DontCreateNativeAncestors)) {
window->setAttribute(Qt::WA_DontCreateNativeAncestors);
}
if (!window->testAttribute(Qt::WA_NativeWindow)) {
window->setAttribute(Qt::WA_NativeWindow);
}
g_widgetsHelper()->mutex.lock(); g_widgetsHelper()->mutex.lock();
WidgetsHelperData * const data = getWindowDataMutable(); WidgetsHelperData * const data = getWindowDataMutable();
if (!data || data->ready) { if (!data || data->ready) {