GNOME Bugzilla – Bug 706982
wayland: fix pointer focus for destroyed surfaces
Last modified: 2013-08-30 14:07:32 UTC
We had an assertion in meta_wayland_surface_free() that after a repick() we would not choose the freed surface, but that didn't consider surfaces destroyed while holding the implicit pointer grab (ie, because the user clicked on the X button). In that case, we need to bypass the grab infrastructure and explicitly unfocus the dead surface.
Created attachment 253388 [details] [review] wayland: fix pointer focus for destroyed surfaces
Review of attachment 253388 [details] [review]: Yeah, I had to do something like this in xserver.js. Looks good. ::: src/wayland/meta-wayland.c @@ +499,3 @@ + meta_wayland_pointer_destroy_focus (&compositor->seat->pointer); + + g_assert (surface != compositor->seat->pointer.focus); shouldn't we assert in all cases, not just the one below?
(In reply to comment #2) > Review of attachment 253388 [details] [review]: > > shouldn't we assert in all cases, not just the one below? What do you mean?
Gah, that was a mangled sentence. "Should we move the asserts out of the if block?"
(In reply to comment #4) > Gah, that was a mangled sentence. > > "Should we move the asserts out of the if block?" If we don't enter the block, the assert is already true, isn't it?
Attachment 253388 [details] pushed as ad4053a - wayland: fix pointer focus for destroyed surfaces