FluentWPF icon indicating copy to clipboard operation
FluentWPF copied to clipboard

Windows 10 1903 Window Drag Issue

Open HEIC-to-JPEG-Dev opened this issue 5 years ago • 47 comments

Hi, I just upgraded to Windows 10 1903 and noticed that using the titlebar to drag a window has a very high latency, lagging behind the cursor movements by seconds.

I'm using the AcrylicWindow with ExtendViewIntoTitleBar="True"

Thanks for any updates.

HEIC-to-JPEG-Dev avatar Apr 20 '19 12:04 HEIC-to-JPEG-Dev

Experiencing the same issue on my 1903 build, could not yet figure out a solution.

Andrei-Lapusteanu avatar Apr 27 '19 10:04 Andrei-Lapusteanu

I've only just discovered FluentWPF but have hit this issue right away on 1903 with a super simple new app.

vivaladan avatar May 09 '19 09:05 vivaladan

Hi, @DHitchenUK Sorry for replying so late. Thanks for the information. I recognized your reporting issue. I'm inspecting the behavior of FluentWPF in Windows10 19H1, and trying to fix it. Please wait for a while.

sourcechord avatar May 11 '19 03:05 sourcechord

@sourcechord, I just wanted to say thanks for the work you put in, it's very much appreciated.

HEIC-to-JPEG-Dev avatar May 15 '19 07:05 HEIC-to-JPEG-Dev

If you turn off transparency effects in the settings, it works like before. Of course this turns off blur for all windows apps however.

dsafa avatar May 15 '19 22:05 dsafa

Hi, @DHitchenUK Maybe, it is same as riverar/sample-win32-acrylicblur#2

FluentWPF uses undocumented Win32API(SetWindowCompositionAttribute method).

The reported behavior is caused by the change in the behavior of that API. It seems that SetWindowCompositionAttribute API is broken in Windows10 1903.

Dragging problem occurs Windows10's emoji toolbar, too. (that is shown by Win+period key) And, these problem is reported in Feedback Hub. https://aka.ms/AA4pzyf https://aka.ms/AA4fmz7

Please upvote it 🙏

sourcechord avatar May 17 '19 10:05 sourcechord

I'm still getting this issue even after updating to FluentWPF 0.7.0.

EDIT: Actually, this is strange. The issue doesn't occur on my work computer, but does still occur on my home computer. I'll try it again on my home computer to see if I did something wrong.

ashelleyPurdue avatar Jun 10 '19 00:06 ashelleyPurdue

This bug seems to be fixed in version 1903 (18362.267)

ghost1372 avatar Jul 27 '19 07:07 ghost1372

This bug seems to be fixed in version 1903 (18362.267)

18362.295, still here

0xCA avatar Sep 09 '19 16:09 0xCA

Is this supposed to be open? 637ea17 did not fix it for me (Windows 1903, OS build 18995.1)

JVimes avatar Oct 07 '19 19:10 JVimes

In 1909, or a new cumulative update, the problems are again present.

Armin2208 avatar Oct 10 '19 17:10 Armin2208

Hi, @Armin2208

Thanks for the information. I fixed it in FluentWPF v0.8.0-alpha004 Please try it.

sourcechord avatar Oct 14 '19 02:10 sourcechord

I've tried it and it works. Nice, thank you!

Armin2208 avatar Oct 15 '19 12:10 Armin2208

I'm glad to hear that. I'll close this issue. If you have any problems, please reopen this issue.

sourcechord avatar Oct 17 '19 14:10 sourcechord

I know that this issue has been closed already, but is there a way to keep the real acrylic blur and not have these issues?

For example, I've seen DevExpress avoid this issue by temporarily disabling the transparency when moving the window, showing the Fallback colour.

NickAcPT avatar Apr 08 '20 03:04 NickAcPT

@sourcechord , I actually know how to recreate the acrylic effect of uwp using interop(not the setWindowComposition() method but using the direct x)

But have the same issue. But only on resizing and not on dragging

Preview

This is totally different from your code.

tricky-mind avatar Aug 04 '20 11:08 tricky-mind

@sourcechord , I actually know how to recreate the acrylic effect of uwp using interop(not the setWindowComposition() method but using the direct x)

