[PATCH 00/15] weston scaling support
Bill Spitzak
spitzak at gmail.com
Tue Jun 4 13:24:21 PDT 2013
John Kåre Alsaker wrote:
> And I'm worried that high-resolution pointing devices will be
> ignored by clients that immediately round to the nearest buffer pixel.
>
> Presumably they wouldn't use the high-resolution for anything then. I'm
> not sure how this relates to the topic either.
A client has to round event if it wants to do high-resolution, because
it wants to align positions with things in the buffer. This gets pretty
important with 3D modelling, lots of users and software assume that the
mouse will stop on exactly the same fractional positions, and under your
proposal this would change.
For instance if there is a low-res device and a scale-3 output, then a
client doing a hi-res display will get mouse positions of 1, 1.333..,
1.666..., in that window. If there is no low-res device and the hi-res
one now has a scale of 1, then the client will get positions of 3,4,5.
Multiplying the 24.3 fixed-point representation of 1.333.. by 3 gets
3.996. The client has to round this to 4 or it will align things
slightly different on one system than the other. I can assure you that
this difference is very annoying in 3D software.
The only solution is to figure out the resolution of the pointing
device, transform the fixed-point event positions to the buffer
positions, and then round to the nearest multiple of the pointing device
resolution. I think a lot of software will ignore the "figure out the
resolution of the pointing device" step and just assume it is 1 pixel.
Therefore any possible high-resolution pointing will be thrown away.
Getting the events in buffer pixels would make it a lot easier as they
could be used unchanged. Clients could then just assume any fraction is
due to a high-resolution pointing device.
More information about the wayland-devel
mailing list