Xpra: Ticket #2217: honour window gravity

This should probably be honoured when we center the contents of a window because of a size mismatch. ie: in the log sample from ticket:2214#comment:2, using window offset values 1,3 would become 0,0 if gravity is NW.

Thu, 25 Jul 2019 13:08:15 GMT - Antoine Martin: status, milestone changed

In some cases, but not all, we now have a widget representing the "drawing area": see r23305.

When resizing the window, we can honour the gravity when copying the backing contents over to the new one.

This would be easier to test with an env var to override the default window gravity.

Sun, 28 Jul 2019 17:28:01 GMT - Antoine Martin:


Still TODO: take gravity into account when copying fbo data (harder because of upside-down opengl coordinates!)

Mon, 29 Jul 2019 06:55:08 GMT - Antoine Martin:

Mostly done in r23333. To make it easier to test with client applications that do specify a gravity (ie: xterm), we can now override it with XPRA_OVERRIDE_GRAVITY. (also a client side switch)

One last hard problem is that whilst we're resizing the window, the server may send us window updates for the old window dimensions... Those updates will include absolute paint coordinates that are actually relative to the old window dimensions. Potential solutions:

Because of scaling and other paint transformations (delta!), it's not clear where the coordinate adjustment will need to be made.

Still todo: test with desktop scaling, video scaling, etc.

Mon, 29 Jul 2019 09:44:05 GMT - Antoine Martin:

Done by exposing the window-size paint option in r23335. r23336 makes it easier to test, ie:

XPRA_PAINT_DELAY=2000 XPRA_OVERRIDE_GRAVITY=2 python3 /usr/bin/xpra attach

Still TODO:

Mon, 29 Jul 2019 13:33:35 GMT - Antoine Martin: milestone changed


Only testing left to do.

Mon, 29 Jul 2019 15:41:20 GMT - Antoine Martin: status changed; resolution set

Works well enough on all platforms tested, except macos: #2372 (not necessarily related) The configurable delay should be replaced: #2373.

Thu, 01 Aug 2019 16:27:13 GMT - Antoine Martin:

This broke python2 - gtk2, fixed in r23396.

Sat, 03 Aug 2019 03:48:55 GMT - Antoine Martin:

The delayed refresh code needed to be made python2-compatible: r23400.

Sat, 03 Aug 2019 07:17:00 GMT - Antoine Martin:

Bug fix + ported to all backends in r23402.

Sun, 04 Aug 2019 15:56:23 GMT - Antoine Martin:

Disabled on macos: #2372

Sat, 23 Jan 2021 05:45:19 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2217