PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

PowerToys Run: blue background on top of window

Open ale-carra opened this issue 1 year ago • 11 comments

Microsoft PowerToys version

0.76

Installation method

PowerToys auto-update

Running as admin

None

Area(s) with issue?

PowerToys Run

Steps to reproduce

When I open PowerToys Run the top of the window has a blue background. This started occurring with the 0.76 update

✔️ Expected Behavior

No blue background in PowerToys Run

❌ Actual Behavior

See screenshot imagen

Other Software

No response

ale-carra avatar Dec 05 '23 21:12 ale-carra

/bugreport

TheJoeFin avatar Dec 06 '23 16:12 TheJoeFin

After upgrading to .76 I see a similar issue; however, it seems to be using the windows accent color, as mine is not blue; however, the extra "window" around the Run utility's area is very much the same.

extra window behind power toys run

fuzzzerd avatar Dec 06 '23 17:12 fuzzzerd

@fuzzzerd if you can upload a bug report, that would be helpful

TheJoeFin avatar Dec 06 '23 18:12 TheJoeFin

@TheJoeFin included here: PowerToysReport_2023-12-06-13-04-38.zip

fuzzzerd avatar Dec 06 '23 19:12 fuzzzerd

Here's my report zip file PowerToysReport_2023-12-06-22-32-15.zip

ale-carra avatar Dec 07 '23 01:12 ale-carra

Does anyone here has this setting enabled?

image

It's in W11 Settings => Personalization.

What happens if you turn it off?

niels9001 avatar Dec 07 '23 10:12 niels9001

Does anyone here has this setting enabled?

image

It's in W11 Settings => Personalization.

What happens if you turn it off?

Yes. I had that setting enabled when I installed the update.

  • Turning it off, the PowerToys Run prompt shows up normally.
  • Turning it back on, the PowerToys RUn prompt continues to show up normally.
  • With Show accent color on title bars and window borders ON (and PowerToys showing up normally), I
    • Disabled PowerToys Run from the PowerToys menu
    • Re-enabled PowerToys Run
    • PowerToys Run now shows up as in the screenshot I posted earlier (broken state).

fuzzzerd avatar Dec 07 '23 14:12 fuzzzerd

This is still occurring on v0.78.0.

fuzzzerd avatar Jan 31 '24 16:01 fuzzzerd

External issue: https://github.com/lepoco/wpfui/issues/595

Jay-o-Way avatar Feb 06 '24 13:02 Jay-o-Way

@bbronisz As you could have read, we are aware of the issue, but it's external, so not in our hands.

Jay-o-Way avatar Apr 11 '24 11:04 Jay-o-Way

This just got worse with the update to 0.81.0, since the Acrylic background which kind of hides this was replaced with the Mica one. Looks like this now:

Screenshot

It would maybe be nice to have an option to switch back to the Acrylic background instead of the Mica one, as I really liked the look of it and never had any problems with it crashing.

Tschipcraft avatar May 22 '24 11:05 Tschipcraft

Work-around is in the latest version (although not everybody is happy with it...)

Jay-o-Way avatar May 29 '24 16:05 Jay-o-Way

@Jay-o-Way The fix for this issue, while keeping the mica effect, is to use DwmSetWindowAttribute to set the DWMWA_CAPTION_COLOR attribute to 0xFFFFFFFE - this causes the title bar colour to not show when the mica effect is enabled with DWMWA_SYSTEMBACKDROP_TYPE. However, this behaviour is undocumented here. I'm assuming this is what Notepad does as it has a mica effect in the title bar but doesn't have this issue.

aquinn39 avatar May 30 '24 12:05 aquinn39

@aquinn39 Thanks! @lepoco is this issue on your radar? What is the coupled issue (number) in your repository?

Jay-o-Way avatar May 30 '24 12:05 Jay-o-Way

Hey @Jay-o-Way, I am aware of the error and I have already had several independent attempts but I have never found what needs to be changed, but what @aquinn39 mentioned seems like a solution.

pomianowski avatar Jun 10 '24 13:06 pomianowski

I'm assuming this is what Notepad does as it has a mica effect in the title bar but doesn't have this issue.

That's too quick of an assumption. (1) I do not assume Microsoft uses a third-party (!) framework for their own official apps, and (2) Notepad has a TABBEDWINDOW, which is not the same style or backdrop (Mica Alt is used)

0xFFFFFFFE

Strange value... Where does that come from? 🤔 So, this isn't a matter of DWM_SYSTEMBACKDROP_TYPE ?

Jay-o-Way avatar Jun 10 '24 15:06 Jay-o-Way

@Jay-o-Way I should clarify, I have tested and used this myself. Perhaps I didn't make that clear - I can confirm this does work, I didn't just pull that value out of nowhere. I just used Notepad as an example of an app that has a Mica background without this issue. Also, I am aware Notepad uses Mica Alt, this works on any type in my testing (except for DWMSBT_NONE of course). As for where the value comes from, look under DWMWA_BORDER_COLOR here. This value appearantly hides the window border, so I thought maybe it might work for the title bar as well, which it did (though only when a transparency effect is applied with DWMWA_SYSTEMBACKDROP_TYPE)

aquinn39 avatar Jun 10 '24 18:06 aquinn39

Great explanation! Love that! 🤩🤓

Jay-o-Way avatar Jun 10 '24 20:06 Jay-o-Way

Fixed in https://github.com/lepoco/wpfui/pull/1122

pomianowski avatar Jun 11 '24 00:06 pomianowski

@niels9001 @jaimecbernardo I suppose we need to keep a close eye on https://github.com/lepoco/wpfui/pull/1107 (4.0 RC) then!

Jay-o-Way avatar Jun 11 '24 13:06 Jay-o-Way