Curiosity: Why does the properties panel only show the text in the taskbar preview? #515
Replies: 1 comment 1 reply
-
Hi Well, let's get technical. The background color of the window is actually black. The memory area where I draw the stuff on the window is initialized to zeros. The size of this memory area is So normally, the window should be invisible if you account for the alpha channel which is 0, or all black if you do not account that, and only the text be drawn in black with an alpha of 1, which means opaque, but out of the box, alpha is disregarded and everything is opaque anyway. So you would see a black window with black text, so basically a black window. The things displayed on the screen in modern Windows versions (since Windows Vista) are not rendered directly by the applications. Instead, all applications render their content to off-screen surfaces. There is a program, the compositor (
Let's concentrate on the last point. Windows' compositor implements numerous effects, like Aero Glass in Windows 7 and below, and some exotic stuff, like Acrylic and Mica brushes in Windows 10 and 11, respectively, to name a few. How do those work? Well, when I draw the Properties GUI, as I said, by default, the window would be black. But I also request the compositor to use the Mica brush over this window when presenting it on the screen. A brush is basically an image. The Mica brush is a blurry image based on the contents of the desktop wallpaper. Requesting the use of this brush over my window has the following effects in the compositor:
There isn't much control about this at the level of my application level. When I request the compositor to draw using the Mica brush over parts of my window, I gave it the freedom to alter my visual with that however it sees fit. I mean, it is already free to do whatever it wants, since it is the only thing that draws directly in the screen buffer anyway, but by that, it knows that doing similar but not exactly the same stuff I requested can’t break my visual of the app. Similarly, when So, the compositor is to "blame" here, as it has free hand to do represent certain areas of my app in certain ways, and it chooses to so when it comes to visual representations offered to other apps via the thumbnails API. Yeah, it looks weird, but that's simply because of the way it works. Of course, So, screenshot of my application directly would not work. You still have to get that through the compositor to get something useful for some apps, so So yeah, that's the full technical explanation. I know, it is rather long, but hey, modern computing is always overly complicated. All the nice effects do not come for free and aren't cheap. That's why the Properties GUI does not have effects when hovering the mouse over its elements. As I said, that's not for free, and I simply haven't bothered implementing those. The interface is 100% drawn manually, no GUI widgets toolkit is used, so mouse hovering over stuff has to be implemented manually as well. So yeah, it's not
You will see, you still get a taskbar thumbnail of full acrylic, even though the window on screen would be full Mica. And you similarly would seem to get no window thumbnail of my other window if you create another window and register a thumbnail of the other window with
And that's because it has this behavior where it actually uses the last effect in the chain when drawing a thumbnail, for whatever reason. The thumbnails API is public, so you can look up on MSDN how to use that. The snippets I published for enabling Mica or Acylic brushes are not documented. Oh yeah, forgot to mention that, it's not officially supported, applications are not supposed to use those. But I mean, what is documented these days, EP is a giant pile of hacks and uses of undocumented functionality from Windows. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ExplorerPatcher Community,
This is not a serious topic, but rather, just a small question of curiosity that I would like to share with the hope that through an answer, I will learn something about how this all works.
I have noticed that if you look at the preview thumbnail for the ExplorerPatcher properties window in the taskbar, the preview only shows the text as though there is no background window. As I am sure we all know, this is not the usual behavior for taskbar previews. I was wondering if anyone has any idea as to what could be going on here? Why is the background window missing from the preview? I assume it probably has something to do with how ExplorerPatcher is spawning the window in
explorer.exe
?For anyone who does not know what I am talking about, here is a screenshot showing it:

Beta Was this translation helpful? Give feedback.
All reactions