mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 07:30:42 -05:00
wayland/surface: Get wl_output resource list via helper
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1712>
This commit is contained in:
parent
f6bf1ceb92
commit
99531f9d4b
@ -57,6 +57,12 @@ send_xdg_output_events (struct wl_resource *resource,
|
||||
gboolean need_all_events,
|
||||
gboolean *pending_done_event);
|
||||
|
||||
const GList *
|
||||
meta_wayland_output_get_resources (MetaWaylandOutput *wayland_output)
|
||||
{
|
||||
return wayland_output->resources;
|
||||
}
|
||||
|
||||
static void
|
||||
output_resource_destroy (struct wl_resource *res)
|
||||
{
|
||||
|
@ -50,6 +50,8 @@ struct _MetaWaylandOutput
|
||||
uint64_t winsys_id;
|
||||
};
|
||||
|
||||
const GList * meta_wayland_output_get_resources (MetaWaylandOutput *wayland_output);
|
||||
|
||||
void meta_wayland_outputs_init (MetaWaylandCompositor *compositor);
|
||||
|
||||
#endif /* META_WAYLAND_OUTPUTS_H */
|
||||
|
@ -1289,16 +1289,15 @@ static void
|
||||
surface_entered_output (MetaWaylandSurface *surface,
|
||||
MetaWaylandOutput *wayland_output)
|
||||
{
|
||||
GList *iter;
|
||||
struct wl_resource *resource;
|
||||
const GList *l;
|
||||
|
||||
g_signal_connect (wayland_output, "output-destroyed",
|
||||
G_CALLBACK (handle_output_destroyed),
|
||||
surface);
|
||||
|
||||
for (iter = wayland_output->resources; iter != NULL; iter = iter->next)
|
||||
for (l = meta_wayland_output_get_resources (wayland_output); l; l = l->next)
|
||||
{
|
||||
resource = iter->data;
|
||||
struct wl_resource *resource = l->data;
|
||||
|
||||
if (wl_resource_get_client (resource) !=
|
||||
wl_resource_get_client (surface->resource))
|
||||
@ -1316,8 +1315,7 @@ static void
|
||||
surface_left_output (MetaWaylandSurface *surface,
|
||||
MetaWaylandOutput *wayland_output)
|
||||
{
|
||||
GList *iter;
|
||||
struct wl_resource *resource;
|
||||
const GList *l;
|
||||
|
||||
g_signal_handlers_disconnect_by_func (wayland_output,
|
||||
G_CALLBACK (handle_output_destroyed),
|
||||
@ -1327,9 +1325,9 @@ surface_left_output (MetaWaylandSurface *surface,
|
||||
G_CALLBACK (handle_output_bound),
|
||||
surface);
|
||||
|
||||
for (iter = wayland_output->resources; iter != NULL; iter = iter->next)
|
||||
for (l = meta_wayland_output_get_resources (wayland_output); l; l = l->next)
|
||||
{
|
||||
resource = iter->data;
|
||||
struct wl_resource *resource = l->data;
|
||||
|
||||
if (wl_resource_get_client (resource) !=
|
||||
wl_resource_get_client (surface->resource))
|
||||
|
Loading…
Reference in New Issue
Block a user