Neither way works in Wayland. A program can know where it was clicked but not where the pointer was immediately before that. For that matter Wayland doesn't have a concept of "the" pointer; there may be multiple pointers.
> Using the wl_seat.get_pointer request, clients may obtain a wl_pointer object. The server will send events to it whenever the user moves their pointer, presses mouse buttons, uses the scroll wheel, etc — whenever the pointer is over one of your surfaces. [...] The server sends this event when the pointer moves over one of our surfaces, and specifies both the surface that was "entered", as well as the surface-local coordinates (from the top-left corner) that the pointer is positioned over.
So the program should know the pointer's local coordinates.
Hover is done by the client telling the compositor it would like the cursor to change its shape if it is over a certain area the client is drawing. But the client does not know where the cursor is or where on the screen the client is (or even if the client is visible at all).
Fully agree on templates but I use Phlex to build UIs with pure Ruby on the server side. A pleasure to work with. And with something like Datastar, reactive UIs with practically no js.
I really don't like Hotwire and FE history (I'm playing with htmx, Datastar, Phlex and love it) but the ActiveSupport autoloader -> to Zeitwerk migration was pretty much something in the background, an implementation detail, at least in my experience. Most devs don't even know what is all this about.
No, stacking in i3 (that's what I was referring to) it's vertical tabbing. I've seen that Niri supports tabbing so I guess I just have to give it a spin to see if it fits.
I like it, specially the Phlex choice. I'd like to know if this framework would work nicely with Datastar js library and its extensive SSE usage. Thanks
reply