Skip to content
Snippets Groups Projects

Draft: Handle hotplug HDMI events

Open Walter Lozano requested to merge wip/wlozano/hotplug-fix into apertis/v2024dev1
2 unresolved threads
2 files
+ 16
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 10
0
@@ -78,6 +78,7 @@ struct desktop {
int ready;
struct wl_seat *seat;
struct wl_pointer *pointer;
uint32_t output_id;
GdkDisplay *gdk_display;
@@ -649,6 +650,7 @@ registry_handle_global (void *data,
return;
d->output = wl_registry_bind (registry, name,
&wl_output_interface, 1);
d->output_id = name;
}
else if (!strcmp (interface, "wl_seat"))
{
@@ -678,6 +680,13 @@ registry_handle_global_remove (void *data,
struct wl_registry *registry,
uint32_t name)
{
struct desktop *d = data;
if (d->output_id == name && d->output) {
g_warning ("registry_handle_global_remove: unbinding output %d", name);
Please register or sign in to reply
d->output = NULL;
d->output_id = 0;
}
}
static const struct wl_registry_listener registry_listener = {
@@ -744,6 +753,7 @@ main (int argc,
desktop->ready = 0;
desktop->seat = NULL;
desktop->pointer = NULL;
desktop->output_id = 0;
desktop->background = NULL;
desktop->panel = NULL;
Loading