But have the same issue. But only on resizing and not on dragging

Preview

This is totally different from your code.

Acrylic Effect WPF

Just have a look @ this.

tricky-mind avatar Aug 04 '20 11:08 tricky-mind

@sourcechord , I actually know how to recreate the acrylic effect of uwp using interop(not the setWindowComposition() method but using the direct x) But have the same issue. But only on resizing and not on dragging Preview This is totally different from your code.

Acrylic Effect WPF

Just have a look @ this.

This requires nuget packages

ghost1372 avatar Aug 04 '20 13:08 ghost1372

@sourcechord , I actually know how to recreate the acrylic effect of uwp using interop(not the setWindowComposition() method but using the direct x) But have the same issue. But only on resizing and not on dragging Preview This is totally different from your code.

Acrylic Effect WPF Just have a look @ this.

This requires nuget packages

Yes of course you need nuget packages, i believe they do it by capturing the screen below the window visual using direct x and blurring the image by using direct2d effects.

And adding a noise layer and exclusion blend

tricky-mind avatar Aug 06 '20 09:08 tricky-mind

@tricky-mind I used SetWindowCompositionAttribute for my winforms app and since I was using insider builds, the dragging was fixed. (Dragging lag caused by mouse polling rate greater than monitor refresh rate) However, resizing still posed issues. For some reason when my app is 32 bit I don't have any issues.

VS-ux avatar Aug 12 '20 23:08 VS-ux

Hi there. I restored acrylic blur effect in FluentWPF 0.10.0-alpha001: this is pre-release packages. Windows10 still has laggy behavior with ACRYLICBLURBEHIND. But we can avoid laggy behavior by disabling acrylic blur when resizing or moving the window.

This is it 🎉 AcrylicBlur

I'm confirming this way in several environments. If there is no issues, I'll release it as FluentWPF 0.10.0. Please wait for a while.

sourcechord avatar Jul 04 '21 15:07 sourcechord

For me, it is opaque until dragged, which is the opposite of the intended effect.

https://user-images.githubusercontent.com/62841684/124396688-fe3cc280-dd02-11eb-8929-1ed072ec9dad.mp4

not-nullptr avatar Jul 04 '21 19:07 not-nullptr

It is also worth mentioning that dragging the window on the desktop does not lag at all.

not-nullptr avatar Jul 04 '21 19:07 not-nullptr

Hi @NotARobot6969

This is the intended behavior. There are two types of blur effect;

  • ACCENT_ENABLE_ACRYLICBLURBEHIND: Hard blur that is same as UWP's acrylic effect
  • ACCENT_ENABLE_BLURBEHIND: Soft blur

ACCENT_ENABLE_ACRYLICBLURBEHIND effect causes laggy behavior during window is moving or resizing. So that, FluentWPF applies ACCENT_ENABLE_ACRYLICBLURBEHIND effect only when the window is stabled, and applies ACCENT_ENABLE_BLURBEHIND effect during window is moving or resizing.

sourcechord avatar Jul 05 '21 13:07 sourcechord

@sourcechord But then there is no blur for most of the time, at least for me.

not-nullptr avatar Jul 05 '21 13:07 not-nullptr

To clarify: For me, the laggy effect is applying when I move the window, and no effect is being applied when it's stationary.

not-nullptr avatar Jul 05 '21 13:07 not-nullptr

According to the uploaded movie, the background of the window doesn't seems to have enough texture. It is difficult to recognize the blur effect. Could you show the window on a more complex background images?

sourcechord avatar Jul 05 '21 13:07 sourcechord

To be clear, it's lagging when it is being dragged. @sourcechord https://user-images.githubusercontent.com/62841684/124490002-837ab280-dda9-11eb-8314-147b7ffd798a.mp4

not-nullptr avatar Jul 05 '21 14:07 not-nullptr

Please tell me your environment. Your window has rounded border. Are you using windows11 insider preview? I've not tested FluentWPF 0.10.0-alpha001 in windows11 yet 😓

sourcechord avatar Jul 05 '21 15:07 sourcechord

Indeed! I forgot to mention it.

not-nullptr avatar Jul 05 '21 16:07 not-nullptr