Mir

Code review comment for lp:~vanvugt/mir/wait-result

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

These statements are either false, or describe a bug I'm not yet aware of:

"The behaviour changes slightly, but it doesn't change correctness;
there is currently no correct way to use mir_wait_for on a wait handle
returned by one of the *_set functions.
  But we *don't* have an ability to synchronise them - if you call
mir_surface_set_state(fullscreen) and mir_wait_for_result returns true
then it is *not* guaranteed that an immediate call to
mir_surface_get_state == fullscreen."

When I implemented the attribute system in 2013, it did work. Correct usage looks like:

  w = mir_surface_set_X(surface, Y);
  mir_wait_for(w);
  y = mir_surface_get_X(surface);
  assert(y == Y);

If this doesn't work any more then we have a bug. But I suspect it does still work because I revisited the test cases for it as part of this proposal.

« Back to merge proposal