After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706982 - wayland: fix pointer focus for destroyed surfaces
wayland: fix pointer focus for destroyed surfaces
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-28 14:26 UTC by Giovanni Campagna
Modified: 2013-08-30 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: fix pointer focus for destroyed surfaces (3.24 KB, patch)
2013-08-28 14:26 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-28 14:26:35 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.
Comment 1 Giovanni Campagna 2013-08-28 14:26:37 UTC
Created attachment 253388 [details] [review]
wayland: fix pointer focus for destroyed surfaces
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-08-28 14:37:18 UTC
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?
Comment 3 Giovanni Campagna 2013-08-28 14:52:10 UTC
(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?
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-08-28 17:02:19 UTC
Gah, that was a mangled sentence.

"Should we move the asserts out of the if block?"
Comment 5 Giovanni Campagna 2013-08-29 08:36:36 UTC
(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?
Comment 6 Giovanni Campagna 2013-08-30 14:07:29 UTC
Attachment 253388 [details] pushed as ad4053a - wayland: fix pointer focus for destroyed surfaces