[Windows] [>= Win10 1803] Dragging & Resizing is laggy when the Acrylic effect is enabled

It's a bug of Windows itself. Not fixable from my side.

Win7, Win8 and Win8.1 are not affected because only from Win10 1803 can the normal Win32 windows enable the Acrylic effect.

The only workaround for this issue is switching back to use the classic blur instead of the Acrylic effect, however, unfortunately, they don't look exactly the same.
Or maybe you can solve this in a pure Qt way: draw the blurred background yourself, through QPainter or whatever.

 We could freeze the background when moving and disable transparency until it's released?

We could freeze the background when moving and disable transparency until it's released?

I don't have much knowledge about the Acrylic effect. It's a bit beyond my limit.

Ok no problem
On Wed, 21 Oct, 2020, 6:30 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

We could freeze the background when moving and disable transparency until
it's released?
I don't have much knowledge about the Acrylic effect. It's a bit beyond my
limit.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-713225451,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVM2CPL3B3BD33KBRDLSLYXDHANCNFSM4STC7GBQ
.

Ok no problem

@SelastinGeorge You know how to fix the laggy dragging?

The only way to fix the laggy dragging in acrylic blur is to disable the transparency effect of windows 10 from the personalization settings

and that's a very bad move

i need to find a way to capture the visual behind a window and thats the only way to bring a perfectly working acrylic blur to win32 and wpf

and that's a very bad move

Very bad indeed.

there is one last option, use DWM blur behind capture the hwnd using directx, use gaussian blur from DirectX and redraw it to window

and its a very difficult task

Ah, so complex!

ya microsoft should fix this. have you tried xaml islands

we can use acrylic effect using xaml islands and it is not laggy but flickers a lot.

have you tried xaml islands

I know about it but I don't know whether I can integrate it with Qt or not. I haven't tried it yet. But I think it's not hard to use it in normal Win32 applications, Microsoft's Terminal is a good example.

but flickers a lot.

It's not caused by the xaml island I'm afraid. Maybe it can be solved by your WM_NCCALCSIZE trick.

no i tried it doesnt work

are you good at QT?
do you have any idea how to create a desktop environment using qt qml

no i tried it doesnt work

So sad.
I'm also wondering why the standard title bar doesn't flicker. It's drawn on the non-client area as what we do, but the title bar drawn by ourselves flicker a lot.

are you good at QT?

Not very bad at least. But not very professional as well.

create a desktop environment using qt qml

I don't quite understand what does it mean. Can you explain it more clearly?

ya windows keeps secrets. the won't let anyone to touch their source codes. if they would have published windows as opensource then windows 10 would be as better as linux.

ya windows keeps secrets. the won't let anyone to touch their source codes. if they would have published windows as opensource then windows 10 would be as better as linux.

Ha ha, sounds sensible.

are you good at QT?

Not very bad at least. But not very professional as well.

create a desktop environment using qt qml

I don't quite understand what does it mean. Can you explain it more clearly?

i mean like a gnome or sway, i was working on a project for creating an os,i finished building up the kernel and i was trying to build the desktop for my os. i have searched and found that it can be done using qtwayland.

but i don't know how to create a gridview in qml with multiple selection.
like this image, i need to select multiple items using the rectangle.

i was working on a project for creating an os

Wow, that's awesome!

i was trying to build the desktop for my os

Have you ever heard about the Deepin Desktop Environment (aka DDE) ? It's written in C++/Qt and it's open source. Maybe it can help you. Building a desktop is far beyond my limit😂

Or KDE? It's written in Qt as well.

ya but not fully qml. anyway i will check it out

the Deepin Desktop Environment (aka DDE)

Sorry, I forgot to write the link: https://github.com/linuxdeepin

but not fully qml

I don't think it makes sense to build a desktop environment entirely with QML, as QML is not as mature as Qt Widgets, and until Qt 5.15 there were still quite a few bugs. If only a few components use QML, this is a good choice.

This is far more complicated, let's just check our windows 10 acrylic blur itself. if i find a solution to implement acrylic blur i will let you know.
thank you.

if i find a solution to implement acrylic blur i will let you know.

Thanks!

The only way to fix the laggy dragging in acrylic blur is to disable the transparency effect of windows 10 from the personalization settings

Yes it fixed the laggy dragging indeed. But the resizing is also very laggy and can't be fixed in this way.
But I have an interesting finding: although I have turned off the transparency effect in the personalization settings, our own Acrylic effect is not affected by it -> it still has the transparency effect. But the dragging is not laggy anymore.
Could this be a breakthrough point?

Ya it wont affect our acrylic effect. i noticed it before and that's why i mentioned it earlier

Maybe there are some APIs (even undocumented APIs) to adjust this, just like SetWindowCompositionAttribute?

yes there might be.

@SelastinGeorge See here for more detailed discussion. No solutions yet but at least why the window laggs is known.

@wangwenx190, We have got a good lead, check out this
SetWindowDisplayAffinity
there is a new DWORD value added to this function called WDA_EXCLUDEFROMCAPTURE , this one help us to exclude a window from screen capture, which means we will be able to capture the visual behind window by just capturing the area where window is placed. now i'm currently working to integrate it.

@wangwenx190, We have got a good lead, check out this
SetWindowDisplayAffinity
there is a new DWORD value added to this function called WDA_EXCLUDEFROMCAPTURE , this one help us to exclude a window from screen capture, which means we will be able to capture the visual behind window by just capturing the area where window is placed. now i'm currently working to integrate it.

It’s introduced in win10 2004. Isn’t this too new?

ya but that's the only hope

well i ran into a new problem. it is really tough to understand the dxgi desktop duplication code. it captures the entire desktop. i need to get only the part where my window is placed

ya but that's the only hope

You are right. Let’s fix the issue first.

well i ran into a new problem. it is really tough to understand the dxgi desktop duplication code. it captures the entire desktop. i need to get only the part where my window is placed

https://github.com/robmikh/Win32CaptureSample
https://github.com/robmikh/CaptureGifEncoder
https://github.com/robmikh/SimpleRecorder
They show how to use dxgi to capture windows.

all of these uses winrt and it's well complicated than desktop duplication

any way i'm posting a question in stack overflow i think some one will help us.

I just tried today on my latest insider build and moving isn't laggy anymore. I have not tried for a while on that computer so I can't they exactly when it was fixed.

Ya i have seen some post stating the same thing that the acrylic blur is
working in insider builds. But they haven't yet rolled it into production.
On Sat, 14 Nov, 2020, 3:32 pm Julien<EMAIL_ADDRESS>wrote:

I just tried today on my latest insider build and moving isn't laggy
anymore. I have not tried for a while on that computer so I can't they
exactly when it was fixed.
[image: image]
https://user-images.githubusercontent.com/182520/99144759-d7912500-2668-11eb-891c-75f3e6ad2941.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-727179002,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVOKSMUF2GXDFFUP4QLSPZITFANCNFSM4STC7GBQ
.

@JulienMaille  @SelastinGeorge  Great news! Thanks for telling me about this!

Ya i have seen some post stating the same thing that the acrylic blur is working in insider builds. But they haven't yet rolled it into production.
…
On Sat, 14 Nov, 2020, 3:32 pm Julien, @.***> wrote: I just tried today on my latest insider build and moving isn't laggy anymore. I have not tried for a while on that computer so I can't they exactly when it was fixed. [image: image] https://user-images.githubusercontent.com/182520/99144759-d7912500-2668-11eb-891c-75f3e6ad2941.png — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#27 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKGWVOKSMUF2GXDFFUP4QLSPZITFANCNFSM4STC7GBQ .

would be nice to know if we can ship a specific dll in the meantime, or if its a much deeper system fix

the gif doesn't show it so well, but it's smooth

Thanks! Looks awesome!

we can ship a specific dll in the meantime

I think it's dangerous. Better to wait for the official fix.

we can ship a specific dll in the meantime

I think it's dangerous. Better to wait for the official fix.

Can you share the links where you've seen other people stating latest insider build has the fix?

I have seen here, people are telling that the acrylic blur is not lag in
under builds.
https://github.com/Eugeny/terminus/issues/949
I think the only current way or the better way is to use the xaml islands
On Sat, 14 Nov, 2020, 7:16 pm Julien<EMAIL_ADDRESS>wrote:

we can ship a specific dll in the meantime
I think it's dangerous. Better to wait for the official fix.
Can you share the links where you've seen other people stating latest
insider build has the fix?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-727209560,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVOAQUPXZD465DJ77GDSP2C4XANCNFSM4STC7GBQ
.

@wangwenx190 bad news: resizing is still laggy!

@wangwenx190 bad news: resizing is still laggy!

Previously we can work-around the laggy dragging by disabling the transparent effect, but the resizing is still laggy. So I'm not surprised.

I think the only current way or the better way is to use the xaml islands

@SelastinGeorge Yes, it is. The best way to use the Acrylic brush in Win32 applications is to use the xaml islands, and that's what Microsoft recommended. There's no laggy dragging and resizing issue when using xaml islands. But for this repo, we are using Qt, and it's rather hard to integrate Qt with xaml islands.

@wangwenx190 did u get flickering while resizing the window on window 10 19042. when i alter the WM_NCCALCSIZE. it flickers one or two times. so i come up with a new way by altering the hbrush of the window class. its perfect and does not flicker at all.
In the 1903 build the dwmExtendFrame... creates a 8px margin around window while maximizing. you can fix this issue also by altering the hbrush of window in createwindowex

i'm doing this in wpf. i was not able to alter the window class in wpf but i altered it by using the setWindowCompositionAttribute(). its undocumented but altering some values bring better options like if we set AccentState to 6 we get a completely transparent window. and a very good news is that from 19042 the acrylic blur is not flickering from this sample:
https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect

@wangwenx190 did u get flickering while resizing the window on window 10 19042. when i alter the WM_NCCALCSIZE. it flickers one or two times. so i come up with a new way by altering the hbrush of the window class. its perfect and does not flicker at all.
In the 1903 build the dwmExtendFrame... creates a 8px margin around window while maximizing. you can fix this issue also by altering the hbrush of window in createwindowex

Thanks for telling me this. Your solution may work well for normal windows, however, things are a lot different in Qt. Qt has taken over the responsibility of painting windows. Adjust the brush may not help.

