Skip to content
  • Olivier Fourdan's avatar
    wayland/output: Set user data of xdg_output resource · 2c1a951b
    Olivier Fourdan authored
    mutter would randomly crash in `send_xdg_output_events()` when changing
    the fractional scaling:
    
      wl_resource_post_event ()
      zxdg_output_v1_send_logical_size ()
      send_xdg_output_events ()
      wayland_output_update_for_output ()
      meta_wayland_compositor_update_outputs ()
      on_monitors_changed ()
      g_closure_invoke ()
      signal_emit_unlocked_R ()
      g_signal_emit_valist ()
      _signal_emit ()
      meta_monitor_manager_notify_monitors_changed ()
      meta_monitor_manager_rebuild ()
    
    This is because the xdg-output resource got freed but wasn't removed
    from the list of resources.
    
    Fix this by setting the user data of the xdg-output resource to the
    corresponding `MetaWaylandOutput` so that the xdg-output resource
    destructor can remove it from the list of resources.
    
    !538
    2c1a951b