On Tue, Mar 10, 2015 at 12:00 PM, Bill Spitzak <spit...@gmail.com> wrote: > On 03/09/2015 10:32 PM, Jasper St. Pierre wrote: >> >> Mouse input is reported in a 24.8 fixed-point format. Subpixel mouse >> locations are entirely possible. > > > Yes events are doing this which is ok. > > There is a problem that clients must round to the correct pixel. If the > rounding done by the client does not match the rounding used by the > compositor to position the mouse cursor there may be annoying misalignment > of the graphics. However this problem exists for high-precision mice > irregardless of high dpi settings, so it is probably best to just document > the rounding that must be used to position cursors: to convert a 24.8 mouse > position to a pixel use (x*scale+127)>>8, the offset must be 127 (not 0 or > 128) and you must use right shift, not divide by 256 (because that will > shift negative values in the wrong direction). > > Events seem to be ok, but my complaint is that a large number of coordinates > in the api other than events are in integer logical pixels, not in high dpi > or in fixed-point. The offsets to attach are the biggest culprits. There are > also integer clip rectangles in the subsurface and scaling apis. Except for > compatibility there is no reason positions in messages cannot be in buffer > pixels.
Please do not take a thread started by someone who is obviously confused and side-track it into a discussion of things that you think are design-flaws in the current protocol. This is not the appropriate place for a discussion of wl_surface.attach (x, y) coordinate systems and bringing that up only adds to the confusion. --Jason > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel