← Back to team overview

desktop-packages team mailing list archive

[Bug 1491071] Re: Xmir doesn't update the screen size until something is actually rendered

 

Well, my patch-foo seems week as I can't seem to generate a good diff.
At any rate, here's what I'm proposing:

Using a fully patched source tree, open hw/xmir/xmir-input.c.  Find the
xmir_handle_input_in_main_thread() function.  In the
mir_event_type_resize case add the following after the ErrorF() line:

xmir_output_handle_resize(ctx->xmir_window,
mir_resize_event_get_width(mir_event_get_resize_event(ev)),
mir_resize_event_get_height(mir_event_get_resize_event(ev)));

such that the code block looks like:

    case mir_event_type_resize:
        ErrorF("Resize requested to %ix%i\n", mir_resize_event_get_width(mir_event_get_resize_event(ev)), mir_resize_event_get_height(mir_event_get_resize_event(ev)));
        xmir_output_handle_resize(ctx->xmir_window, mir_resize_event_get_width(mir_event_get_resize_event(ev)), mir_resize_event_get_height(mir_event_get_resize_event(ev)));
        if (ctx->xmir_window->damage)
            DamageDamageRegion(&ctx->xmir_window->window->drawable, &ctx->xmir_window->region);
        break;

I'm thinking since xmir_output_handle_resize() is being called, we might
be able to remove some subsequent calls to it to avoid some overhead.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xorg-server in Ubuntu.
https://bugs.launchpad.net/bugs/1491071

Title:
  Xmir doesn't update the screen size until something is actually
  rendered

Status in xorg-server package in Ubuntu:
  New

Bug description:
  In trying to get Compiz working under Xmir in Unity 8 desktop mode, I
  have found that when a Mir window opens and then resizes to whatever
  Unity 8 tells it to, the resize event does not get propagated down
  until another resize event occurs.

  For example, I start up an X app.  The Xmir window opens and is
  resized, but internally, Xmir still reports the full screen size so
  when Compiz starts, it thinks the surface size is the size of the
  physical display.

  I'll include a patch that fixes this and we can discuss if it's a good
  fix.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1491071/+subscriptions


References