#2217 closed task (fixed)
honour window gravity
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 3.0 |
Component: | client | Version: | 2.4.x |
Keywords: | Cc: |
Description
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.
Change History (11)
comment:1 Changed 21 months ago by
Milestone: | 3.0 → 4.0 |
---|---|
Status: | new → assigned |
comment:2 Changed 21 months ago by
Updates:
- r23328 "keep track of the gravity we're supposed to honour, add env var to override the default:
XPRA_DEFAULT_GRAVITY
- r23329 + r23330 + r23331: preparatory refactoring
- r23332 preserves fbos when resising (#478)
Still TODO: take gravity into account when copying fbo data (harder because of upside-down opengl coordinates!)
comment:3 Changed 21 months ago by
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:
- ignore it (..)
- send the current server window size with all screen updates
- send the window resize counter with all screen updates, and use it to derive the window size this was for (meh)
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.
comment:4 Changed 21 months ago by
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:
- fbo resizing is still slightly off (opengl viewport projection still using old dimensions? re-init first?)
- make the
window-size
optional? (meh) - test on Intel chipsets.. (may need to clamp negative texture coordinates when downsizing?)
comment:5 Changed 21 months ago by
Milestone: | 4.0 → 3.0 |
---|
Updates:
- r23338 fixes things by adding a configurable delay - no idea why we need this, looks like something in X / GLX needs to get the message about the new window size before we can present it properly.
- r23339 makes the new
window-size
attribute optional, also makes it possible to disable the new FBO resizing code with:XPRA_OPENGL_FBO_RESIZE=0 xpra attach
Only testing left to do.
comment:6 Changed 21 months ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 Changed 21 months ago by
The delayed refresh code needed to be made python2-compatible: r23400.
comment:11 Changed 3 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2217
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.