Xmir root window does not resize reliably

Bug #1417541 reported by Christopher Townsend
14
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/ppa) and starting a legacy x app in Unity 8, when resizing the window in Unity 8, the X surface is not updated.

Tags: xmir
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

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:
    eglQuerySurface(egldisplay, eglsurface, EGL_WIDTH, &width)
    eglQuerySurface(egldisplay, eglsurface, EGL_HEIGHT, &height)
or
    call mir_surface_get_current_buffer [1] to get the width/height.

Software surfaces:
    The function mir_surface_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.

Idling and waking up on resize:
    Listen for mir_event_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.

- Daniel

[1] http://unity.ubuntu.com/mir/group__mir__toolkit.html#ga696098fdc7c4a97bab7dedadda3fc212

[2] http://unity.ubuntu.com/mir/group__mir__toolkit.html#gacfcbe5643cc037ddd51414ce28c93529

[3] http://unity.ubuntu.com/mir/struct_mir_resize_event.html

[4] https://bugs.launchpad.net/mir/+bug/1288021

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)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Xmir root window does not resize reliably; corruption occurs

This bug is still an issue for the Xmir root window. However if you run with -rootless in the latest code (not in Ubuntu yet) then resizing works very well.

Changed in xorg-server (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
summary: - X apps running in Xmir do not resize when resizing the window in Unity 8
+ Xmir root window does not resize reliably; corruption occurs
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Resizing and stability has been improved a lot today:
https://git.launchpad.net/~xmir-team/xorg-server/+git/xmir/log/

However even when I thought I had re-implemented window resizing correctly, I found the root window does not receive normal resize requests. It works, but it's just more laggy than regular (-rootless) windows.

Not sure when to declare this fixed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The original issue is fixed. Resizing now works.

The extra "corruption" issue I added in comment #2 is not a blocking problem and not related to stability either (any more).

summary: - Xmir root window does not resize reliably; corruption occurs
+ Xmir root window does not resize reliably
Changed in xorg-server (Ubuntu):
status: Triaged → Fix Committed
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

xorg-server (2:1.17.3-2ubuntu2) xenial; urgency=medium

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.