<div dir="ltr"><div dir="ltr">> > > How do we handle HiDPI?<br>> ><br>> > Create an array of wl_buffers, one for each screen, where each wl_buffer holds<br>> > the mouse pointer in the associated screen's resolution.<br>> <br>> Right, so we need to add a "scale" parameter in the protocol somewhere.<br><br>I lost you on this one. I was thinking that the compositor would be responsible for applying the appropriate scale to the wl_buffer associated with each screen, so there would be no need of a separate screen scale factor in the protocol. So both HiDPI and scale of each screen would be addressed together by the content of the wl_buffer. The toolkit would be responsible for choosing the wl_buffer associated with the screen that the application is being shown on. (So I'm assuming that the toolkit / application, knows which screen the application is currently being displayed on). <br><br>I imagine that toolkits, in general, would be interested in knowing the screen scale so they can show custom mouse pointers and other screen content appropriately, but since screen scale is associated with screens and not the mouse, is a Mouse Pointer Extension be an appropriate place to include a screen scale factor? (i.e. touch-screen compositors would need to support the Mouse Pointer Extension to publish the screen scale to toolkits / applications). <br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 11, 2018 at 3:38 AM Simon Ser <<a href="mailto:contact@emersion.fr">contact@emersion.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wednesday, October 10, 2018 4:48 PM, Michael Arnold <<a href="mailto:myk321@gmail.com" target="_blank">myk321@gmail.com</a>> wrote:<br>
> With regards to using XCURSOR_SIZE, I worry that this approach is going to<br>
> enjoy varying levels of support across desktops and applications over time,<br>
> for example<br>
> 1. Fedora 28, that has Gnome on Wayland as the default desktop, but does not<br>
> set XCURSOR_SIZE.<br>
<br>
That's normal, it's not included in any kind of standard right now, and only Qt<br>
and X11 apps support it.<br>
<br>
> 2. Tools like gsettings need to be changed to update XCURSOR_SIZE and<br>
> XCURSOR_THEME when the user changes the associated parameters.<br>
> This will take time.<br>
<br>
Yeah, I don't expect this solution to support live updates. That's a good point<br>
in favor of a protocol.<br>
<br>
> 3. Desktop application maintainers are poorly positioned to detect and set the<br>
> appropriate cursor size when the Qt application starts because, like the<br>
> toolkit maintainers, they face a variety of Wayland desktops each with a<br>
> different mechanism for setting the mouse pointer size.<br>
<br>
I don't understand this one. App developers shouldn't have to worry about this,<br>
the toolkit should pick XCURSOR_{SIZE,THEME} automatically.<br>
<br>
Anyway, we both agree that a protocol is needed.<br>
<br>
> > The client would for instance ask "I want the default cursor image for<br>
> > seat0" and the compositor would create a wl_buffer containing it<br>
><br>
> This approach makes the most sense to me. It means that the compositor hides<br>
> their mouse pointer library behind a standardised Wayland extension and thus<br>
> the compositor's mouse pointer library and settings tools can evolve<br>
> independently of the applications and their toolkits.<br>
<br>
Indeed, that's the idea. So we must be careful not to expose xcursor specifics<br>
in the protocol.<br>
<br>
> > ...do we expose an enum with a list of cursor images or do we allow clients<br>
> > to load arbitrary cursor images?<br>
><br>
> Following the logic above, the enum's make more sense to me: I see that<br>
> XCursor has a cursor type and sub-type (to indicate size) associated with each<br>
> pointer image and Qt has a list of pointer types<br>
> (<a href="http://doc.qt.io/qt-5/qcursor.html" rel="noreferrer" target="_blank">http://doc.qt.io/qt-5/qcursor.html</a>). Possibly we could use these as basis.<br>
<br>
That makes sense to me. Note that not all cursor themes support all cursors.<br>
<br>
> If the application wants to load its own mouse pointer, it can do that,<br>
> possibly with the toolkit's help, if available.<br>
<br>
Yeah, apps can always use the current set_cursor request with a custom buffer.<br>
<br>
> > How do we handle HiDPI?<br>
><br>
> Create an array of wl_buffers, one for each screen, where each wl_buffer holds<br>
> the mouse pointer in the associated screen's resolution.<br>
<br>
Right, so we need to add a "scale" parameter in the protocol somewhere.<br>
<br>
> I see XCursor also supports animated cursors via multiple mouse pointer images<br>
> and an image sequence. To support this, we'll need a count of the number of<br>
> wl_buffer images provided.<br>
<br>
Aye.<br>
</blockquote></div>