1
0
Fork 0
Commit graph

6 commits

Author SHA1 Message Date
Jonas Ådahl
66996dee4b wayland/inhibit-shortcuts-dialog: Destroy the dialog after response
We'll never actually show it again, but just use the last response, so
we can just destroy it now already.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:06 +08:00
Jonas Ådahl
2f45e88f06 wayland/inhibit-shortcuts-dialog: Just hide the dialog when hiding
The meta_wayland_surface_hide_inhibit_shortcuts_dialog() function
disconnected the "destroy" handler, but we'd still be listening on
response events. Change this to just hide the dialog, leaving the data
intact with the proper life time signal in place.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:06 +08:00
Jonas Ådahl
c1439e141e wayland/inhibit-shortcuts-dialog: Make the dialog ownership clearer
Make it clear that the data object is the owner of the dialog; it
creates it, and eventually destroys it.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:02 +08:00
Jonas Ådahl
dceb0f1f1f wayland/inhibit-shortcuts-dialog: Make data life cycle a bit clearer
The 'data' object is attached to the MetaWaylandSurface as a GObject
qdata. It is created once, and stays allocated until the surface is
destroyed. To make things clearer, connect to the "destroy" signal just
after creating, and from a on_surface_destroyed() callback call the
.._free() function.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:23:07 +08:00
Jonas Ådahl
a7915ff8ae wayland/inhibit-shortcuts-dialog: Only reuse last reply if there was one
We might have hidden the dialog, without a response. To avoid using the
not answered response, make sure we have actually got one before
reusing.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:11:21 +08:00
Olivier Fourdan
46cb506f8f wayland: use the inhibit shortcuts dialog
Plug the new MetaInhbitShortcutsDialog to the relevant Wayland protocol
implementation.

Also, remember the last user choice for a given surface to avoid asking
continuously the same question.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00