 Hello and welcome to yet another episode of I am ready to bet that you did not even see this bug, but nonetheless I fixed it. So let's get into today's little bug and I'm going to show you the bug and then I'm going to tell you that there's a bug because even showing it to you isn't enough to make you actually notice it. I'm ready to bet on it. So the first thing we're going to do is to turn off compositing. I'm booted up into an x11 session just for that because on Wayland can't do that. And the key combo I think is shift alt fn f12, something like that. Let me try. Yep, that was it. You can see that we lost compositing and you can very easily see that because we lost the shadows as an example. You can also see that the panel is red. Why is it red? We'll get. Okay, so this is a normal session with compositing off. I had some patches that made the panel red but again we'll do it. What I'm going to do now is this. Boom, done. Did you see the bug? Look carefully. Are you seeing the bug? Look now and look now. I don't know if it's hard to notice, so if it's not there at all actually. I think I booted up without my fix, but it could actually be fixed already. So what is going on? So you need to know that there's actually two different kinds of opaque panel. So you know, by default, plasma's panel is transparent. You can make it opaque or adaptively opaque so that whenever a window is maximized, the panel gets opaque. However, again, there are two kinds of opaque. One is called opaque. One is called solid. And you might actually ask, wait, who is the developer who decided to have two different kinds of opaque panel, one called opaque and one called solid. It's me. I am Nicolas. So let me quickly explain that. So we have the transparent panel and then we have a version of the transparent panel that is completely opaque, just like the transparent one, but opaque. And that is actually called solid. Whereas the opaque panel is a bit like the transparent panel, but you also get no shadow and no rounded corners. And the opaque one is meant to be used whenever compositing is off, whereas the solid one is meant to be used as an opaque version of the transparent panel. That was tough. So how do you actually see this? If you go into the source code of Plasma Framework and you go into the desktop theme, this is Breeze Light, Breeze or something. So you can see that you have opaque and you have solid. So again, this one is for when compositing is off. This one is the opaque version of the panel. Nice. So what's happening? So whenever I turn off compositing, you can see that the panel is opaque, but actually it's solid because that is what is meant to be used. However, when I actually move this window underneath the panel in theory or maximize it, then adaptive transparency comes into play and makes the panel solid instead of opaque. If you're confused, please start the video again and watch this first part until you understood what's going on. So we've got adaptive transparency that gives us the solid panel when in theory we should have the opaque one because compositing is off. What is going on? Why is this up? The reason is actually really simple. Basically, we have the code that says, okay, take the normal panel SVG and then take the solid panel SVG. And when there is adaptive transparency, then you can switch between the normal one and the solid one depending on whether we have a window maximized or underneath the panel. That is all nice and fair. However, when compositing is disabled, in theory, both of these SVGs should become opaque because the opaque one is the one that should be used when compositing is off. But actually, this only happens for the normal panel. The solid one, since we're specifically asking for the solid version of the panel, well, it doesn't automatically switch to the opaque one. So what did I do? How did I fix this? And I'll actually get to the question who cares in very soon. Today, my camera is a bit buggy. Well, okay, this is the fix, and this is the change in code. Pretty simple. Firstly, we edit the state triggers. What are the state triggers? So the panel has different states, opaque, floating, non-floating, all of these things. And there are a series of values. And whenever those values changes, then it tells us that it should be time to check whether we also need to change the status of the panel. These triggers are, is the panel supposed to be floating? Is the screen completely covered? Is the panel supposed to be always opaque? Is it supposed to be always adaptive? These kind of things. So we now simply add a new value to check, which is is compositing active, because obviously, when we turn off compositing, we want the panel to know that, to realize. So we just add. So what happens when these state triggers are changed? Well, we leave pretty much everything unchanged, except we just add. If compositing active is turned off, so compositing is off, then make sure that the panel opacity is zero, which means that the panel will not be opaque. And opaque outlets will be false so that the outlets will also not be opaque, because that would also override the correct SVG. Just by doing this, we say never go for the solid SVG. Always go for the opaque one if compositing is disabled. This explains why my panel was red. Why was it? Because I couldn't tell the difference between these two. So what I did, I went into the Plasma SVG. I took the opaque version of the panel and I just painted it red, so that I would finally be able to notice this bug, which brings me to my final point. Why did I fix this? Why should anybody care about a bug that is this small? Well, first of all, if we want Kitty Plasma to feel polished, then we also need to address the smaller bugs. Secondly, yes, on Kitty Plasma Breeze, which is the default theme, it's very hard to notice difference between solid and opaque, that is, an opaque panel and an opaque panel when compositing is disabled. However, Breeze is not the only theme on the store. And there is another one, which is used in FerronOS, the FerronOS theme. And apparently in that theme, the difference is more noticeable. I am not sure why, because I didn't try them, but apparently that is the case. So I think that the developer of the distro opened a bug to tell me that there was a bug, which was nice. I actually took an embarrassingly long period of time to have the time to just do this four lines fix, but now it's here. And I mean, here it is. We've got a fix for the bug that is so small that I'm not even sure if I can reproduce it right now. Maybe it's not there, maybe it's there. Who knows? What I do know, however, is that I'm actually receiving a lot of donation from all of you and I'm super happy. So thanks a lot to all of the patrons and stuff. And yeah, thank you so much. If you want to join the community of people donating to me, you've got links and instructions here. And normally I zoom in, but I can't with this, with compositing disabled. So thanks everybody for following and see you tomorrow, hopefully with yet another video. Bye.