Xmir root window does not resize reliably
Bug #1417541 reported by
Christopher Townsend
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg-server (Ubuntu) |
Fix Released
|
High
|
Daniel van Vugt |
Bug Description
Using the newest Xmir from Maarten Lankhorst's PPA (ppa:mlankhorst
description: | updated |
Changed in xmir: | |
importance: | Undecided → High |
assignee: | nobody → Maarten Lankhorst (mlankhorst) |
status: | New → Triaged |
description: | updated |
affects: | xmir → xorg-server (Ubuntu) |
tags: | added: xmir |
Changed in xorg-server (Ubuntu): | |
assignee: | Maarten Lankhorst (mlankhorst) → Daniel van Vugt (vanvugt) |
To post a comment you must log in.
The required logic that's missing in XMir is to listen for and act on resize events.
First, always get the dimensions from the buffer you're working with to guarantee everything matches...
EGL: face(egldisplay , eglsurface, EGL_WIDTH, &width) face(egldisplay , eglsurface, EGL_HEIGHT, &height) get_current_ buffer [1] to get the width/height.
eglQuerySur
eglQuerySur
or
call mir_surface_
Software surfaces: get_graphics_ region [2] if you're using it already returns the width/height in the result structure. Sorry for the confusing API design where both functions [1] & [2] have generic names. I didn't do it.
The function mir_surface_
Idling and waking up on resize: type_resize/ MirResizeEvent [3] but be sure to ignore the dimensions included in the event, because an annoying race [4] means they might be wrong for the buffer you're working with. You should ignore the dimensions in MirResizeEvent and query the dimensions using any of the above functions instead.
Listen for mir_event_
- Daniel
[1] http:// unity.ubuntu. com/mir/ group__ mir__toolkit. html#ga696098fd c7c4a97bab7deda dda3fc212
[2] http:// unity.ubuntu. com/mir/ group__ mir__toolkit. html#gacfcbe564 3cc037ddd51414c e28c93529
[3] http:// unity.ubuntu. com/mir/ struct_ mir_resize_ event.html
[4] https:/ /bugs.launchpad .net/mir/ +bug/1288021