core: Ensure there is an unique pad OSD actor

We kind of rely on the ::show-pad-osd handler to destroy the
previous actor. Just prevent the emission of multiple signals
till the actor has been destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=771067
This commit is contained in:
Carlos Garnacho 2016-10-17 18:02:50 +02:00
parent 236417be38
commit 30fa764c90

View File

@ -3110,13 +3110,14 @@ meta_display_request_pad_osd (MetaDisplay *display,
WacomDevice *wacom_device;
#endif
input_settings = meta_backend_get_input_settings (meta_get_backend ());
/* Avoid emitting the signal while there is an OSD being currently
* displayed, the first OSD will have to be dismissed before showing
* any other one.
*/
if (display->current_pad_osd)
{
clutter_actor_destroy (display->current_pad_osd);
display->current_pad_osd = NULL;
}
return;
input_settings = meta_backend_get_input_settings (meta_get_backend ());
if (input_settings)
{