i'm doing this in wpf. i was not able to alter the window class in wpf but i altered it by using the setWindowCompositionAttribute(). its undocumented but altering some values bring better options like if we set AccentState to 6 we get a completely transparent window. and a very good news is that from 19042 the acrylic blur is not flickering from this sample:
https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect

That’s a good news indeed! Thanks for telling me this!

@wangwenx190 did u get flickering while resizing the window on window 10 19042. when i alter the WM_NCCALCSIZE. it flickers one or two times. so i come up with a new way by altering the hbrush of the window class. its perfect and does not flicker at all.
In the 1903 build the dwmExtendFrame... creates a 8px margin around window while maximizing. you can fix this issue also by altering the hbrush of window in createwindowex

Thanks for telling me this. Your solution may work well for normal windows, however, things are a lot different in Qt. Qt has taken over the responsibility of painting windows. Adjust the brush may not help.

Have you tried using WS_EX_NOREDIRECTIONBITMAP in window style. In win32 it removes the content which is drawn using WM_PAINT,  but since wpf uses directx we get a fully transparent window with system borders and shadow (it's the perfect window) and is used by UWP Apps. (i inspected using spy++). May be Qt can also do the same thing.

@wangwenx190 did u get flickering while resizing the window on window 10 19042. when i alter the WM_NCCALCSIZE. it flickers one or two times. so i come up with a new way by altering the hbrush of the window class. its perfect and does not flicker at all.
In the 1903 build the dwmExtendFrame... creates a 8px margin around window while maximizing. you can fix this issue also by altering the hbrush of window in createwindowex

Thanks for telling me this. Your solution may work well for normal windows, however, things are a lot different in Qt. Qt has taken over the responsibility of painting windows. Adjust the brush may not help.

Have you tried using WS_EX_NOREDIRECTIONBITMAP in window style. In win32 it removes the content which is drawn using WM_PAINT, but since wpf uses directx we get a fully transparent window with system borders and shadow (it's the perfect window) and is used by UWP Apps. (i inspected using spy++). May be Qt can also do the same thing.

Yes I've tried that style once, but it doesn't work for Qt. I still got a normal window, nothing changed. But it does work as expected in pure Win32 projects. I tested it in a normal Win32 window and it become totally transparent indeed. I guess Qt doesn't paint in WM_PAINT.

Go the awkward way. In set window composition attribute insted of
ACRYLIC_BLUR_BEHIND use the value as 6(create a new enum value with value
as 6). It is same as redirection bitmap....
On Sat, 28 Nov, 2020, 5:05 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

@wangwenx190 https://github.com/wangwenx190 did u get flickering while
resizing the window on window 10 19042. when i alter the WM_NCCALCSIZE. it
flickers one or two times. so i come up with a new way by altering the
hbrush of the window class. its perfect and does not flicker at all.
In the 1903 build the dwmExtendFrame... creates a 8px margin around window
while maximizing. you can fix this issue also by altering the hbrush of
window in createwindowex
Thanks for telling me this. Your solution may work well for normal
windows, however, things are a lot different in Qt. Qt has taken over the
responsibility of painting windows. Adjust the brush may not help.
Have you tried using WS_EX_NOREDIRECTIONBITMAP in window style. In win32
it removes the content which is drawn using WM_PAINT, but since wpf uses
directx we get a fully transparent window with system borders and shadow
(it's the perfect window) and is used by UWP Apps. (i inspected using
spy++). May be Qt can also do the same thing.
Yes I've tried that style once, but it doesn't work for Qt. I still got a
normal window, nothing changed. But it does work as expected in pure Win32
projects. I tested it in a normal Win32 window and it become totally
transparent indeed. I guess Qt doesn't paint in WM_PAINT.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-735220118,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVIZ2CPHB65WUYROI7TSSDN73ANCNFSM4STC7GBQ
.

like this :
private enum AccentState
{
ACCENT_DISABLED = 0,
ACCENT_ENABLE_GRADIENT = 1,
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
ACCENT_ENABLE_BLURBEHIND = 3,
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4,
ACCENT_INVALID_STATE = 5,
ACCENT_DISABLE_REDIRECTIONBITMAP=6
}

The WS_EX_NOREDIRECTIONBITMAP can only be used with CreateWindowEx(). it won't work while using the SetWindowLong()

Quick update, with latest insider build, moving is still ok while resizing is laggy.
The lag when resizing is growing the longer you keep dragging. It really feels like repaint are buffered and processed slower than they are generated. Is there anything that could be done to repaint at a slower rate?

I don't think there is a way until Microsoft release the source for the
compositor which is used in windows 10.
On Sun, 13 Dec, 2020, 6:06 pm Julien<EMAIL_ADDRESS>wrote:

Quick update, with latest insider build, moving is still ok while resizing
is laggy.
The lag when resizing is growing the longer you keep dragging. It really
feels like repaint are buffered and processed slower than they are
generated. Is there anything that could be done to repaint at a slower rate?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-744001617,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJWNUPXSTQYNNPB7N3SUSYNXANCNFSM4STC7GBQ
.

I'm not sure whether there's an appropriate workaround or not.

I prefer waiting for Microsoft to fix the bug officially, although it may be a very long time (and it already is). There are no good workarounds currently in my point of view.

anything interesting in this PR?
https://github.com/qt/qtbase/pull/44/files

anything interesting in this PR?
https://github.com/qt/qtbase/pull/44/files

Not quite sure.

Monthly update: got insider build 21292.1000 and resizing is still laggy

Monthly update: got insider build 21292.1000 and resizing is still laggy

They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does
On Thu, 14 Jan, 2021, 2:17 am Julien<EMAIL_ADDRESS>wrote:

Monthly update: got insider build 21292.1000 and resizing is still laggy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-759729825,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVOXB37VDCPA5KZFRO3SZYBHZANCNFSM4STC7GBQ
.

They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does
On Thu, 14 Jan, 2021, 2:17 am Julien<EMAIL_ADDRESS>wrote:

Monthly update: got insider build 21292.1000 and resizing is still laggy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-759729825,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVOXB37VDCPA5KZFRO3SZYBHZANCNFSM4STC7GBQ
.

Monthly update: got insider build 21292.1000 and resizing is still laggy

@JulienMaille  Thanks for your information!

They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does

@SelastinGeorge  Maybe you are right, but at least the moving is not laggy any more.

Monthly update: got insider build 21292.1000 and resizing is still laggy

@JulienMaille  Thanks for your information!

They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does

@SelastinGeorge  Maybe you are right, but at least the moving is not laggy any more.

 ,I am working on new acrylic blur effect which is not laggy
check this out:
https://youtu.be/V-G8s-ol6p4
On Fri, 15 Jan, 2021, 7:34 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

Monthly update: got insider build 21292.1000 and resizing is still laggy
@JulienMaille https://github.com/JulienMaille Thanks for your
information!
They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does
@SelastinGeorge https://github.com/SelastinGeorge Maybe you are right,
but at least the moving is not laggy any more.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-760595463,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPDL3QIZXSNFZWFSFTSZ6PEDANCNFSM4STC7GBQ
.

 ,I am working on new acrylic blur effect which is not laggy
check this out:
https://youtu.be/V-G8s-ol6p4
On Fri, 15 Jan, 2021, 7:34 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

Monthly update: got insider build 21292.1000 and resizing is still laggy
@JulienMaille https://github.com/JulienMaille Thanks for your
information!
They are not going to fix this issue any sooner, because there is already a
work around using xaml islands. Like microsoft terminal does
@SelastinGeorge https://github.com/SelastinGeorge Maybe you are right,
but at least the moving is not laggy any more.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-760595463,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPDL3QIZXSNFZWFSFTSZ6PEDANCNFSM4STC7GBQ
.

 ,I am working on new acrylic blur effect which is not laggy check this out: https://youtu.be/V-G8s-ol6p4
…
On Fri, 15 Jan, 2021, 7:34 am Yuhang Zhao, @.***> wrote: Monthly update: got insider build 21292.1000 and resizing is still laggy @JulienMaille https://github.com/JulienMaille Thanks for your information! They are not going to fix this issue any sooner, because there is already a work around using xaml islands. Like microsoft terminal does @SelastinGeorge https://github.com/SelastinGeorge Maybe you are right, but at least the moving is not laggy any more. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#27 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKGWVPDL3QIZXSNFZWFSFTSZ6PEDANCNFSM4STC7GBQ .

It looks quite impressive! How do you achieve that? Is it pure C++ or based on WPF/.NET?

 ,I am working on new acrylic blur effect which is not laggy check this out: https://youtu.be/V-G8s-ol6p4
…
On Fri, 15 Jan, 2021, 7:34 am Yuhang Zhao, @.***> wrote: Monthly update: got insider build 21292.1000 and resizing is still laggy @JulienMaille https://github.com/JulienMaille Thanks for your information! They are not going to fix this issue any sooner, because there is already a work around using xaml islands. Like microsoft terminal does @SelastinGeorge https://github.com/SelastinGeorge Maybe you are right, but at least the moving is not laggy any more. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#27 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKGWVPDL3QIZXSNFZWFSFTSZ6PEDANCNFSM4STC7GBQ .

It looks quite impressive! How do you achieve that? Is it pure C++ or based on WPF/.NET?

yes its completely working on c++ but i can port it to WPF, it uses direct composition and uses desktop wallpaper as blur input(instead of Host backdrop), later I am going to get the host backdrop using desktop duplication with WDA_EXCLUDEFROMCAPTURE.
Still it's not perfect it in the video above the window is moved along with cursor but if I try dragging the window the blur will start to flicker like this https://youtu.be/bAKCRQdNLjc and that's weird. it is something related to some mathematical calculation I don't know where is the mistake. i have spend a lot of time in it and still no result. now I'm still working on it.

yes its completely working on c++ but i can port it to WPF, it uses direct composition and uses desktop wallpaper as blur input(instead of Host backdrop), later I am going to get the host backdrop using desktop duplication with WDA_EXCLUDEFROMCAPTURE.
Still it's not perfect it in the video above the window is moved along with cursor but if I try dragging the window the blur will start to flicker like this https://youtu.be/bAKCRQdNLjc and that's weird. it is something related to some mathematical calculation I don't know where is the mistake. i have spend a lot of time in it and still no result. now I'm still working on it.

yes its completely working on c++ but i can port it to WPF, it uses direct composition and uses desktop wallpaper as blur input(instead of Host backdrop), later I am going to get the host backdrop using desktop duplication with WDA_EXCLUDEFROMCAPTURE.
Still it's not perfect it in the video above the window is moved along with cursor but if I try dragging the window the blur will start to flicker like this https://youtu.be/bAKCRQdNLjc and that's weird. it is something related to some mathematical calculation I don't know where is the mistake. i have spend a lot of time in it and still no result. now I'm still working on it.

@SelastinGeorge Thanks for your impressive work! I'm looking forward to your final solution! May I ask will it be open source?

yes its completely working on c++ but i can port it to WPF, it uses direct composition and uses desktop wallpaper as blur input(instead of Host backdrop), later I am going to get the host backdrop using desktop duplication with WDA_EXCLUDEFROMCAPTURE.
Still it's not perfect it in the video above the window is moved along with cursor but if I try dragging the window the blur will start to flicker like this https://youtu.be/bAKCRQdNLjc and that's weird. it is something related to some mathematical calculation I don't know where is the mistake. i have spend a lot of time in it and still no result. now I'm still working on it.

@SelastinGeorge Thanks for your impressive work! I'm looking forward to your final solution! May I ask will it be open source?

yes of course it will be opensource. I know how hard is to find something like this in internet. I will share the complete source code once it is ready.

yes of course it will be opensource. I know how hard is to find something like this in internet. I will share the complete source code once it is ready.

but i need more time to fix these issues. till then everyone can use this https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a c++ version of it but i would like to build it

but i need more time to fix these issues. till then everyone can use this https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a c++ version of it but i would like to build it

but i need more time to fix these issues. till then everyone can use this https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a c++ version of it but i would like to build it

I'm afriad of it's using some WPF specific technique to avoid laggy. I would like to help you but sadly I'm not able to convert it to C++.

but i need more time to fix these issues. till then everyone can use this https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a c++ version of it but i would like to build it

I'm afriad of it's using some WPF specific technique to avoid laggy. I would like to help you but sadly I'm not able to convert it to C++.

No it is not using anything from wpf, it's completely built using winrt c++
but they haven't published the code for c++ version.
Winrt is like a new version of direct composition that I used in the demo I
showed you.
It's difficult to work with winrt, almost all time the code intellisense of
vs2019 is disabled and no suggestions are available.so it shows errors but
when compiling it build successfully.
On Fri, 15 Jan, 2021, 10:02 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

but i need more time to fix these issues. till then everyone can use this
https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a
c++ version of it but i would like to build it
I'm afriad of it's using some WPF specific technique to avoid laggy. I
would like to help you but sadly I'm not able to convert it to C++.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-760638388,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVLIJCRYAT2RR5FE2LTSZ7AMXANCNFSM4STC7GBQ
.

No it is not using anything from wpf, it's completely built using winrt c++
but they haven't published the code for c++ version.
Winrt is like a new version of direct composition that I used in the demo I
showed you.
It's difficult to work with winrt, almost all time the code intellisense of
vs2019 is disabled and no suggestions are available.so it shows errors but
when compiling it build successfully.
On Fri, 15 Jan, 2021, 10:02 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

but i need more time to fix these issues. till then everyone can use this
https://github.com/Microsoft/Windows.UI.Composition-Win32-Samples/tree/master/dotnet/WPF/AcrylicEffect
this one is not laggy anymore.its working fine in my system, i dont have a
c++ version of it but i would like to build it
I'm afriad of it's using some WPF specific technique to avoid laggy. I
would like to help you but sadly I'm not able to convert it to C++.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-760638388,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVLIJCRYAT2RR5FE2LTSZ7AMXANCNFSM4STC7GBQ
.

Monthly update: got insider build 21292.1000 and resizing is still laggy

@JulienMaille I think we should not count on this undocumented function anymore. Even if Microsoft fixed it some day in the future, it will require a very recent version of Windows 10, which I think is not acceptable. And it's undocumented API after all, it may become unstable or even totally unusable in the future. I think the best solution is to simulate the Acrylic effect ourself. Let's wait for @SelastinGeorge 's great work.

Monthly update: got insider build 21292.1000 and resizing is still laggy

@JulienMaille I think we should not count on this undocumented function anymore. Even if Microsoft fixed it some day in the future, it will require a very recent version of Windows 10, which I think is not acceptable. And it's undocumented API after all, it may become unstable or even totally unusable in the future. I think the best solution is to simulate the Acrylic effect ourself. Let's wait for @SelastinGeorge 's great work.

Well i ran into another problem, i was able to build the acrylic effect with best quality and no flicker.
Here is the video : https://youtu.be/_SV-s4Q4O1s
(in video it flickers because i was capturing using obs and i have less ram, but it doesn't flicker if obs is off)
but the problem is will not be able to draw anything into the window. whatever i draw in window will be overlapped by the blur resulting this :

i know why does this happen but there is no way i could solve this.
Actually the acrylic i built is rendered by direct composition and direct composition always draws only at the top of the window.
And i reached another dead end.......

Well i ran into another problem, i was able to build the acrylic effect with best quality and no flicker.
Here is the video : https://youtu.be/_SV-s4Q4O1s
(in video it flickers because i was capturing using obs and i have less ram, but it doesn't flicker if obs is off)
but the problem is will not be able to draw anything into the window. whatever i draw in window will be overlapped by the blur resulting this :

i know why does this happen but there is no way i could solve this.
Actually the acrylic i built is rendered by direct composition and direct composition always draws only at the top of the window.
And i reached another dead end.......

here is the zip for executeable :
Uploading Debug.zip…

here is the zip for executeable :
Uploading Debug.zip…

Here is the executable : https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c

Here is the executable : https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c

Here is the executable : https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c

It's really impressive! But I don't understand why you can't draw anything on that window. Isn't it an official demo provided by Microsoft? If it has such a severe issue, it would have been fixed by MS already.

Here is the executable : https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c

It's really impressive! But I don't understand why you can't draw anything on that window. Isn't it an official demo provided by Microsoft? If it has such a severe issue, it would have been fixed by MS already.

I have edited their samples and tried out but no luck. The direct
composition always draw on top of the window like the dwm thumbnail does.
In uwp they have been drawing everything in window using direct composition
so there is no issue. In the case of wpf no luck.
On Thu, 21 Jan, 2021, 7:05 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

Here is the executable :
https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c
It's really impressive! But I don't understand why you can't draw anything
on that window. Isn't it an official demo provided by Microsoft? If it has
such a severe issue, it would have been fixed by MS already.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-764646390,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPZQAWRL7VHTBX5POLS3AUTHANCNFSM4STC7GBQ
.

I have edited their samples and tried out but no luck. The direct
composition always draw on top of the window like the dwm thumbnail does.
In uwp they have been drawing everything in window using direct composition
so there is no issue. In the case of wpf no luck.
On Thu, 21 Jan, 2021, 7:05 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

Here is the executable :
https://firebasestorage.googleapis.com/v0/b/quizbox-f1bb1.appspot.com/o/Debug.zip?alt=media&token=c34323a4-82d0-4064-b74a-d467bef16a6c
It's really impressive! But I don't understand why you can't draw anything
on that window. Isn't it an official demo provided by Microsoft? If it has
such a severe issue, it would have been fixed by MS already.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-764646390,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPZQAWRL7VHTBX5POLS3AUTHANCNFSM4STC7GBQ
.

I have edited their samples and tried out but no luck. The direct composition always draw on top of the window like the dwm thumbnail does. In uwp they have been drawing everything in window using direct composition so there is no issue. In the case of wpf no luck.

Oh, that's too bad!

I have edited their samples and tried out but no luck. The direct composition always draw on top of the window like the dwm thumbnail does. In uwp they have been drawing everything in window using direct composition so there is no issue. In the case of wpf no luck.

Oh, that's too bad!

@JulienMaille @SelastinGeorge I have bought QtitanRibbon's source code from Developer Machines, and they are achieveing this by acquiring the wallpaper and blurring it, the appearance is not very bad but I think the performance will not be good, and honestly, the appearance is not very good as well. And it has some issues when running on Windows 7. According to the license I can't show you the source code, but it's not much code, they are using Qt Graphic Effect to do this.

In normal win32 I have done this using direct composition and dwmflush()
function. It was working well but the problem was windows airspace issue
when I use it in another places such as wpf , I won't be able to draw
anything on top of the window. Every content is drawn under the window
On Tue, 23 Feb, 2021, 6:26 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

@JulienMaille https://github.com/JulienMaille @SelastinGeorge
https://github.com/SelastinGeorge I have bought QtitanRibbon
https://www.devmachines.com/qtitanribbon-overview.html's source code
from Developer Machines, and they are achieveing this by acquiring the
wallpaper and blurring it, the appearance is not very bad but I think the
performance will not be good, and honestly, the appearance is not very good
as well. And it has some issues when running on Windows 7. According to the
license I can't show you the source code, but it's not much code, they are
using Qt Graphic Effect to do this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-784181929,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMLJADGI3EKH5CAPX3TAOQYHANCNFSM4STC7GBQ
.

In normal win32 I have done this using direct composition and dwmflush() function. It was working well but the problem was windows airspace issue when I use it in another places such as wpf , I won't be able to draw anything on top of the window. Every content is drawn under the window

Yes I know, you have told me about this.

@JulienMaille @SelastinGeorge I have bought QtitanRibbon's source code from Developer Machines

That's what I call dedication! Too bad it wasn't worth it. Are you still working on an official Qt patch of this repository?

Too bad it wasn't worth it.

It was not too bad actually. Although their home made acrylic effect is not perfect, I still learned a lot from their source code.

Are you still working on an official Qt patch of this repository?

Yes but the situation now is a bit awkward. In the very beginning, I was trying to introduce a totally new feature called "WindowChrome", I was just adding new stuff to Qt, not modifying any of its original code. It mostly works on Windows because I'm not professional on Linux and macOS. But after some discussions with Qt engineers, I decided to simplify the patch. The reason why we have to write so many code on Windows is we can't use the "Qt::FramelessWindowHint" flag provided by Qt. I tried that flag on Linux KDE and it works fine, the frame shadow is still there, and the animations of windows when they are maximizing or minimizing are preserved as well. So I guess it's a Windows-only issue. The patch now only modified QPA's source code to let Qt::FramelessWindowHint works like other platforms. The code is quite simple, but some unit tests failed so it can't be merged. However I'm not familiar with Qt's unit tests, so the process stuck there.
The patch for Qt: https://codereview.qt-project.org/c/qt/qtbase/+/325649

@JulienMaille I'm currently working on a private repository to emulate the acrylic effect base on QtitanRibbon's solution. Once it's done, I'll let you know. It's not a simple copy-and-paste so I think there will not be license issues.

Thanks, yes I'd be happy to see how you can emulate it!

Thanks, yes I'd be happy to see how you can emulate it!

Good news: making good progress. Bad news: maybe lack support for Linux.

@JulienMaille @SelastinGeorge The Acrylic Effect has been added to the master branch. You can test it now. Feel free to open new issues if you find anything not correct. It currently only supports Windows 7~10. Support for Linux and macOS may be added later.

@JulienMaille @SelastinGeorge The Acrylic Effect has been added to the master branch. You can test it now. Feel free to open new issues if you find anything not correct. It currently only supports Windows 7~10. Support for Linux and macOS may be added later.

can you please post a link to the exe file of that example. i haven't installed QT

can you please post a link to the exe file of that example. i haven't installed QT

@SelastinGeorge  No problem. But how can I send it to you? I have no access to any Google-related services.

just upload it to any links such as onedrive,dropbox,mediafire any one of them or anyplace where i could download the file

just upload it to any links such as onedrive,dropbox,mediafire any one of them or anyplace where i could download the file

It's really hard for me to access these services due to some special reasons. Can I send you an e-mail instead?

yes for sure send it here<EMAIL_ADDRESS>

The code that you have done looks similar to mine. you have also done it using something similar to DirectX,win2d but the QT Way to paint and clip the background. in your case you can directly paint it to any place or in any layer of window. but i was unlucky, the only way for me to paint is on top of every controls.

The code that you have done looks similar to mine. you have also done it using something similar to DirectX,win2d but the QT Way to paint and clip the background. in your case you can directly paint it to any place or in any layer of window. but i was unlucky, the only way for me to paint is on top of every controls.

Yes, it's very easy to paint in Qt. I'm compiling the project now, I'll send you the e-mail in a few minutes.

Ok thankyou very much
On Mon, 8 Mar, 2021, 12:49 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

The code that you have done looks similar to mine. you have also done it
using something similar to DirectX,win2d but the QT Way to paint and clip
the background. in your case you can directly paint it to any place or in
any layer of window. but i was unlucky, the only way for me to paint is on
top of every controls.
Yes, it's very easy to paint in Qt. I'm compiling the project now, I'll
send you the e-mail in a few minutes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792532467,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJHURU5YLD34LA2PU3TCR3BXANCNFSM4STC7GBQ
.

@SelastinGeorge Sadly the e-mail I sent to you has been rejected. Maybe it's caused by it's Google's service. I can't access any google related things in my country. Do you have another e-mail?

ok just 5 mins , can you send it to outlook
On Mon, Mar 8, 2021 at 1:07 PM Yuhang Zhao<EMAIL_ADDRESS>wrote:

@SelastinGeorge https://github.com/SelastinGeorge Sadly the e-mail I
sent to you has been rejected. Maybe it's caused by it's Google's service.
I can't access any google related things in my country. Do you have another
e-mail?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792542520,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVKHUR6ADHABCLIHFRDTCR5EXANCNFSM4STC7GBQ
.

send it to<EMAIL_ADDRESS>On Mon, Mar 8, 2021 at 1:10 PM Selastin George<EMAIL_ADDRESS>wrote:

ok just 5 mins , can you send it to outlook
On Mon, Mar 8, 2021 at 1:07 PM Yuhang Zhao<EMAIL_ADDRESS>wrote:

@SelastinGeorge https://github.com/SelastinGeorge Sadly the e-mail I
sent to you has been rejected. Maybe it's caused by it's Google's service.
I can't access any google related things in my country. Do you have another
e-mail?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792542520,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVKHUR6ADHABCLIHFRDTCR5EXANCNFSM4STC7GBQ
.

Thankyou i have received it

Thankyou i have received it

There are some small issues if you are running Widget.exe. To get the best appearance,  run Quick.exe instead.

Ok
On Mon, 8 Mar, 2021, 1:27 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

Thankyou i have received it
There are some small issues if you are running Widget.exe. To get the best
appearance, run Quick.exe instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792553994,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMUT273KMS7YN3QZCTTCR7PTANCNFSM4STC7GBQ
.

This looks like ordinary dwm blur behind in my desktop. its not taking my wallpaper

its not taking my wallpaper

Yes, I only blur the wallpaper when running on Windows 7. Since you are installing Qt, you can modify the source code to blur the desktop wallpaper unconditionally to see the difference between them.

ok, i will try it out, Thankyou

ok, i will try it out, Thankyou

https://github.com/wangwenx190/framelesshelper/blob/07290f9aeb9a00dc4fef29541f1d86eed271b2f2/utilities.cpp#L452
Let the function always return false to enable wallpaper blurring all the time.

But you are installing Qt 5.9, which is kind of old, I'm not sure whether this repo can be compiled or not. If you encounter with any compilation issues, just open new issues on GitHub and I'll fix them right away.

It's been a long time I've not played with this repo. What's the right way to properly compile examples with qmake?

What's the right way to properly compile examples with qmake?

Just open framelesshelper.pro and compile. The demo application will be built automatically.

All I get now is widget.exe (I don't have QtQuick on my system)

Because you don't have Qt Quick modules available, the Qt Quick example can't be built.

which doesn't look like the acrylic blur

On Windows 7, 8 and 8.1 I'm bluring the wallpaper which looks very similar to the Acrylic blur, but the only disadvantage is the window's background won't change while the window is being moved, in one word, you can't see what's behind the window. On Windows 10 I'm trying to show the contents behind the window but sadly the appearance is not very similar to the Acrylic blur, although I've tried my best to emulate it. I'll update the code to blur the wallpaper unconditionally to get the best appearance.

You can add it as a option to use dwm blur or the wallpaper blur
On Mon, 8 Mar, 2021, 5:26 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

What's the right way to properly compile examples with qmake?
Just open framelesshelper.pro and compile. The demo application will be
built automatically.
All I get now is widget.exe (I don't have QtQuick on my system)
Because you don't have Qt Quick modules available, the Qt Quick example
can't be built.
which doesn't look like the acrylic blur
On Windows 7, 8 and 8.1 I'm bluring the wallpaper which looks very similar
to the Acrylic blur, but the only disadvantage is the window's background
won't change while the window is being moved, in one word, you can't see
what's behind the window. On Windows 10 I'm trying to show the contents
behind the window but sadly the appearance is not very similar to the
Acrylic blur, although I've tried my best to emulate it. I'll update the
code to blur the wallpaper unconditionally to get the best appearance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792706790,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMKR3VAHWLPDFUCLGTTCS3QHANCNFSM4STC7GBQ
.

You can add it as a option to use dwm blur or the wallpaper blur

Yes, I'm adding this feature.

Ok thank you.
On Mon, 8 Mar, 2021, 5:32 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

You can add it as a option to use dwm blur or the wallpaper blur
Yes, I'm adding this feature.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-792710046,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPU3U4BFBPRJ5GSJFDTCS4G7ANCNFSM4STC7GBQ
.

I was surprised to see you removed all other examples (which were nice).
On Win10, why can't you use the real acrylic blur, and switch to your own only when dragging/resizing?

@JulienMaille  @SelastinGeorge  New code uploaded. Now the wallpaper blur is the default. You can switch to the traditional DWM blur by setting the environment variable _FRAMELESSHELPER_FORCE_DWM_BLUR or _FRAMELESSHELPER_FORCE_DISABLE_WALLPAPER_BLUR to 1 or true.

It can't be changed at run time, so you have to re-run the application once you set these variables. Technically it can be changed at run time indeed, but I think it's not necessary unless for testing purposes.

@JulienMaille

I was surprised to see you removed all other examples (which were nice).

I thought they were not nice enough so I removed them, I can add them back if you think they are good examples.

On Win10, why can't you use the real acrylic blur, and switch to your own only when dragging/resizing?

Sounds like a plan but I have not tried it yet. Last week I was busy implementing this new blur feature. I spent almost all of my spare time on this repo. I will try to implement the feature you said, but maybe from next week because I really need a break from this. And I'm not sure the switch of the two different blur can be smooth enough.

I liked the Win32Demo which allowed testing many options. But this is your repo (and you free time) some please have it your own way!

which qt version do you use to compile the project?

which qt version do you use to compile the project?

i downloaded the wrong version.(i didn't notice that this version was old)

which qt version do you use to compile the project?

i downloaded the wrong version.(i didn't notice that this version was old)

Any Qt5 versions should be fine, but I personally suggest use the last version of Qt5, 5.15.2, but 5.9 is not very old, it should compile and run normally. If you have any compilation issues, just open new issues on GitHub, I'll fix them right away.

@JulienMaille

I liked the Win32Demo which allowed testing many options.

Yes, indeed. I'll add another similar example later. The Win32Demo project won't come back because so many things are changed.

Do you have a shareable example with a menu within the titlebar like this one?

Currently, no, but I can add one later. The original example doesn't have a real menu either. In the new example, I'll try to add a real menu to the title bar.

On Win10, why can't you use the real acrylic blur, and switch to your own only when dragging/resizing?

After some deeper thinking, I decided not to do this. The real Acrylic blur will cause resizing and dragging become laggy, so you are suggesting only use it when the window is not being resized or moved, however, in that situation, it actually becomes some kind of static blur, the same with our home-made one, then why not just use our home-made blur all the time? If you really want to use your original plan, please persuade me, in detail.

It was not identifying qsize type, since it was introduced in layer versions
On Tue, 9 Mar, 2021, 6:06 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

which qt version do you use to compile the project?
i downloaded the wrong version.(i didn't notice that this version was old)
Any Qt5 versions should be fine, but I personally suggest use the last
version of Qt5, 5.15.2, but 5.9 is not very old, it should compile and run
normally. If you have any compilation issues, just open new issues on
GitHub, I'll fix them right away.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-793203079,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVP6BYLNZVLNU6C6FUTTCVUR3ANCNFSM4STC7GBQ
.

there is a weirdest way to solve this but requires twice the memory and cpu resources. currently i have a code which can create a window with acrylic blur, but i cannot draw anything on it, so there is a chance that i could create another transparent window and overlap it on our acrylic window and make sure that both window uses same wndproc so when i resize the original window the acrylic window will also resize and if i move the acrylic window also moves and so on

It's not weired at all. This technique is widely used in many commercial applications. They use this technique to draw the window frame themselves, because the official window frame provided by DWM is not reliable sometimes. Can you share the source code of your Acrylic background window? I may be able to port it to Qt. Is it written in C++?

Yes I will share it to you,I'm currently not @ home once I reach i will
send you, it's c# and wpf.
On Tue, 9 Mar, 2021, 10:30 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

there is a weirdest way to solve this but requires twice the memory and
cpu resources. currently i have a code which can create a window with
acrylic blur, but i cannot draw anything on it, so there is a chance that i
could create another transparent window and overlap it on our acrylic
window and make sure that both window uses same wndproc so when i resize
the original window the acrylic window will also resize and if i move the
acrylic window also moves and so on
It's not weired at all. This technique is widely used in many commercial
applications. They use this technique to draw the window frame themselves,
because the official window frame provided by DWM is not reliable
sometimes. Can you share the source code of your Acrylic background window?
I may be able to port it to Qt. Is it written in C++?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-793397569,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVLQNFGCTKTUOEMFGDDTCWTOPANCNFSM4STC7GBQ
.

it's c# and wpf

There are many articles talking about how to use the Acrylic brush in WPF, but almost no articles talking about how to use it in C++, can you convert your project to C++? Since you are using WPF, why do you have that issue? I see many people are using the Acrylic brush in WPF applications.

In c++,winrt i think it is possible to create acrylic brush using the code
that you have given but wpf completely uses direct x to draw controls,
whereas the acrylic brush uses direct composition so it will only draw on
top.
On Tue, 9 Mar, 2021, 11:19 am Yuhang Zhao<EMAIL_ADDRESS>wrote:

it's c# and wpf
There are many articles talking about how to use the Acrylic brush in WPF,
but almost no articles talking about how to use it in C++, can you convert
your project to C++? Since you are using WPF, why do you have that issue? I
see many people are using the Acrylic brush in WPF applications.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-793433995,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMQODVG44MVZS6QTKLTCWZHZANCNFSM4STC7GBQ
.

In c++,winrt i think it is possible to create acrylic brush using the code
that you have given but wpf completely uses direct x to draw controls,
whereas the acrylic brush uses direct composition so it will only draw on
top.

I have read some examples shared by Microsoft in the last few hours and now I know how to use UWP controls in normal Win32 applications. But here comes the same problem: I can't get the visual contents behind the window, so I can only do a static Acrylic blur, although it's the real Acrylic blur provided by MS. It won't update dynamically. But since I'm using Qt, I can still draw other controls on top of the Acrylic background, in theory, because I haven't tried it yet.

If using the real Acrylic blur is no better than what we do now, then why use it? It's highly tied to Windows (and require a very recent version) and can't be ported to other platforms. What this repo do is cross-platform, it supports Linux and macOS as well. If the undocumentated API SetWindowCompositionAttribute is fixed, I can re-consider using it again.

@SelastinGeorge I'm going to try the xaml island feature to use the real Acrylic blur instead of emulate it. It's absolutely possible because Microsoft Terminal is using it and it works quite well. However, it will become a Win10 only feature and have no portable at all. Xaml island is designed for C++ Win32 applications, so it may not be useful for you, since you are using WPF and C#. And what's worse, it's not easy to use such technique in Qt because it will require to embed Qt Widget inside a native Win32 window, it's achieveable but not some usual doing. It's not recommended by Qt either. But I want to give it a try at least.

Xaml islands window also have aerospace issue. It can be used with win32
but in wpf it is not possible to draw controls on top of it. Because wpf
and wine uses different technologies to render. In Microsoft terminal every
controls they use is a call islands control so there is no aerospace issue.
Have you tried the example that I have given you?
On Thu, 11 Mar, 2021, 2:12 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

@SelastinGeorge https://github.com/SelastinGeorge I'm going to try the
xaml island feature to use the real Acrylic blur instead of emulate it.
It's absolutely possible because Microsoft Terminal is using it and it
works quite well. However, it will become a Win10 only feature and have no
portable at all. Xaml island is designed for C++ Win32 applications, so it
may not be useful for you, since you are using WPF and C#. And what's
worse, it's not easy to use such technique in Qt because it will require to
embed Qt Widget inside a native Win32 window, it's achieveable but not some
usual doing. It's not recommended by Qt either. But I want to give it a try
at least.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-796569653,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJ5SDR6AVO5NRROL2DTDB7ATANCNFSM4STC7GBQ
.

Sorry abt spelling mistakes, keyboard auto correction . In call islands all
the controls are drawn to an off screen surface and presented finally as a
single frame to the compositor
On Thu, 11 Mar, 2021, 2:18 pm Selastin George<EMAIL_ADDRESS>wrote:

Xaml islands window also have aerospace issue. It can be used with win32
but in wpf it is not possible to draw controls on top of it. Because wpf
and wine uses different technologies to render. In Microsoft terminal every
controls they use is a call islands control so there is no aerospace issue.
Have you tried the example that I have given you?
On Thu, 11 Mar, 2021, 2:12 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

@SelastinGeorge https://github.com/SelastinGeorge I'm going to try the
xaml island feature to use the real Acrylic blur instead of emulate it.
It's absolutely possible because Microsoft Terminal is using it and it
works quite well. However, it will become a Win10 only feature and have no
portable at all. Xaml island is designed for C++ Win32 applications, so it
may not be useful for you, since you are using WPF and C#. And what's
worse, it's not easy to use such technique in Qt because it will require to
embed Qt Widget inside a native Win32 window, it's achieveable but not some
usual doing. It's not recommended by Qt either. But I want to give it a try
at least.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-796569653,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJ5SDR6AVO5NRROL2DTDB7ATANCNFSM4STC7GBQ
.

Have you tried the example that I have given you?

No I haven't. I'm busy dealing with all kinds of small issues introduced by recent changes. Will try it in the next few days.

Just run the exe file and check. That is the real acrylic blur used in wpf.
On Thu, 11 Mar, 2021, 2:22 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

Have you tried the example that I have given you?
No I haven't. I'm busy dealing with all kinds of small issues introduced
by recent changes. Will try it in the next few days.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-796575214,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVKGRKNEPGJFV5CPFOLTDCAD5ANCNFSM4STC7GBQ
.

Just run the exe file and check. That is the real acrylic blur used in wpf.

OK. Thanks again for sharing it!

Thank you. Try it out that acrylic also has airspace issue but I tried
overlapping a new window on it and it works fine
On Thu, 11 Mar, 2021, 2:24 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

Just run the exe file and check. That is the real acrylic blur used in wpf.
OK. Thanks again for sharing it!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-796576715,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVNK4ARZX34OJNQVBQ3TDCANTANCNFSM4STC7GBQ
.

@SelastinGeorge I just finished reading the source code of your project, although I have not run it yet (currently not at home, can't run it due to OS limitations). It inspires me a lot. Looks like xaml island is not a necessity.

It directly uses the winrt interop which helps to get backdrop and helps to
apply different direct composition effects to the backdrop. The only
disadvantage I see ther was the airspace issue. But as I told seperating
acrylic blur into another window and attaching both together solve the
problem almost. The code I have you is not completed yet it still have bugs
like bot windows are shown on alt tab etc..., I'm working on it.
On Thu, 11 Mar, 2021, 2:35 pm Yuhang Zhao<EMAIL_ADDRESS>wrote:

@SelastinGeorge https://github.com/SelastinGeorge I just finished
reading the source code of your project, although I have not run it yet
(currently not at home, can't run it due to OS limitations). It inspires me
a lot. Looks like xaml island is not a necessity.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-796583255,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPMLOVMLCRGKGNAVRLTDCBUJANCNFSM4STC7GBQ
.

I've tried DirectComposition (Windows.UI.Composition), it can emulate a blur effect that is very close to the acrylic blur, but it needs much code from the C++ side. It's not that much if you are using .net though. And I've tried XAML Island as well. It's very easy to embed any UWP controls into Win32 windows by using XAML Island, however, it needs to modify the WinMain function, and you need to install the cppwinrt NuGet package to make it compile. It just makes the project become much more complex. I think these two ways are both achieveable, but not suitable for this repo. Maybe I can create a separate repo for the acrylic effect.

I've tried DirectComposition (Windows.UI.Composition), it can emulate a blur effect that is very close to the acrylic blur, but it needs much code from the C++ side. It's not that much if you are using .net though. And I've tried XAML Island as well. It's very easy to embed any UWP controls into Win32 windows by using XAML Island, however, it needs to modify the WinMain function, and you need to install the cppwinrt NuGet package to make it compile. It just makes the project become much more complex. I think these two ways are both achieveable, but not suitable for this repo. Maybe I can create a separate repo for the acrylic effect.

Yes it would be better
On Mon, 15 Mar, 2021, 6:45 am Yuhang Zhao, @.***> wrote:

I've tried DirectComposition (Windows.UI.Composition), it can emulate a
blur effect that is very close to the acrylic blur, but it needs much code
from the C++ side. It's not that much if you are using .net though. And
I've tried XAML Island as well. It's very easy to embed any UWP controls
into Win32 windows by using XAML Island, however, it needs to modify the
WinMain function, and you need to install the cppwinrt NuGet package to
make it compile. It just makes the project become much more complex. I
think these two ways are both achieveable, but not suitable for this repo.
Maybe I can create a separate repo for the acrylic effect.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-799025935,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVLDFUTM5ZVPYM35IRTTDVNRXANCNFSM4STC7GBQ
.

Hey i have found something else, we can actually animate the acrylic effect too. the acrylic effect is actually drawn into a visual layer which can be animated using direct composition API. Have you checked the Acrylic effect sample that i give you? in that sample the acrylic layer of the window does not have animations, but now i can implement that too using this. i have already implemented maximizing animation it works better but to implement restore animation it is challenging. because i use transparent window i lost the window animations, so if i restore a window it directly resize the window to the RECT, but to add restore animation the window need to have a size of RECT+100 or above so that i can scale down using animation.

I've checked the acrylic demo you send to me, it's impressive. But what's the animation you are talking about? Can you paste a gif here?

I've checked the acrylic demo you send to me, it's impressive. But what's the animation you are talking about? Can you paste a gif here?

I've checked the acrylic demo you send to me, it's impressive. But what's the animation you are talking about? Can you paste a gif here?

Window maximize and minimize animation
On Thu, 1 Apr, 2021, 12:38 pm Yuhang Zhao, @.***> wrote:

I've checked the acrylic demo you send to me, it's impressive. But what's
the animation you are talking about? Can you paste a gif here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-811696863,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPIG67K2AI4LJ225NTTGQLVJANCNFSM4STC7GBQ
.

Window maximize and minimize animation

Yes I know it, but how can the acrylic effect be animated?

The acylic effect can be scaled, using direct composition keyframes
animation since the window is transparent behind the acrylic effects gives
excat animation of window maximize
On Thu, 1 Apr, 2021, 12:47 pm Yuhang Zhao, @.***> wrote:

Window maximize and minimize animation
Yes I know it, but how can the acrylic effect be animated?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-811701427,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMDVLERYBPNB5YAOZLTGQMW7ANCNFSM4STC7GBQ
.

OK, I got it. Thanks for your explanation.

Here is an example how i implemented it this looks exactly like the original Acrylic Blur.
Release.zip
Press ALT+F4 to close, the button in the window is drawn on top of the Acrylic, and the titlebar also. This one Uses two window Which shares messages in WndProc to sync window movements, and Maximize and restore animations for acrylic are done using Direct Composition. Looks Pretty Cool in my Laptop, but might Change in yours because i had to add some hard coded values. Just try it out. The same thing might be able to be created in QT Also If you Could be able to access the WinRT Package.

There is a small amount of flickering on resize which i wont be able to fix :(

@SelastinGeorge I tried your program. Any window started after your program will appear unblured, have your noticed that?

Uff i didn't see that, looks like some z index problem. I will fix that I
am still working to improve it. How is the rest of the part is it working
well
On Sun, 4 Apr, 2021, 12:06 am Julien, @.***> wrote:

@SelastinGeorge https://github.com/SelastinGeorge I tried your program.
Any window started after your program will appear unblured, have your
noticed that?
[image: image]
https://user-images.githubusercontent.com/182520/113488098-422dea80-94bc-11eb-907d-ec9b1cc9d885.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-812908253,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVIP2S3M3BUBPNIDXV3TG5N3ZANCNFSM4STC7GBQ
.

@wangwenx190  How can i open your Acrylic Project in QT, I haven't Seen a .pro file in the repo, Can you please send the old version of repo

@SelastinGeorge Hi, please check this repo: https://github.com/wangwenx190/Win32Acrylic

How can i open your Acrylic Project in QT, I haven't Seen a .pro file in the repo

You can open the CMakeLists.txt directly if you have installed Qt Creator.

Can you please send the old version of repo

It's the old code indeed, which was moved from this repo.

Thank you let me try it
On Mon, 5 Apr, 2021, 3:37 pm Yuhang Zhao, @.***> wrote:

How can i open your Acrylic Project in QT, I haven't Seen a .pro file in
the repo
You can open the CMakeLists.txt directly if you have installed Qt Creator.
Can you please send the old version of repo
It's the old code indeed, which was moved from this repo.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-813319138,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVPJAGNDH2KWW4PZGGTTHGDXHANCNFSM4STC7GBQ
.

It's Showing some errors :
C:\Users\selas\Downloads\build-qtacrylicmaterial-main-Desktop_Qt_5_12_10_MSVC2015_64bit-Debug\examples\widget\Widget_autogen\EWIEGA46WW..........\qtacrylicmaterial-main\examples\widget\widget.h:40: error: C2143: syntax error: missing ';' before 'public'
I tried putting Semi colon but doesn't work

There is a warning also :
C:\Users\selas\Downloads\build-qtacrylicmaterial-main-Desktop_Qt_5_12_10_MSVC2015_64bit-Debug\examples\widget\Widget_autogen\EWIEGA46WW..........\qtacrylicmaterial-main\examples\widget\widget.h:40: warning: C4183: 'Q_DISABLE_COPY_MOVE': missing return type; assumed to be a member function returning 'int'

@SelastinGeorge I've pushed new code which fixed this issue.

Let me check it out
On Mon, 5 Apr, 2021, 4:03 pm Yuhang Zhao, @.***> wrote:

@SelastinGeorge https://github.com/SelastinGeorge I've pushed new code
which fixed this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-813328582,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJHZG23IGG4FU7TI2DTHGGWJANCNFSM4STC7GBQ
.

Thanks it worked

Which function allows you to move the wallpaper along with the window in your code. i might be able to fix the flickering issue while moving the window

when ever you move the wallpaper when you move window call DWMFlush(), it will help to reduce flicker, i was having the same isuue

when ever you move the wallpaper when you move window call DWMFlush(), it will help to reduce flicker, i was having the same isuue

Thanks for telling me this! I'll try it.

@SelastinGeorge Hi, please check this repo: https://github.com/wangwenx190/Win32Acrylic

I'm sorry to insist, but do you confirm that with this repo you are using the wallpaper to compute the blur effect? Ie. If there a other application windows below, the blur will ignore them and show the wallpaper instead?
No offense but it is counter intuitive and defeat the whole purpose of the acrylic style: you are supposed to see a blurred version of the background, not the wallpaper

Well I am seeing the blurred version of wallpaper in the example, (I have
altered the code to use wallpaper acrylic) when I move the window it
flickers the image, if you use dwmflush() there is a chance for you to
eliminate this flicker.
Have you tried collecting the magnifier api buffer, that might give you
whatever is behind the window. The magnifier api uses dwmflush() to remove
flicker
On Mon, 5 Apr, 2021, 6:18 pm Julien, @.***> wrote:

@SelastinGeorge https://github.com/SelastinGeorge Hi, please check this
repo: https://github.com/wangwenx190/Win32Acrylic
I'm sorry to insist, but do you confirm that with this repo you are using
the wallpaper to compute the blur effect? Ie. If there a other application
windows below, the blur will ignore them and show the wallpaper instead?
No offense but it is counter intuitive and defeat the whole purpose of the
acrylic style: you are supposed to see a blurred version of the background,
not the wallpaper
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-813375842,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVN7F73EW7MPZOOBEK3THGWSBANCNFSM4STC7GBQ
.

I'm sorry to insist, but do you confirm that with this repo you are using the wallpaper to compute the blur effect? Ie. if there is another application windows below, the blur will ignore them and show the wallpaper instead?
No offense but it is counter intuitive and defeat the whole purpose of the acrylic style: you are supposed to see a blurred version of the background, not the wallpaper

@JulienMaille  I'm not sure which repo you are referring to. For the Win32Acrylic repo, it uses the official acrylic brush from UWP, so everything behind the window will be blured, not only the wallpaper. I provided a prebuilt exe (64-bit) in the releases page, you can try it. For the qtacrylicmaterial repo, it only uses wallpaper blur on Win 7 to 8.1 because the acrylic blur is only available on Win10. I myself of course want to use acrylic blur on all supported platforms, however, it's not easy to emulate it. I know I should blur the window background, not the wallpaper, but that's not easy. So I'm bluring the wallpaper instead temporarily, until I can find a good solution.

@SelastinGeorge

Which function allows you to move the wallpaper along with the window in your code. i might be able to fix the flickering issue while moving the window

https://github.com/wangwenx190/qtacrylicmaterial/blob/main/src/qtacryliceffecthelper.cpp#L148

Well I am seeing the blurred version of wallpaper in the example, (I have
altered the code to use wallpaper acrylic) when I move the window it
flickers the image, if you use dwmflush() there is a chance for you to
eliminate this flicker.

I'm not sure how to use DWMFlush(). Do you succeeded in removing the flicker for the qtacrylicmaterial repo?

Have you tried collecting the magnifier api buffer, that might give you
whatever is behind the window. The magnifier api uses dwmflush() to remove
flicker

No I haven't. You are more professional than me on this.

It's not a function actually, I intercepted the wm_positionchsnged method
to get the updated WINDOWPOS and multiply the x, y, cx, cy with -1 and use
that coordinates with wallpaper rect, after assigning the value for
wallpaper rect just call dwmFlush() function.
On Tue, 6 Apr, 2021, 6:19 am Yuhang Zhao, @.***> wrote:

@SelastinGeorge https://github.com/SelastinGeorge
Which function allows you to move the wallpaper along with the window in
your code. i might be able to fix the flickering issue while moving the
window
https://github.com/wangwenx190/qtacrylicmaterial/blob/main/src/qtacryliceffecthelper.cpp#L148
Well I am seeing the blurred version of wallpaper in the example, (I have
altered the code to use wallpaper acrylic) when I move the window it
flickers the image, if you use dwmflush() there is a chance for you to
eliminate this flicker.
I'm not sure how to use DWMFlush(). Do you succeeded in removing the
flicker for the qtacrylicmaterial repo?
Have you tried collecting the magnifier api buffer, that might give you
whatever is behind the window. The magnifier api uses dwmflush() to remove
flicker
No I haven't. You are more professional than me on this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-813745922,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVJKJEKQCVPRRM3SYN3THJLDDANCNFSM4STC7GBQ
.

I intercepted the wm_positionchsnged method to get the updated WINDOWPOS and multiply the x, y, cx, cy with -1

Why multiply these things with -1? Which part of the code solved the flicker issue? The updated coordinates or the dwmFlush() function or all of them?

When you move the window to right the wallpaper must move to the left
(which is negative coordinates) that's why I use -1, the dwmflush()
function solved the issue of flickering. Once I reach home let me
checkniheck if the code is there I will send it to you.
On Tue, 6 Apr, 2021, 7:39 am Yuhang Zhao, @.***> wrote:

I intercepted the wm_positionchsnged method to get the updated WINDOWPOS
and multiply the x, y, cx, cy with -1
Why multiply these things with -1? Which part of the code solved the
flicker issue? The updated coordinates or the dwmFlush() function or all of
them?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-813770613,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVMY7KAQ4L4SWKU574LTHJUMVANCNFSM4STC7GBQ
.

Once I reach home let me checkniheck if the code is there I will send it to you.

OK. Thanks!

Sorry, i have actually lost my code, but i have one in the stack overflow question that i have asked, check it here : Acrylic Effect wallpaper
instead of using system wallpaper i have just used an image here, you can change the location of that image in the code in this line
 HR(d2dWICFactory->CreateDecoderFromFilename(L"C:/Users/selas/Downloads/wallpaper.jpg", NULL, GENERIC_READ, WICDecodeMetadataCacheOnLoad, &d2dDecoder));

Sample.zip
Try this example just don't forget to change the line I mentioned above.

https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/84#issuecomment-814558264

Finally some rays of hope

Really a good news!

Hey i found something cool, i decompiled the dwm api dll and done some digging, and found a weired code which can get the window visual behind.
#include <Unknwn.h>
#include <Windows.h>
#include <ntstatus.h>
#include <winternl.h>
#include <wrl\implements.h>
#include <comutil.h>
#include <dcomp.h>
#include <dwmapi.h>
#include <dxgi1_3.h>
#include <d3d11_2.h>
#include <d2d1_2.h>
#include <d2d1_2helper.h>

//Either use this or add in your linker configuration
#pragma comment(lib, "dxgi")
#pragma comment(lib, "d3d11")
#pragma comment(lib, "d2d1")
#pragma comment(lib, "dcomp")
#pragma comment(lib, "dwmapi")
#pragma comment(lib, "ole32")

//-------------------- Definitions
enum THUMBNAIL_TYPE
{
    TT_DEFAULT = 0x0,
    TT_SNAPSHOT = 0x1,
    TT_ICONIC = 0x2,
    TT_BITMAPPENDING = 0x3,
    TT_BITMAP = 0x4
};

typedef HRESULT(WINAPI* DwmpCreateSharedThumbnailVisual)(
    IN HWND hwndDestination,
    IN HWND hwndSource,
    IN DWORD dwThumbnailFlags,
    IN DWM_THUMBNAIL_PROPERTIES* pThumbnailProperties,
    IN VOID* pDCompDevice,
    OUT VOID** ppVisual,
    OUT PHTHUMBNAIL phThumbnailId);

typedef HRESULT(WINAPI* DwmpQueryWindowThumbnailSourceSize)(
    IN HWND hwndSource,
    IN BOOL fSourceClientAreaOnly,
    OUT SIZE* pSize);

typedef HRESULT(WINAPI* DwmpQueryThumbnailType)(
    IN HTHUMBNAIL hThumbnailId,
    OUT THUMBNAIL_TYPE* thumbType);

//pre-cobalt/pre-iron
typedef HRESULT(WINAPI* DwmpCreateSharedVirtualDesktopVisual)(
    IN HWND hwndDestination,
    IN VOID* pDCompDevice,
    OUT VOID** ppVisual,
    OUT PHTHUMBNAIL phThumbnailId);

//cobalt/iron (20xxx+)
//No changes except for the function name.
typedef HRESULT(WINAPI* DwmpCreateSharedMultiWindowVisual)(
    IN HWND hwndDestination,
    IN VOID* pDCompDevice,
    OUT VOID** ppVisual,
    OUT PHTHUMBNAIL phThumbnailId);

//pre-cobalt/pre-iron
typedef HRESULT(WINAPI* DwmpUpdateSharedVirtualDesktopVisual)(
    IN HTHUMBNAIL hThumbnailId,
    IN HWND* phwndsInclude,
    IN DWORD chwndsInclude,
    IN HWND* phwndsExclude,
    IN DWORD chwndsExclude,
    OUT RECT* prcSource,
    OUT SIZE* pDestinationSize);

//cobalt/iron (20xxx+)
//Change: function name + new DWORD parameter.
//Pass "1" in dwFlags. Feel free to explore other flags.
typedef HRESULT(WINAPI* DwmpUpdateSharedMultiWindowVisual)(
    IN HTHUMBNAIL hThumbnailId,
    IN HWND* phwndsInclude,
    IN DWORD chwndsInclude,
    IN HWND* phwndsExclude,
    IN DWORD chwndsExclude,
    OUT RECT* prcSource,
    OUT SIZE* pDestinationSize,
    IN DWORD dwFlags);

#define DWM_TNP_FREEZE            0x100000
#define DWM_TNP_ENABLE3D          0x4000000
#define DWM_TNP_DISABLE3D         0x8000000
#define DWM_TNP_FORCECVI          0x40000000
#define DWM_TNP_DISABLEFORCECVI   0x80000000

//We also need these if you want to use MultiWindow/VirtualDesktop.

enum WINDOWCOMPOSITIONATTRIB
{
    WCA_UNDEFINED = 0x0,
    WCA_NCRENDERING_ENABLED = 0x1,
    WCA_NCRENDERING_POLICY = 0x2,
    WCA_TRANSITIONS_FORCEDISABLED = 0x3,
    WCA_ALLOW_NCPAINT = 0x4,
    WCA_CAPTION_BUTTON_BOUNDS = 0x5,
    WCA_NONCLIENT_RTL_LAYOUT = 0x6,
    WCA_FORCE_ICONIC_REPRESENTATION = 0x7,
    WCA_EXTENDED_FRAME_BOUNDS = 0x8,
    WCA_HAS_ICONIC_BITMAP = 0x9,
    WCA_THEME_ATTRIBUTES = 0xA,
    WCA_NCRENDERING_EXILED = 0xB,
    WCA_NCADORNMENTINFO = 0xC,
    WCA_EXCLUDED_FROM_LIVEPREVIEW = 0xD,
    WCA_VIDEO_OVERLAY_ACTIVE = 0xE,
    WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 0xF,
    WCA_DISALLOW_PEEK = 0x10,
    WCA_CLOAK = 0x11,
    WCA_CLOAKED = 0x12,
    WCA_ACCENT_POLICY = 0x13,
    WCA_FREEZE_REPRESENTATION = 0x14,
    WCA_EVER_UNCLOAKED = 0x15,
    WCA_VISUAL_OWNER = 0x16,
    WCA_HOLOGRAPHIC = 0x17,
    WCA_EXCLUDED_FROM_DDA = 0x18,
    WCA_PASSIVEUPDATEMODE = 0x19,
    WCA_LAST = 0x1A,
};

typedef struct WINDOWCOMPOSITIONATTRIBDATA
{
    WINDOWCOMPOSITIONATTRIB Attrib;
    void* pvData;
    DWORD cbData;
};

typedef BOOL(WINAPI* SetWindowCompositionAttribute)(
    IN HWND hwnd,
    IN WINDOWCOMPOSITIONATTRIBDATA* pwcad);

//------------------------- Getting functions
DwmpQueryThumbnailType lDwmpQueryThumbnailType;
DwmpCreateSharedThumbnailVisual lDwmpCreateSharedThumbnailVisual;
DwmpQueryWindowThumbnailSourceSize lDwmpQueryWindowThumbnailSourceSize;

//PRE-IRON
DwmpCreateSharedVirtualDesktopVisual lDwmpCreateSharedVirtualDesktopVisual;
DwmpUpdateSharedVirtualDesktopVisual lDwmpUpdateSharedVirtualDesktopVisual;

//20xxx+
DwmpCreateSharedMultiWindowVisual lDwmpCreateSharedMultiWindowVisual;
DwmpUpdateSharedMultiWindowVisual lDwmpUpdateSharedMultiWindowVisual;

SetWindowCompositionAttribute lSetWindowCompositionAttribute;

bool InitPrivateDwmAPIs()
{
    auto dwmapiLib = LoadLibrary(L"dwmapi.dll");

    if (!dwmapiLib)
        return false;

    lDwmpQueryThumbnailType = (DwmpQueryThumbnailType)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(114));
    lDwmpCreateSharedThumbnailVisual = (DwmpCreateSharedThumbnailVisual)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(147));
    lDwmpQueryWindowThumbnailSourceSize = (DwmpQueryWindowThumbnailSourceSize)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(162));

    //PRE-IRON
    lDwmpCreateSharedVirtualDesktopVisual = (DwmpCreateSharedVirtualDesktopVisual)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(163));
    lDwmpUpdateSharedVirtualDesktopVisual = (DwmpUpdateSharedVirtualDesktopVisual)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(164));

    //20xxx+
    lDwmpCreateSharedMultiWindowVisual = (DwmpCreateSharedMultiWindowVisual)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(163));
    lDwmpUpdateSharedMultiWindowVisual = (DwmpUpdateSharedMultiWindowVisual)GetProcAddress(dwmapiLib, MAKEINTRESOURCEA(164));

    if (false) //Just a placeholder, don't.
        return false;

    return true;
}

bool InitPrivateUser32APIs()
{
    auto user32Lib = LoadLibrary(L"user32.dll");

    if (!user32Lib)
        return false;

    lSetWindowCompositionAttribute = (SetWindowCompositionAttribute)GetProcAddress(user32Lib, "SetWindowCompositionAttribute");

    if (!lSetWindowCompositionAttribute)
        return false;

    return true;
}

//--------------------- Create Device func
using namespace Microsoft::WRL;

ComPtr<ID3D11Device> direct3dDevice;
ComPtr<IDXGIDevice2> dxgiDevice;
ComPtr<ID2D1Factory2> d2dFactory2;
ComPtr<IDCompositionDesktopDevice> dcompDevice;

bool CreateDevice()
{
    if (D3D11CreateDevice(0, //Adapter
        D3D_DRIVER_TYPE_HARDWARE,
        NULL,
        D3D11_CREATE_DEVICE_BGRA_SUPPORT,
        NULL,
        0,
        D3D11_SDK_VERSION,
        direct3dDevice.GetAddressOf(),
        nullptr,
        nullptr
    ) != S_OK)
    {
        //Maybe try creating with D3D_DRIVER_TYPE_WARP before returning false.
        //Always listen to device changes.
        return false;
    }

    if (direct3dDevice->QueryInterface(dxgiDevice.GetAddressOf()) != S_OK)
    {
        return false;
    }

    if (D2D1CreateFactory(
        D2D1_FACTORY_TYPE::D2D1_FACTORY_TYPE_SINGLE_THREADED,
        __uuidof(ID2D1Factory2),
        (void**)d2dFactory2.GetAddressOf()) != S_OK)
    {
        return false;
    }

    if (DCompositionCreateDevice3(
        dxgiDevice.Get(),
        __uuidof(dcompDevice),
        (void**)dcompDevice.GetAddressOf()) != S_OK)
    {
        return false;
    }

    return true;
}

//------------------------ Create window func
LRESULT CALLBACK MyWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_CLOSE:
        PostQuitMessage(0);
        break;
    default:
        break;
    }
    return DefWindowProc(hwnd, message, wParam, lParam);
}

HWND CreateWindowInternal(LPCWSTR lptitleName, LPCWSTR lpclassName, DWORD dwExStyle, DWORD dwStyle)
{
    HINSTANCE hInstance = GetModuleHandle(NULL);

    WNDCLASS wc = { };
    wc.lpfnWndProc = MyWndProc;
    wc.hInstance = hInstance;
    wc.cbWndExtra = 0;
    wc.lpszClassName = lpclassName;

    if (!RegisterClass(&wc))
        return nullptr;

    const auto hwndParent = CreateWindowEx(dwExStyle, lpclassName, lptitleName,
        dwStyle, CW_USEDEFAULT, CW_USEDEFAULT, 1000, 640,
        nullptr, nullptr, hInstance, NULL);

    //This part is needed ONLY if you plan on using MultiWindow/VirtualDesktop functions.
    BOOL enable = TRUE;
    WINDOWCOMPOSITIONATTRIBDATA wData{};
    wData.Attrib = WCA_EXCLUDED_FROM_LIVEPREVIEW;
    wData.pvData = &enable;
    wData.cbData = sizeof(BOOL);
    lSetWindowCompositionAttribute(hwndParent, &wData);

    if (!hwndParent)
        return nullptr;

    return hwndParent;
}

void DemoCreateWindowThumbnail(HWND myWnd, IDCompositionVisual2** ppWindowVisual)
{
    //A window target of your choice
    HWND targetWindow = (HWND)FindWindow(L"Shell_TrayWnd", NULL);

    //Query the exact thumbnail source size
    SIZE windowSize{};
    lDwmpQueryWindowThumbnailSourceSize(targetWindow, FALSE, &windowSize);

    //Pretty explanatory and also documented by Microsoft
    DWM_THUMBNAIL_PROPERTIES thumb{};
    thumb.dwFlags = DWM_TNP_SOURCECLIENTAREAONLY | DWM_TNP_VISIBLE | DWM_TNP_RECTDESTINATION | DWM_TNP_RECTSOURCE | DWM_TNP_OPACITY | DWM_TNP_ENABLE3D;
    thumb.opacity = 255;
    thumb.fVisible = TRUE;
    thumb.fSourceClientAreaOnly = FALSE;
    thumb.rcDestination = RECT{ 0, 0, windowSize.cx, windowSize.cy };
    thumb.rcSource = RECT{ 0, 0, windowSize.cx, windowSize.cy };

    HTHUMBNAIL hThumbWindow;
    //Create the shared visual!
    auto res = lDwmpCreateSharedThumbnailVisual(myWnd, targetWindow, 2, &thumb,
        dcompDevice.Get(), (void**)ppWindowVisual, &hThumbWindow);
}

void DemoCreateMultiWindowThumbnail(HWND myWnd, IDCompositionVisual2** ppVirtualDesktopVisual)
{
    HTHUMBNAIL hThumbVirtualDesktop;
    auto virtualDeskRes = lDwmpCreateSharedMultiWindowVisual(myWnd, dcompDevice.Get(),
        (void**)ppVirtualDesktopVisual, &hThumbVirtualDesktop);

    auto monitorSize = RECT{ 0, 0, 1920, 1080 };
    auto targetSize = SIZE{ 960, 540 };

    HWND hwndTest = (HWND)0x1; //Exclude from the list what you want to exclude
    HWND* excludeArray = new HWND[1];
    excludeArray[0] = hwndTest;

    //The include list is useless as it will include every window in every case.
    //You can only play with the exclusion list.
    auto virtualDesktopUpdate = lDwmpUpdateSharedMultiWindowVisual(hThumbVirtualDesktop, NULL, 0,
        excludeArray, 1, &monitorSize, &targetSize, 1); //Last parameter has to be "1"

//use lDwmpUpdateSharedVirtualDesktopVisual for 19043 or older
}

int APIENTRY wWinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPWSTR    lpCmdLine,
    int       nCmdShow)
{
    if (!InitPrivateDwmAPIs() ||
        !InitPrivateUser32APIs() ||
        !CreateDevice())
        return 0;

    auto myWnd = CreateWindowInternal(L"Noice window", L"DwmThumbExampleClass", WS_EX_OVERLAPPEDWINDOW | WS_EX_NOREDIRECTIONBITMAP, WS_OVERLAPPEDWINDOW);
    ShowWindow(myWnd, SW_SHOW);

    //ComPtr<IDCompositionVisual2> thumbVisual;
    //DemoCreateWindowThumbnail(myWnd, thumbVisual.GetAddressOf());

    ComPtr<IDCompositionVisual2> thumbVisual;
    DemoCreateMultiWindowThumbnail(myWnd, thumbVisual.GetAddressOf());

    //Create the target for the window.
    ComPtr<IDCompositionTarget> dcompTarget;
    if (dcompDevice->CreateTargetForHwnd(myWnd, FALSE, dcompTarget.GetAddressOf()) != S_OK)
        return 0;

    //You can either set the virtual desktop visual as root or create a new visual and set the content.
    if (dcompTarget->SetRoot(thumbVisual.Get()) != S_OK)
        return 0;

    //Remember to commit.
    if (dcompDevice->Commit() != S_OK)
        return 0;

    MSG msg{};
    while (GetMessage(&msg, nullptr, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    //ComPtr automatically releases for you.
}

Try compiling this code, i actually take it from other github site but the keyword i need,i get from the dll

This is the something that makes the DWMBlurBehind() possible

This is the something that makes the DWMBlurBehind() possible

Thanks! I'll try it later.

Bro finally i made Win32 to support Acrylic Effect Using Direct Composition.
checkout my repo : https://github.com/Extrimis/Win32-Acrylic-Effect

Bro finally i made Win32 to support Acrylic Effect Using Direct Composition.
checkout my repo : https://github.com/Extrimis/Win32-Acrylic-Effect

Awesome repo! Thanks for your work!

Thanks bro
On Tue, 15 Jun, 2021, 7:20 am Yuhang Zhao, @.***> wrote:

Bro finally i made Win32 to support Acrylic Effect Using Direct
Composition.
checkout my repo : https://github.com/Extrimis/Win32-Acrylic-Effect
Awesome repo! Thanks for your work!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wangwenx190/framelesshelper/issues/27#issuecomment-861108595,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARKGWVORY7GZ33WC46Y2HYTTS2WWDANCNFSM4STC7GBQ
.

This issue doesn't seem to be related to this repo any more, so I'm closing it now. Feel free to re-open it if you want.


fix grammatical error in rules.mdx

changing: "You are probably here because you got an warning message in your console."
to: "You are probably here because you got a warning message in your console."
an waring -> a warning
Please describe the changes this PR makes and why it should be merged:
Status

[ ] Code changes have been tested against prettier, or there are no code changes
[ ] I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

[ ] This PR changes the codebase

[ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
[ ] This PR changes the internal workings with no modifications to the external API (bug fixes, performance improvements)

[x] This PR only includes non-code changes, like changes to documentation, README, etc.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 37.323%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
822

Relevant Lines:
2317

💛  - Coveralls

Enio back at it again with the professional grammar check

I guess this is how I can help for now 😄


Erasure Coding[BUG]

Now consider a Server Pool consisting of 5 nodes with 8 drives each for a total of 40 drives. Using the GCD, MinIO would create 4 erasure sets with 10 drives each. However, this distribution would result in uneven distribution with one node contributing more drives to the Erasure Sets than the others. MinIO instead creates 5 erasure sets with 8 drives each to ensure uniform distribution of Erasure Set drives per Nodes.
As describe above, It is absolutely even distribution using 4 erasure sets with 10 drives while uneven using 5 erasure sets with 8 drives.
4 erasure sets with 10 drives each:

5 nodes
node A
node B
node C
node D
node E

disk1
Set 1
Set 1
Set 1
Set 1
Set 1

disk2
Set 1
Set 1
Set 1
Set 1
Set 1

disk3
Set 2
Set 2
Set 2
Set 2
Set 2

disk4
Set 2
Set 2
Set 2
Set 2
Set 2

disk5
Set 3
Set 3
Set 3
Set 3
Set 3

disk6
Set 3
Set 3
Set 3
Set 3
Set 3

disk7
Set 4
Set 4
Set 4
Set 4
Set 4

disk8
Set 4
Set 4
Set 4
Set 4
Set 4

Now consider a Server Pool consisting of 5 nodes with 8 drives each for a total of 40 drives. Using the GCD, MinIO would create 4 erasure sets with 10 drives each. However, this distribution would result in uneven distribution with one node contributing more drives to the Erasure Sets than the others. MinIO instead creates 5 erasure sets with 8 drives each to ensure uniform distribution of Erasure Set drives per Nodes.

You are talking about documentation being wrong here? @fidohan

This is a documentation bug

Now consider a Server Pool consisting of 5 nodes with 8 drives each for a total of 40 drives. Using the GCD, MinIO would create 4 erasure sets with 10 drives each. However, this distribution would result in uneven distribution with one node contributing more drives to the Erasure Sets than the others. MinIO instead creates 5 erasure sets with 8 drives each to ensure uniform distribution of Erasure Set drives per Nodes.

MinIO never creates '5' erasure sets with 8 drives. MinIO always tries to be even in terms of distribution i.e each node should participate an equal number of drives in any given set.
This is ensured by making sure that whoever "EC" we choose should be divisible by the number of nodes.
The documentation needs fixing.

Now consider a Server Pool consisting of 5 nodes with 8 drives each for a total of 40 drives. Using the GCD, MinIO would create 4 erasure sets with 10 drives each. However, this distribution would result in uneven distribution with one node contributing more drives to the Erasure Sets than the others. MinIO instead creates 5 erasure sets with 8 drives each to ensure uniform distribution of Erasure Set drives per Nodes.

You are talking about documentation being wrong here? @fidohan

yes. I think this case is not right. Consider 5 nodes with 16 drives , it is the best illustration that GCD is 16 but not even distribution.

I'll just drop that whole section and point to the erasure coding calculator - trying to nail a description verbally makes little sense in retrospect.

I'll just drop that whole section and point to the erasure coding calculator - trying to nail a description verbally makes little sense in retrospect.

Yes agreed just remove it, explaining this is not necessary.

https://github.com/minio/docs/commit/e6895c8eaf2717f80af96228d75479724500afcb Removed.Rebuilding docs now.


Move amm price below issuance rate

What does this PR do and why?
Move it back. Removed the blue color, because blue should be reserved for links only.
Screenshots or screen recordings

before
after

Acceptance checklist

[x] I have evaluated the Approval Guidelines for this PR.
[x] I have tested this PR in all supported browsers.
[x] I have tested this PR in dark mode and light mode (if applicable).

I like this. LGTM