 Yeah, I've done some self-reflecting and the way that the floating panel was handled, like was shaped by me, that was a mistake. That was a mistake. Now that I'm a bit more relaxed and I see how the development of it is going, I think that it should have been a 5.26 feature and not a 5.25. I totally rushed it. So what went wrong and mostly it's the fact that it had some significant issues and many of them were actually known. So I knew it had issues and still it was shipped. And yeah, I did receive a lot of criticism which now I'm trying to address with various bug fixes. So I actually got to work trying to bug fix this. I had like a couple of months where I was busy, didn't do any video now, I'm back to videos and bug fixing. And just in the last week actually two bugs of the panel, sorry, the floating panel has been fixed and you might say like, good job Niccolò, thank you, no, no, no, not me, not by me. But I tried, I helped out as much as I could. But anyway, let's actually see what these bugs are. This is the first one and it is broken corners on dialogue, floating and apple hint. And it seems like it's not related to the panel, broken corners. It actually is. And it is related to using Wayland with scaling. What happens, let me see if I can get a screen, a correct screenshot. Nope. What happens when you do that is that you're going to get a white, weird looking band on the bottom and bottom right. I think I have a screenshot somewhere. I haven't any screenshot anywhere. Okay. As I was saying, now I have scaling enabled, which I hate. I hate scaling like taught and never use that. And you can see that on the bottom of the floating panel, there is this very weird blueish and also on the right. Why is that? Okay. So let's actually investigate what this bug was and how it was fixed. First bug. This is due to the contrast effect. And if we disable the contrast effect, it magically goes away. However, I suggest you to never actually disable the contrast effect because it is a nice effect that makes Plasma look prettier. But I mean, what is the issue? The issue is that the contrast effect is something that is usually drawn underneath applets and the panel in general dialogues. What it does, it takes the colors from the wallpaper, it blurs them. That's actually the blur effect, but they basically do them together. It blurs them and also takes the strongest color and makes it more saturated so that it looks better when you're using a transparent thing, like breeze, breeze, but a fault is actually a bit transparent. So you make sure that if you're using this blueish wallpaper, you do actually have a blueish color underneath to draw the panel on top of. Well, why is it leaking? In theory, it should be only drawn underneath the panel for obvious reasons. And it currently isn't. So what happened? Well, what happened is that this kind of SVGs cannot, can only be scaled by other one or 200%. There's no in between. So even if you're like doing 1.25 scaling, the SVG is going to be scaled at two. And then it's going to be scaled down to fit 1.25. And that sounds okay. That should actually work in theory. However, in practice, I have found the mask to be always double, roughly the double the size that it should be. So the issue is that the mask, which is the SVG element that's the, decides how big should the element be was always two times as big. Now, to actually understand that, we also needed to understand slightly that there's two kinds, two different kinds of scaling. And the one that we use in them, we learned is QT scaling and QT scaling in theory, like abstracts a lot of scaling madness away. So you just say, I don't know, take 10 pixels and it's going to say, yes, it's 10 pixels, but it's actually 10.25 something because they're scaling. But to me, the programmer is that's abstracted away. So in theory, what I should see is that the mask is its correct size. However, I find it to be double the size. So 3000 pixels wide. That is too much. I don't have that many pixels. So how was it fixed? It was fixed by this patch authored by me kind of will get to it. What does it do? Simply enough, it says, let's take the alpha mask, which is the mask that actually says where you should draw the contrast effect. And then if we have a divide pixel ratio, which again is either one or two, depending on your scaling, which isn't one, so it's bigger, then you take alpha mask and you scale it so that it is divided by the device pixel ratio, which is two. So you make it half taller, half wider. That's it. It just works like that almost. This almost worked. It actually took another week for me to realize that for some reason, this value, the device pixel ratio is taken from the alpha mask, which is taken from like the SVG, which is caked actually on your plasma dot cake, like home dot cake file folder, sorry. And whenever we save to cake and then load the file back, the scaling is reset from two to one. So it worked for the first time. And then the second time, it just stopped working because the scaling was reverted to be one, even though it should be two. So what I did is to add another line that says after you get back the mask frame, you take the background and you set the device pixel ratio to the correct one after it's loaded. So you make sure that it's always true. This fixed it. Why do I say it's not my code? Because this part, even though I spent like hours and hours and hours trying to debug this, was actually written by a K-Win developer, Queen K-Win developer who like immediately understood what the bug was and just did the patch. Luckily for me, he actually made, not luckily for me, but he made a typo. It actually closed a bracket in the wrong order, which made this patch to seem like it wasn't working. This means that I had to do this whole investigation, understanding where the issue was. And when after like one month, two months, I opened this patch again. I was actually able to understand it and I noticed that one bracket was in the wrong place. So I just moved it and that was it. Patch 3D plus this one. This one is mine and I still think it's a bit hacky, but let's not get into it. Second bug is this one. And it's very easy to reproduce. As a matter of fact, I have it right now. You can see that there's a shadow around the panel. It's not even touching the panel, but there's a shadow around the panel. Now, floating panel documentation says that the panel should not have shadows. Never. Well, that, it almost seems to work. It works on X11. It almost works on Wayland 2, because if you boot up Wayland, you do not see the shadow, which is correct. What I found out is that if you have something with a shadow and you remove it, that's gonna work. But then if you add it back and then you remove it again, that's not going to work. It only works for the first time in Wayland and always works on X11. So that was weird. And I actually have, just to make you understand, 12 files open of me trying to understand what was going on. Actually, it's seven. 12 was about the other bug. This one is seven. And I was just going through all of these lines of code to understand why was the shadow there? Like, why didn't it get removed? And after again hours, sadly, of investigations, I gave up. And I went to another developer person. I went to the K-Wing chat and I said, hello, I have this bug. Do you have any idea why? That was yesterday. Today, the developer of Queen, Vlad, did a patch, which is not this one, actually. This one, sorry. That just fixes it in one day like that. Wow. I wish I couldn't understand to encode that well. And this is the patch. You could ask me what it does to explain to you, but I only know we need to call org KDE queen shadow manager on set to ensure that the surface state is properly updated. That's the best description that I can give to you. However, this bug, the shadow that's floating around the window is gone, which is great news. So as you can see, I'm not exactly proud of doing many backfixes because both of them were patches by K-Wing developers. So now it's going, it's really more up to me at this point, because the next thing that I will probably focus on is one thing that everybody complained about, which is the panel defloating when I maximize something. People have a complaint that it doesn't look fair enough. Okay. It kind of was like no issue too. Again, when I did the merge request, it was supposed to look a little better, but I couldn't figure out the exact details on how to do that. So I had to do a quick change last minute, but okay, okay, we can try to make it look better. And that's what I'm going to focus on. Luckily, this time, this time, it is all about code that I understand, hopefully because I wrote it. So it's going to be me bug fixing something, France. But that's the end of this floating panels update. And see you tomorrow with another video on this channel.