https://bugs.kde.org/show_bug.cgi?id=374224

--- Comment #28 from Tsu Jan <tsujan2...@gmail.com> ---
Much to my surprise, after playing with various codes, I found out that this is
really a QtCurve bug!

Let me summarize the problem and its new solution:

To make Qt windows translucent, we should set the surface format of their
native handles BEFORE they're created. For Qt4, that could be done in
"Style::polish()". But Qt5 windows are polished AFTER they're created.
Therefore, setting of "WA_TranslucentBackground" in "Style::polish()" would
have no effect with Qt5. Early creation of native handles (as is done by
QtCurve) could have unpredictable side effects -- for menus if not for windows
-- because we don't know how it would affect the complex process of widget
creation. However, setting of "WA_TranslucentBackground" in an early stage
BEFORE the widget creation sets the alpha buffer size to 8 automatically and
safely.

When I implemented this logic in Kvantum (offline for now), all problems, that
I'd considered as translucency bugs of Qt >= 5.7, were gone :)

Doing the same thing for QtCurve isn't so easy because it requires changing of
the code structure. (Fortunately, in Kvantum, I'd used "QSet<const QWidget*>"
to track translucent widgets.)

I don't know whether setting of "Qt::WA_TranslucentBackground" to "true" before
widget creation has the same effect on Mac too but if the answer is no, there
won't be a safe way to make Qt5 windows/menus translucent/rounded on Mac.

@RJVB
Thank you for this report, without which I wouldn't have enough motivation to
wrestle with this problem!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to