Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPI is doubled when specified on the client command line #1193

Closed
totaam opened this issue May 2, 2016 · 11 comments
Closed

DPI is doubled when specified on the client command line #1193

totaam opened this issue May 2, 2016 · 11 comments

Comments

@totaam
Copy link
Collaborator

totaam commented May 2, 2016

Issue migrated from trac ticket # 1193

component: client | priority: major | resolution: fixed

2016-05-02 02:41:55: nathan-renniewaldock created the issue


Since v0.16.0, DPI is being doubled for Windows clients.

v0.15.10-11424:

$ xpra info | grep dpi
dpi.default=0
dpi.value=96
dpi.x=0
dpi.y=0

v0.17.0-r12474:

$ xpra info | grep dpi
dpi.default=0
dpi.value=192
dpi.x=0
dpi.y=0

Possibly introduced in r10953?

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 05:56:55: antoine changed owner from antoine to nathan-renniewaldock

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 05:56:55: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 05:56:55: antoine commented


Are you sure that the DPI is wrong and that you aren't just seeing desktop scaling in action? (#976)
I am seeing correct values, that adjust as I scale up or down (either via tray or ctrl shift +, ctrl shift -)
Please include distro info, dummy driver / vfb info, client and server screen settings and resolution, etc.

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 18:18:13: nathan-renniewaldock commented


It's reporting a dpi of 192 and everything is bigger than it should be, scaling is set to none.
Server is Ubuntu 16.04, xpra 0.17.0, dummy driver is 0.3.7 with the patches from repo.
Clients, Windows 10, tested xpra 0.16.0 and 0.17.0 (3 different systems, resolutions 1280x800, 1366x768, 14490x900), scaling is wrong with them. Xpra 0.15.10 displays as expected with no changes to server.
If I remove dpi from my client config (then it uses auto), it's correct, dpi # 48 is also correct, reports 96 and UI is the correct size. My xpra.conf had dpi96 as that used to be the default.
In ui_client_base.py, the provided dpi (either command line or xpra.conf) is being doubled.

#use command line value supplied, but scale it:
            xdpi = self.cx(self.cy(2.0*self.dpi))
            ydpi = xdpi

Logs:
Client:

2016-05-02 18:22:39,680  screen 0: ('1\\WinSta0\\Default', 1280, 800, 338, 211, [('\\\\.\\DISPLAY1', 0, 0, 1280, 800, 287, 180, 0, 0, 1280, 770)], 0, 0, 1280, 770)
2016-05-02 18:22:39,680  desktop size is 1280x800 with 1 screen:
2016-05-02 18:22:39,680   Default (338x211 mm - DPI: 96x96) workarea: 1280x770
2016-05-02 18:22:39,680     DISPLAY1 (287x180 mm - DPI: 113x112)
2016-05-02 18:22:39,680 dpi: 192, xdpi=192, ydpi=192

Server:

2016-05-02 18:22:46,777  client root window size is 1280x800 with 1 display:
2016-05-02 18:22:46,777   Default (338x211 mm - DPI: 96x96) workarea: 1280x770
2016-05-02 18:22:46,777     DISPLAY1 (287x180 mm - DPI: 113x112)
2016-05-02 18:22:46,777 maximum client resolution is 1280x800 (current server resolution is 1280x800)
2016-05-02 18:22:46,777 set_screen_size(1280, 800) xdpi=192, ydpi=192
2016-05-02 18:22:46,777 set_dpi(192, 192)

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 18:40:07: antoine commented


Hah, I was missing the fact that you're using the "--dpi=" command line option.
You're totally right, the doubling is a mistake (in other places we average xdpy and ydpi, I must have cut&pasted it wrong).

Fixed in r12516. Will be in the next stable update.
Feel free to close.

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 18:43:58: antoine changed title from DPI is doubled for Windows clients to DPI is doubled when specified on the client command line

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 18:43:58: antoine commented


(editing ticket title - I don't think this is specific to MS Windows clients at all, this same code is used by all platforms)

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 19:46:08: nathan-renniewaldock changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented May 2, 2016

2016-05-02 19:46:08: nathan-renniewaldock set resolution to fixed

@totaam totaam closed this as completed May 2, 2016
@totaam
Copy link
Collaborator Author

totaam commented May 25, 2016

2016-05-25 08:01:36: antoine commented


Found another place that needed fixing: r12668.

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:52:23: antoine commented


Milestone renamed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant