xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Last modified 3 weeks ago

#2464 new defect

Window size calculations wrong when GDK_SCALE >= 2

Reported by: dancol Owned by: dancol
Priority: major Milestone: 4.0
Component: client Version: 4.0.x
Keywords: Cc:

Description

GDK window scaling confuses xpra's window size calculations. Suppose I run this command:

GDK_SCALE=2 xpra start ssh/mymachine --opengl=on --daemon=no --desktop-scaling=0 --video-scaling=0 --start='xcalc -geometry 200x200'

As far as mymachine is concerned, it's created a 200x200 window. But on my local machine, I get a 400x400 window. In OpenGL mode, xpra renders a 200x200 square in the lower-left corner of that 400x400 window with the rest of the window containing random pre-existing content from graphics memory. In non-OpenGL mode, xpra just scales up the 200x200 feed from the server to the 400x400 size of the client window.

I'd expect xpra to exempt itself from GDK scaling and render windows at exactly the size indicated by the remote machine, modulo xpra's own scaling options.

Change History (4)

comment:1 Changed 3 weeks ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks, fixed in r24281.

See also #2438.

comment:2 Changed 3 weeks ago by dancol

Resolution: fixed
Status: closedreopened

That's not quite the right fix. The problem isn't the environment variable itself: it's the GDK scaling factor it sets. You can also get a scaling factor of two on a regular high-DPI screen. Xpra should probably explicitly assign this variable to "1" or otherwise ignore the GDK scaling factor. It should also avoid leaking the variable (if it sets it) to children.

comment:3 Changed 3 weeks ago by dancol

Yeah, #2438 seems like the root cause.

comment:4 Changed 3 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to dancol
Status: reopenednew

@dancol: what problems are you seeing with this fix? Are you running r24133 or later with r24281 applied on top?
How can I reproduce?

It should also avoid leaking the variable (if it sets it) to children.

That's not so easy.

Note: See TracTickets for help on using tickets.