6 ms·
Win32 Window Custom Title Bar (Caption)
- xg15 5y agoFully expecting a Raymond Chen article in a few years along the lines of: ... and this is why in Windows 12, the compositor switches into a special mode if a window tries to draw the very top line of pixels in a slightly darker color than the rest of its pixels ...
- adrift 5y agoThat's Windows' fault by making the task not by any means straightforward in the first place.
- BearOso 5y ago> From what I can tell up to and including Windows XP the painting was done in software, i.e. the CPU was processing all the pixels of the window. I also believe that the frame and the client area were painted into the same pixel buffer that would eventually be copied to the main screen buffer. On non-compositing windowing systems each window is designated a region of the front buffer to draw directly to it. Drawing outside that region was unrestricted and easy. The rounded corners in Windows XP weren't hard-coded anywhere, they were just transparent parts of the bitmaps used in the theme engine. Even though they were transparent, they behaved like the opaque parts of the window border.
- NWoodsman 5y agosource? (I only ask because you sound knowledgeable and your answer implies some hefty interesting legacy) A better way to put it is OP is a "reverse engineer" whereas you sound like a "forward engineer"
- BearOso 5y agoFor the first part, look up Stacking Window Manager on Wikipedia. As for Windows XP's transparent corners, I used to make msstyle themes back in that era, so I happened to know how the theme engine works.
- tinus_hn 5y agoOn XP you don’t paint into ‘pixel buffers’, you just paint onto the screen. What you paint however is clipped by a mask, defined by clipping regions. I don’t know for sure what Microsoft used for their themes but it is far more likely they used the mechanism that already existed for arbitrarily shaped windows, the clipping regions, which happen to nicely match what they tried to do with these rounded windows, instead of using bitmaps, which is less efficient and new.
- thedeadfish 5y ago> From what I can tell up to and including Windows XP the painting was done in software Defamation and blasphemy of the highest order. In XP the GUI was fully hardware accelerated and highly performant. Possibly the most perfect thing to have ever been created. In vista this was all torn out and replaced with software rendering that ran like treacle. All for a transparent window gimmick.
- Liquid_Fire 5y agoAre you talking about the compositing? I haven't used Vista, but I definitely remember that in Windows 7 you couldn't use the glass theme unless hardware acceleration was working, because it relied on compositing on the GPU. Windows XP supported partially transparent windows, but I'm not sure if this required hardware acceleration or there was also a software rendering fallback.
- screamin_jesus 5y agoah yes, the most perfect thing to ever exist: https://i.imgur.com/X5BzWQj.jpg https://i.imgur.com/X5BzWQj.jpg there's plenty of things I don't like in newer windows versions, but the introduction of compositing is not one of them
- hulitu 5y agoWindow management in Windows 10 is a mess. Resizing is a challenge due to missing window borders especially on high resolution monitors. Title bar is filled with useless crap instead of buttons. Moving windows between screens is hard because you need to aim the center of the screen. Why are years of work thrown in the trash only for the sake of change ?