 my little head when preparing it I looked at the title I sent back in May or somewhere it was when we did the call for papers and I said you know you want to talk about Weyland protocols but as well you want to talk about XP and XP so exigitus the protocols which I will talk about they're not exactly something about they're not really Weyland standard right so I went about okay let's send up any mail to the organizers and ask them to change the name of my presentation to the program because not entirely right so I went yeah it should be something like talking to apps on Weyland right like what we're doing like David was saying was let's be talking to the apps that is much more understandable but then on Weyland we're not talking about apps right like there's a lot of things that your compositor is going to be talking about so it's not really apps we talk about we talk about clients right and then we were already on a very weird title that doesn't make any sense to anyone that isn't in my little head like I said before and then I said all right let's like forget about this thought and just keep with the original title it's not 100% precise and don't worry I already introduced myself yesterday my name is still the same and I am the same person more or less so we can move on from that like David was saying we're still transitioning from a slightly similar but not entirely state where we are in X11 many of you still are on X11 normally okay let's let's do a little game that you all love raise your hand if you're normally using Weyland nowadays see it's probably 50% so when you have this feeling that everybody's still using X11 it's not really the case I understand that we are these special ones in charge of actually making this Weyland thing happen but I guess that you cut my drift one of the important things that we need to understand about what we're doing right now is that we're working from a shared code base so on X11 we had this humongous code base that is the Xorg Xorg server or Xorg X server that had or all of the features or was supposed to have all of the features and we had to like implement our software in a subset of those features that were over there so we're moving from that from this implementation plus the protocols to talk to that implementation into just a set of protocols so it was talking about we have all of the applications slash clients talking to the compositor in a specific way and then it's up to the compositor to do the right thing this is important in many ways it's important because we get to standardize what we do but also we get the freedom as a compositor to do the right thing and by the right thing being whatever Queen slash Plasma developers want to do because we know better so what does this mean this means that we're turning what it would have effectively been merged request kind of of conversation I mean it's a much request it's a good implementation details but before you are discussing over C code right or how as a feature is is talking about the graphic graphics card it's talking to the different applications right you have to also get this implementation right for everyone on otherwise you would have messed up and and we've all seen this kind of problems especially those of us who were trying to make things work a little bit more well on the development side like it's not like everything was roses over there and now since we're not talking about an implementation itself but we're talking as compositors we have this conversation about how our applications talking to the compositor and back which is a slightly different conversation right like you have to be thinking in terms of which features you have which features you mean to be supporting which features others want to do right and like this big balling of new protocols that you should be having there for example right now the one about the virtual desktop right like virtual desktop one good thing it's a simple concept but it's also something that since it's virtually it can mean anything to anyone right so if you want to standardize that or this kind of thing you need to do it's well freeing to everyone and everybody can do their own thing but it's well constraining enough so that it has an actual meaning right because if you do a super generic protocol then you're actually not well generalizing anything and I'm not gonna say it's easy in the end is well hackers like us talking to each other which is well often not the nicest picture but it has worked quite alright and I think that we're doing great why didn't it change it changes on my laptop so what I want to talk to you about today is the all the upstream aid I did for two specific protocols or implementations on Wayland I will base myself on the experience of upstreaming the activity activation protocol which David flew by and then on the exit desktop portals I'm gonna focus on the global shortcuts which was merged only last week and it's not even entirely deployed just yet but what it's there so I'm gonna take that win and present it at the academy this is my awkward sketch of how these communication would work right like you were saying before it's not just green with apps we have green with the entity desktop protocols for example they can be talking you can have other demons for example running on on your on your system Quinn can be talking to them as well effectively this this wayland thing is a socket that you listen you send messages and receive them from much like you would do in an HTTP server or something like that right and then you have the apps the apps could be sent about it which I tried to symbolize with a box but they don't have to be and they sometimes are not and something we actually do leverage in in plasma as well is that if you don't sub box something in a specific way you can even give some clients specific privileges like you wouldn't let everyone do screencasting of your system but if if I really really know you then you get to have that privilege this is very very roughly what the well and protocol looks like and this is what people will be discussing over I tried to make something stupid here but so you get an idea of what I'm talking about we're we don't need to understand it you don't to feel like you have to understand it but basically what you would be seeing here is the protocol which would be a number of objects an interface which would be an object and then there's requests which is a method and an event which is a signal and they all can have arguments right like this is the big picture I think that it's maybe understandable enough so that we see what what we're talking about now when do we want a new protocol so that there is not like a black and white kind of thing it is a continuum and also we have a number of different IPC systems on on linux we have debuts we have while we learn we have x11 xcb is etc and we have others right we're gonna want a protocol when we want to leverage these connection that we already have between the compositor and the application I think that is one of the most important things like the compositor already has a connection with an application and if you are talking things that are important in the context of that community of that relationship it does make sense right like for example we can think about if Quinn wants to talk to power devil like the power management system we could be talking about it through Divas which is how we've been doing this kind of things we could have a way a wayland socket over there does it make sense for for us to be implementing it through well and maybe now if the Divas position is there what are we does it make any sense to to use one to one relationship with power devil if any everybody else is also talking to power devil like we're using we're using power devil as a service for those of you you don't know so I would say I think that the best way to see how we're using protocols anyway is to look at the protocols so up there you can see the ones that we're keeping for ourselves because we're selfish people and down there you can see the ones that we're all working on together obviously and as discussed earlier the our own will be always more specific and targeting to a very specific kind of feature probably also things that need more like tight handling and making sure that like there's no information getting leaked whereas the generic ones they're all more complex I must say I showed them and was talking about how simple well and protocols are some of the standard ones are easily like few thousands of lines of XML code talking about signals back and forth it can be complex but you get idea now instead of talking about how to use a protocol I am referring to you to the presentation I did on alias 2020 but if you didn't watch it and have no intention the version would be there is this tool that you pass the XML code into it and produces C++ code that you can call and does the right thing you need to tune it a little bit to make it work with the rest of our things but it's it's fairly simple actually if you look at how we've been doing it in in KD over the last few years we've actually gotten quite better in that we used to meet a big big loads of sorry about that of code to do to do one way on protocol implementation and now with a few tens of lines you can you can do it like I still remember the first times I was talking about this with Martin Grasslin and it kind of felt super well hard so now I'm gonna talk about something very similar because it's the application wanting to have some presence in in the operating system but it's not such like direct conversation between the the application and the compositor we have something in the middle which we call the XDG desktop portal service just to simplify and then so you understand how this works the XDG portal service is it's a diva service and nothing more it's something that you can like call from your command line right now you can create you don't can talk to a number of interfaces that are available over there then you can have applications talk to the XDG desktop portals and the XDG desktop portals will be talking to the back end in the case of plasma which is what we all use then it will be to the KD implementation event which will be talking about Quinn if we're doing graphical things or I don't know screencasting or stuff but it can be talking about other things you could have a portal about I don't know accessing your address book right then that wouldn't make any sense to be talking to Quinn but it's a way for application especially sandbox applications to be to be accessing information that is not available to them for security reasons but our implementation can find ways to figure out whether it made sense more often than not by just asking the user if it makes sense to like offer this information and move on with it so how it is implemented both at an application site and a portal site it's just implementing a diva service I guess you've all used it who has never used divas in the room and is a developer okay so we can have above you and you and you don't leave until you know everything that is to know I'm joking but we can look into it if you find it interesting but otherwise it's it's fairly simple right I was saying it just implementing this divas thing if you're implementing a new XDG desktop portal on like the shared thing that we share between us and no man everything it's you need some glib code that isn't super beautiful but it's still well necessary that communicates well the interface that your application will be talking to with the portal that is well specific to your implementation so this code needs still to be writing which is basically boilerplate code that that you'll find you get to copy and paste very effectively so yes as you can see it's easy is it scary no but maybe a little bit but you don't need to be like put up by that it's something that it's that needs to be doing sometimes and if we I think that if we're in the right mindset and if you see that the use case is there it's something you should be doing something that I found very interesting or very useful for for example working especially on the XDG activation protocol was to just research what people were had been done over there so what happened over there was that there were when we are using Waylon back then we needed this activation protocol right like you sometimes need your clients to be popping up on the user's attentions and what it was something that everybody knew that you had to do everybody was kind of frustrated and there had been tons of conversations over the Internet about how this should be done but nobody had sat down and said okay let's write the protocol the protocol right now it's maybe I don't know 50 lines of these XML code I talked about right it's not nothing complex or or anything like that so it was mostly a matter of seeing what people said I want this this this and this I'm putting it into an interface and say okay now review this it was probably my first or second Waylon protocol I wasn't even that good at it not that I am right now but I think that it was what the community needed to get the conversation started and on and somebody who like pushed through all of these reviews and you should change this letter for from these to that because some people are more nitpicky than others and that's it talking to people is also important and it's also something that we don't do enough and I am talking about for example reaching out to the different communities for example talking to the no maintainer it's it's something we did for example for the activation protocol as well we have the meeting with them and said all right you want this we want that how do we do it you get to talk about other things and it don't need to have a five minute discussion you can talk about whatever other problems you might have and it's always always a good thing and it's also a good opportunity to to get other problems addressed right yeah I see we had once and yeah talk to your your people like it's it's something that can easily happen to us that we're very focused on the problems that we have in ourself and we really want to fix this but having the conversation with others and for example using academy to see I need this protocol I need this this way of doing this thing because it's important for my use cases for whatever I think that it's what it's gonna make the well the standards the better and the easy to the easier to be adopted and and did it and since it's mostly about talking then just remember to be nice to ask to try to empathize with the others before trying to do your thing if you want to do your thing anyway you can create just a plasma protocol right when we're standardizing it's to make something for for everyone and and to do it we need to be like good human beings not that we are not or that I have seen anything that was terrible right but I think that it's always a reminder now if you have any question for me and for David it's probably good moment to do that one thing one thing I realized is that many times the protocols before they are standardized they are so yeah no yeah so before a protocol is made standard usually there's an implementation that only Queen supports and many times there are two competing implementations or even three for example ya quake cannot position itself on the top of the screen on genome but wake can but wake won't work on plasma and ya quake can so there are two protocols the two different protocols for doing that you know no there's even more actually why we are standardizing like layer shell is because you we want to be able to do this kind of thing right so you need you need to have some time to get there but it's also good thing right like if we got one implementation super quickly because it's super important to have ya quake work on one oh then we might get it wrong and for no reason so I think it's a good thing actually well I'm worried that it will fragment the desktop like I mean it certainly has fragmented the community of sliding from the top terminals but if it's for the best of the community I think that we can do it anything updates takes screenshots like many many things broke well I mean it's a good thing like screenshots do you really want every application to be taking screenshots of your application that's what we're running out again away from we don't want every application to be spying on what our users are doing so like it's very on purpose that we don't have these features now if you call that broken it's maybe because you want like more maybe liberal operating system that like lets you do all kinds of shit we're working on this direction and all of the things can be done right is it fragmentation or is it us doing things properly for the first time on the next well no no no no try it the the reason it's not something you can do I cannot you cannot create an application a third party application for plasma today and take a screenshot without either having to like come from the show or having to be popped up and say do you really want this application to be taking pictures of your stuff and this is what we've been working for a question from the online audience are there any legacy wayland decisions that were taken in the early days which were later determined to be mistakes we're living with now I don't think mistakes but but but things that some you would do different now because make some stuff harder like the big point is fractional scaling and how it currently works is that you tell a app render at two times scale and then your compositor will scale it down and it's people sometimes claims it's bad or wrong but it isn't it's like how make us works they do it the same but now we are we are wanting to do proper fractional scaling like like rendering at 1.5 scale and that's a bit complicated because everything before is always in integers and maybe a way of looking this up in a bigger hand side is the execution protocol I think that it's at the 7th version if it's at the 7th version it's because it became the stable one yeah but like the 6th before that somebody probably fucked up or forgot about something and that's that's perfectly fine I mean we're all live any other questions from the audience okay thank you very much Alex and David