Open WLCIssuesBot opened 7 years ago
Comment by Cloudef
Thursday Sep 01, 2016 at 11:01 GMT
Right, setting pointer is sort of anti-pattern in wayland ecosystem. Normally compositors have root level shell that sets the pointer surface (e.g. clients control pointer). Wlc just provides hardcoded default when there is none, and because of this I haven't really exposed any mechanism for customizing it.
Comment by kozec
Thursday Sep 01, 2016 at 11:20 GMT
So, basically, preferred way to do anything where changing cursor makes sense (dock, statusbar, decorations...) is to run it as separate wayland client?
Comment by kozec
Thursday Sep 01, 2016 at 12:01 GMT
That's gonna overcomplicate things in rather crazy way :(
Comment by SirCmpwn
Thursday Sep 01, 2016 at 12:03 GMT
swaybar and swaybg are both surfaces from seperate clients, ftr.
Comment by kozec
Thursday Sep 01, 2016 at 12:55 GMT
But swaybar, AFAIK, doesn't really communicate with compositor, it just displays unrelated info.
Just to explain what I'm trying to do; I'm playing around with attempt to create more traditional WM for my "2 in 1" tablet. Traditional as in "draws borders and titlebar around window" sense. I already have that drawing part done, but I can't signalize when mouse is hovering over that border.
AFAIK, Wayland has no official way how create "decorator" as separate process, because there is no protocol to request info about foreign windows. And, of course, since every real application actually uses XWayland, no window has CSDs drawn by client.
Comment by SirCmpwn
Thursday Sep 01, 2016 at 13:04 GMT
It does communicate with the compositor, using a combination of the i3 IPC protocol and wayland extensions.
Comment by kozec
Saturday Sep 03, 2016 at 08:27 GMT
Ok, long question before I close this.
I tried to read little in libweston, but if that thing is documented anywhere, I was not able to find that docs. What I'm trying to do is kind of quick and dirty work (without selling it to MS though), so libwlc looks like closer tool for my needs.
So I'm going to clone it and make some adjustments. Namely this, then option to implement and set custom rendered (as defined here, but apparently not accessible from outside) and, if possible, option to intercept and synthesize input events. I'm trying to run it on tablet and my main purpose right now is less painful screen rotation.
Question is, @Cloudef, would you accept some of that as PR? It may be little out of scope of libwlc, but I believe it may be useful for others as well.
Comment by Cloudef
Saturday Sep 03, 2016 at 13:04 GMT
It depends how cleanly you can get it implemented. Just saying this is not how pointers are intended to work with the wl_pointer protocol.
Comment by Enerccio
Monday Apr 10, 2017 at 09:50 GMT
well what if you have your own render loop set up in on output post render where you throw garbage wlc has rendered and render all views as textures? Where can you get pointer texture from view, since you have to render that pointer separately?
Hello and sorry, it's me again :)
I'm wondering if there is any way how to set mouse cursor from compositor side.
I already found that there is suspiciously looking method wlc_pointer_set_surface, but this method doesn't seems to be available in any file in /include directory.