Commit 2ab7b6f4 authored by Guido Gunther's avatar Guido Gunther

monitor: Get name from xdg_output

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent e87f4a7d
...@@ -152,6 +152,7 @@ xdg_output_v1_handle_name (void *data, ...@@ -152,6 +152,7 @@ xdg_output_v1_handle_name (void *data,
const char *name) const char *name)
{ {
g_debug("Output name is %s", name); g_debug("Output name is %s", name);
self->name = g_strdup (name);
} }
...@@ -217,16 +218,13 @@ phosh_monitor_dispose (GObject *object) ...@@ -217,16 +218,13 @@ phosh_monitor_dispose (GObject *object)
{ {
PhoshMonitor *self = PHOSH_MONITOR (object); PhoshMonitor *self = PHOSH_MONITOR (object);
g_clear_pointer (&self->vendor, g_free);
g_clear_pointer (&self->product, g_free);
g_array_free (self->modes, TRUE); g_array_free (self->modes, TRUE);
self->modes = NULL; self->modes = NULL;
if (self->xdg_output) { g_clear_pointer (&self->vendor, g_free);
zxdg_output_v1_destroy (self->xdg_output); g_clear_pointer (&self->product, g_free);
self->xdg_output = NULL; g_clear_pointer (&self->name, g_free);
} g_clear_pointer (&self->xdg_output, zxdg_output_v1_destroy);
G_OBJECT_CLASS (phosh_monitor_parent_class)->dispose (object); G_OBJECT_CLASS (phosh_monitor_parent_class)->dispose (object);
} }
......
...@@ -40,6 +40,8 @@ struct _PhoshMonitor { ...@@ -40,6 +40,8 @@ struct _PhoshMonitor {
guint current_mode; guint current_mode;
guint preferred_mode; guint preferred_mode;
char *name;
gboolean wl_output_done; gboolean wl_output_done;
gboolean xdg_output_done; gboolean xdg_output_done;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment