Dan Kegel : winecfg: Restrict dpi slider to sane values.

Tijl Coosemans tijl at ulyssis.org
Sun Apr 27 07:31:00 CDT 2008

> "Dan Kegel" <dank at kegel.com> wrote:
>> On Sat, Apr 26, 2008 at 7:54 PM, L. Rahyen <research at science.su> wrote:
>>> 200 DPI limit is acceptable for most users. However, what this patch
>>> done by setting maximum to this small value (144) doesn't seems to
>>> be acceptable.
>> Users really are lost if they set a too-high value.
>> They don't know how to do alt+mouse_move.
>> Thus simply setting the limit higher again would
>> be a support nightmare; we got a preview of that
>> on wine-users recently, with user after user panicking.
>> But as I wrote in http://bugs.winehq.org/show_bug.cgi?id=9715
>> we can probably do something that will make everybody
>> happy: arrange for winecfg to never let the user set
>> dpi so high that winecfg is bigger than the screen.
>> That's probably pretty easy to do.
>> And we can probably make high-res users happier still
>> by defaulting to Xft.dpi (used by Gnome and maybe KDE;
>> it's set by default to 96, but is increased by some users
>> of high-res displays).

IMO the Mozilla page you linked to in the bug is the correct approach.
Users should set the DisplaySize setting in their X server
configuration (if it isn't detected automatically). And applications
should (by default) use the X server DPI calculated from that.
Applications overriding the X server DPI are bad when you start to
run them remotely.

If users want a graphical way of setting physical display size, then
that's a job for the desktop environments to provide some tools to
configure the local X server.

The only time Wine should have to worry about DPI is when running
apps that haven't been designed with high DPI in mind and therefore
don't scale well (for instance when font sizes are set in points and
other GUI elements are sized or positioned using pixels). But for those
apps it might be good enough to provide a simple checkbox that says
"override DPI to 96" or some other sensible default value. I don't know
if there actually are such apps.

More information about the wine-devel mailing list