Can I get some non-squished circles, please? Or get input squares preserved as screen squares?

Michal Suchanek hramrach at centrum.cz
Sat Mar 12 12:02:21 PST 2011


Hello,

I thought that the property of a circle that it has the vertical and
horizontal diameters equal is well-understood.

However, the X server begs to differ.

First it has some DPI calculation algorithm that has a number of
interesting properties including that for two monitors with square
pixels you can get screen with flat pixels, narrow pixels, and
completely different pixels every time one of the monitors is detached
and reattached or even worse, one of the monitors changes resolution.

Ideally the toolkits should read the DPI per monitor but since that is
not the case the screen DPI sould at least somewhat reflect the actual
monitor DPI, such as being the DPI of the primary monitor by default
(meaning this interesting calculation algorithm will not be invoked,
leaving the DPI a somewhat predictable value).

The other place where the circles are squished is when I attach a
tablet to to the PC.

X server just maps the tablet to the screen regardless of aspect ratio.

Initially my screen had .8 aspect ratio, now it has .5 aspect ratio,
the tablet is .625 aspect ratio (assuming its points are square, I am
not quite sure of that).

With the .5 vs .625 the mismatch is not that bad but the .8 vs .625
gave noticeably odd movement.

Note that the remaining part of the tablet need not be wasted, in the
case of .8 vs .625 there would be enough space left that could be
probably used for some OCR/gesture application that adds the ability
to send some random key events with the tablet. Unfortunately,
splitting the device surface into multiple logical devices does not
seem to be supported anymore.

While I can probably run some tabletd in my X session to poll the X
server for xrandr changes and input device changes (or could these be
selected as events?) and set up the tablet. Still the concept of
circular circle is universal enough that I think it is reasonable to
have it supported in the X server. Also I am not quite sure how this
tabletd would work in the cases when the tablet is attached to an
application window to be used with the application exclusively. I do
not use this mode of operation.

I am also not quite sure how this works with relative motion, in the
past I had an issue that the tablet would move at vastly different
speed vertically and horizontally due to aspect mismatch. I am not
using relative mode anymore so I can't tell how it works now, and I
have no idea how the aspect ratio would be set for this case.

Thanks

Michal


More information about the xorg-devel mailing list