display-panel: Clear the variant builder if not showing an OSD

When we've only one monitor active we are not showing the OSD but we're
leaking the variant used to request the shell to show the OSDs.
This commit is contained in:
Marco Trevisan (Treviño) 2021-05-28 22:59:24 +02:00 committed by Georges Basile Stavracas Neto
parent bdc0368bd0
commit ca884dc666

View file

@ -382,7 +382,10 @@ monitor_labeler_show (CcDisplayPanel *self)
g_variant_builder_close (&builder);
if (number < 2)
return monitor_labeler_hide (self);
{
g_variant_builder_clear (&builder);
return monitor_labeler_hide (self);
}
g_dbus_proxy_call (self->shell_proxy,
"ShowMonitorLabels",