From 1520be3c5c29ef2894cee790880af624c063f0a0 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Fri, 25 Oct 2024 08:16:09 +0300 Subject: [PATCH] Make all listeners private --- include/wlr/backend/session.h | 5 ++- include/wlr/render/swapchain.h | 8 +++- include/wlr/types/wlr_compositor.h | 15 ++++--- include/wlr/types/wlr_damage_ring.h | 5 ++- include/wlr/types/wlr_data_control_v1.h | 12 ++++-- include/wlr/types/wlr_data_device.h | 26 ++++++++---- include/wlr/types/wlr_drm.h | 4 +- include/wlr/types/wlr_drm_lease_v1.h | 23 +++++++---- include/wlr/types/wlr_export_dmabuf_v1.h | 12 ++++-- .../types/wlr_ext_foreign_toplevel_list_v1.h | 6 ++- .../wlr_foreign_toplevel_management_v1.h | 6 ++- include/wlr/types/wlr_fullscreen_shell_v1.h | 6 ++- include/wlr/types/wlr_gamma_control_v1.h | 12 ++++-- include/wlr/types/wlr_idle_inhibit_v1.h | 11 +++-- include/wlr/types/wlr_input_method_v2.h | 22 ++++++---- .../types/wlr_keyboard_shortcuts_inhibit_v1.h | 14 ++++--- include/wlr/types/wlr_layer_shell_v1.h | 6 ++- include/wlr/types/wlr_output.h | 11 +++-- include/wlr/types/wlr_output_management_v1.h | 14 +++++-- .../types/wlr_output_power_management_v1.h | 14 ++++--- .../wlr/types/wlr_pointer_constraints_v1.h | 6 ++- include/wlr/types/wlr_pointer_gestures_v1.h | 6 ++- include/wlr/types/wlr_presentation_time.h | 12 ++++-- include/wlr/types/wlr_primary_selection_v1.h | 16 +++++--- include/wlr/types/wlr_relative_pointer_v1.h | 14 ++++--- include/wlr/types/wlr_screencopy_v1.h | 15 ++++--- include/wlr/types/wlr_seat.h | 41 +++++++++++-------- include/wlr/types/wlr_server_decoration.h | 12 ++++-- include/wlr/types/wlr_subcompositor.h | 12 +++--- include/wlr/types/wlr_tablet_v2.h | 26 ++++++++---- include/wlr/types/wlr_tearing_control_v1.h | 5 ++- include/wlr/types/wlr_text_input_v3.h | 14 ++++--- include/wlr/types/wlr_transient_seat_v1.h | 5 ++- include/wlr/types/wlr_viewporter.h | 4 +- include/wlr/types/wlr_virtual_keyboard_v1.h | 6 ++- include/wlr/types/wlr_virtual_pointer_v1.h | 6 ++- include/wlr/types/wlr_xdg_decoration_v1.h | 6 ++- include/wlr/types/wlr_xdg_foreign_registry.h | 5 ++- include/wlr/types/wlr_xdg_foreign_v1.h | 25 +++++++---- include/wlr/types/wlr_xdg_foreign_v2.h | 25 +++++++---- include/wlr/types/wlr_xdg_output_v1.h | 16 +++++--- include/wlr/types/wlr_xdg_shell.h | 19 ++++++--- include/wlr/xwayland/server.h | 8 ++-- include/wlr/xwayland/xwayland.h | 9 ++-- 44 files changed, 365 insertions(+), 180 deletions(-) diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h index 3179d1f54..bd218ce8b 100644 --- a/include/wlr/backend/session.h +++ b/include/wlr/backend/session.h @@ -60,13 +60,16 @@ struct wlr_session { struct wl_list devices; // wlr_device.link struct wl_event_loop *event_loop; - struct wl_listener event_loop_destroy; struct { struct wl_signal active; struct wl_signal add_drm_card; // struct wlr_session_add_event struct wl_signal destroy; } events; + + struct { + struct wl_listener event_loop_destroy; + } WLR_PRIVATE; }; struct wlr_session_add_event { diff --git a/include/wlr/render/swapchain.h b/include/wlr/render/swapchain.h index 2317f1b62..4ca1ac590 100644 --- a/include/wlr/render/swapchain.h +++ b/include/wlr/render/swapchain.h @@ -11,7 +11,9 @@ struct wlr_swapchain_slot { struct wlr_buffer *buffer; bool acquired; // waiting for release - struct wl_listener release; + struct { + struct wl_listener release; + } WLR_PRIVATE; }; struct wlr_swapchain { @@ -22,7 +24,9 @@ struct wlr_swapchain { struct wlr_swapchain_slot slots[WLR_SWAPCHAIN_CAP]; - struct wl_listener allocator_destroy; + struct { + struct wl_listener allocator_destroy; + } WLR_PRIVATE; }; struct wlr_swapchain *wlr_swapchain_create( diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 291e470c2..d26f8e2ec 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -122,8 +122,11 @@ struct wlr_surface_output { struct wlr_output *output; struct wl_list link; // wlr_surface.current_outputs - struct wl_listener bind; - struct wl_listener destroy; + + struct { + struct wl_listener bind; + struct wl_listener destroy; + } WLR_PRIVATE; }; struct wlr_surface { @@ -271,13 +274,15 @@ struct wlr_compositor { struct wl_global *global; struct wlr_renderer *renderer; // may be NULL - struct wl_listener display_destroy; - struct wl_listener renderer_destroy; - struct { struct wl_signal new_surface; struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + struct wl_listener renderer_destroy; + } WLR_PRIVATE; }; typedef void (*wlr_surface_iterator_func_t)(struct wlr_surface *surface, diff --git a/include/wlr/types/wlr_damage_ring.h b/include/wlr/types/wlr_damage_ring.h index feb64777c..cc2eaa0f2 100644 --- a/include/wlr/types/wlr_damage_ring.h +++ b/include/wlr/types/wlr_damage_ring.h @@ -19,11 +19,14 @@ struct wlr_box; struct wlr_damage_ring_buffer { struct wlr_buffer *buffer; - struct wl_listener destroy; pixman_region32_t damage; struct wlr_damage_ring *ring; struct wl_list link; // wlr_damage_ring.buffers + + struct { + struct wl_listener destroy; + } WLR_PRIVATE; }; struct wlr_damage_ring { diff --git a/include/wlr/types/wlr_data_control_v1.h b/include/wlr/types/wlr_data_control_v1.h index 4435f14a2..9ef86d7cf 100644 --- a/include/wlr/types/wlr_data_control_v1.h +++ b/include/wlr/types/wlr_data_control_v1.h @@ -21,7 +21,9 @@ struct wlr_data_control_manager_v1 { struct wl_signal new_device; // wlr_data_control_device_v1 } events; - struct wl_listener display_destroy; + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_data_control_device_v1 { @@ -33,9 +35,11 @@ struct wlr_data_control_device_v1 { struct wl_resource *selection_offer_resource; // current selection offer struct wl_resource *primary_selection_offer_resource; // current primary selection offer - struct wl_listener seat_destroy; - struct wl_listener seat_set_selection; - struct wl_listener seat_set_primary_selection; + struct { + struct wl_listener seat_destroy; + struct wl_listener seat_set_selection; + struct wl_listener seat_set_primary_selection; + } WLR_PRIVATE; }; struct wlr_data_control_manager_v1 *wlr_data_control_manager_v1_create( diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index 85d661a77..2a618d3fe 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -16,13 +16,15 @@ struct wlr_data_device_manager { struct wl_global *global; struct wl_list data_sources; - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; enum wlr_data_offer_type { @@ -40,7 +42,9 @@ struct wlr_data_offer { enum wl_data_device_manager_dnd_action preferred_action; bool in_ask; - struct wl_listener source_destroy; + struct { + struct wl_listener source_destroy; + } WLR_PRIVATE; }; /** @@ -89,9 +93,11 @@ struct wlr_drag_icon { struct wl_signal destroy; } events; - struct wl_listener surface_destroy; - void *data; + + struct { + struct wl_listener surface_destroy; + } WLR_PRIVATE; }; enum wlr_drag_grab_type { @@ -124,11 +130,13 @@ struct wlr_drag { struct wl_signal destroy; } events; - struct wl_listener source_destroy; - struct wl_listener seat_client_destroy; - struct wl_listener icon_destroy; - void *data; + + struct { + struct wl_listener source_destroy; + struct wl_listener seat_client_destroy; + struct wl_listener icon_destroy; + } WLR_PRIVATE; }; struct wlr_drag_motion_event { diff --git a/include/wlr/types/wlr_drm.h b/include/wlr/types/wlr_drm.h index a256a8deb..62dfa04f5 100644 --- a/include/wlr/types/wlr_drm.h +++ b/include/wlr/types/wlr_drm.h @@ -21,7 +21,9 @@ struct wlr_drm_buffer { struct wl_resource *resource; // can be NULL if the client destroyed it struct wlr_dmabuf_attributes dmabuf; - struct wl_listener release; + struct { + struct wl_listener release; + } WLR_PRIVATE; }; /** diff --git a/include/wlr/types/wlr_drm_lease_v1.h b/include/wlr/types/wlr_drm_lease_v1.h index cda02a10f..05e381249 100644 --- a/include/wlr/types/wlr_drm_lease_v1.h +++ b/include/wlr/types/wlr_drm_lease_v1.h @@ -18,7 +18,6 @@ struct wlr_drm_lease_v1_manager { struct wl_list devices; // wlr_drm_lease_device_v1.link struct wl_display *display; - struct wl_listener display_destroy; struct { /** @@ -29,6 +28,10 @@ struct wlr_drm_lease_v1_manager { */ struct wl_signal request; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_drm_lease_device_v1 { @@ -43,9 +46,11 @@ struct wlr_drm_lease_device_v1 { struct wl_list requests; // wlr_drm_lease_request_v1.link struct wl_list link; // wlr_drm_lease_v1_manager.devices - struct wl_listener backend_destroy; - void *data; + + struct { + struct wl_listener backend_destroy; + } WLR_PRIVATE; }; struct wlr_drm_lease_v1; @@ -58,9 +63,11 @@ struct wlr_drm_lease_connector_v1 { /** NULL if no client is currently leasing this connector */ struct wlr_drm_lease_v1 *active_lease; - struct wl_listener destroy; - struct wl_list link; // wlr_drm_lease_device_v1.connectors + + struct { + struct wl_listener destroy; + } WLR_PRIVATE; }; struct wlr_drm_lease_request_v1 { @@ -89,9 +96,11 @@ struct wlr_drm_lease_v1 { struct wl_list link; // wlr_drm_lease_device_v1.leases - struct wl_listener destroy; - void *data; + + struct { + struct wl_listener destroy; + } WLR_PRIVATE; }; /** diff --git a/include/wlr/types/wlr_export_dmabuf_v1.h b/include/wlr/types/wlr_export_dmabuf_v1.h index ba2d8bd85..2c5a24525 100644 --- a/include/wlr/types/wlr_export_dmabuf_v1.h +++ b/include/wlr/types/wlr_export_dmabuf_v1.h @@ -17,11 +17,13 @@ struct wlr_export_dmabuf_manager_v1 { struct wl_global *global; struct wl_list frames; // wlr_export_dmabuf_frame_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_export_dmabuf_frame_v1 { @@ -33,8 +35,10 @@ struct wlr_export_dmabuf_frame_v1 { bool cursor_locked; - struct wl_listener output_commit; - struct wl_listener output_destroy; + struct { + struct wl_listener output_commit; + struct wl_listener output_destroy; + } WLR_PRIVATE; }; struct wlr_export_dmabuf_manager_v1 *wlr_export_dmabuf_manager_v1_create( diff --git a/include/wlr/types/wlr_ext_foreign_toplevel_list_v1.h b/include/wlr/types/wlr_ext_foreign_toplevel_list_v1.h index b2e4c7b03..902418eaf 100644 --- a/include/wlr/types/wlr_ext_foreign_toplevel_list_v1.h +++ b/include/wlr/types/wlr_ext_foreign_toplevel_list_v1.h @@ -16,13 +16,15 @@ struct wlr_ext_foreign_toplevel_list_v1 { struct wl_list resources; // wl_resource_get_link() struct wl_list toplevels; // ext_foreign_toplevel_handle_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_ext_foreign_toplevel_handle_v1 { diff --git a/include/wlr/types/wlr_foreign_toplevel_management_v1.h b/include/wlr/types/wlr_foreign_toplevel_management_v1.h index 499d40380..d21c5fc70 100644 --- a/include/wlr/types/wlr_foreign_toplevel_management_v1.h +++ b/include/wlr/types/wlr_foreign_toplevel_management_v1.h @@ -18,13 +18,15 @@ struct wlr_foreign_toplevel_manager_v1 { struct wl_list resources; // wl_resource_get_link() struct wl_list toplevels; // wlr_foreign_toplevel_handle_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; enum wlr_foreign_toplevel_handle_v1_state { diff --git a/include/wlr/types/wlr_fullscreen_shell_v1.h b/include/wlr/types/wlr_fullscreen_shell_v1.h index 54e4c0550..c4b1cbc7a 100644 --- a/include/wlr/types/wlr_fullscreen_shell_v1.h +++ b/include/wlr/types/wlr_fullscreen_shell_v1.h @@ -22,9 +22,11 @@ struct wlr_fullscreen_shell_v1 { struct wl_signal present_surface; } events; - struct wl_listener display_destroy; - void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_fullscreen_shell_v1_present_surface_event { diff --git a/include/wlr/types/wlr_gamma_control_v1.h b/include/wlr/types/wlr_gamma_control_v1.h index 48fce09f6..b3a70f11e 100644 --- a/include/wlr/types/wlr_gamma_control_v1.h +++ b/include/wlr/types/wlr_gamma_control_v1.h @@ -10,14 +10,16 @@ struct wlr_gamma_control_manager_v1 { struct wl_global *global; struct wl_list controls; // wlr_gamma_control_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; struct wl_signal set_gamma; // struct wlr_gamma_control_manager_v1_set_gamma_event } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_gamma_control_manager_v1_set_gamma_event { @@ -34,9 +36,11 @@ struct wlr_gamma_control_v1 { uint16_t *table; size_t ramp_size; - struct wl_listener output_destroy_listener; - void *data; + + struct { + struct wl_listener output_destroy_listener; + } WLR_PRIVATE; }; struct wlr_gamma_control_manager_v1 *wlr_gamma_control_manager_v1_create( diff --git a/include/wlr/types/wlr_idle_inhibit_v1.h b/include/wlr/types/wlr_idle_inhibit_v1.h index 596fbe889..9a42d4fdf 100644 --- a/include/wlr/types/wlr_idle_inhibit_v1.h +++ b/include/wlr/types/wlr_idle_inhibit_v1.h @@ -27,20 +27,21 @@ struct wlr_idle_inhibit_manager_v1 { struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1.link struct wl_global *global; - struct wl_listener display_destroy; - struct { struct wl_signal new_inhibitor; // struct wlr_idle_inhibitor_v1 struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_idle_inhibitor_v1 { struct wlr_surface *surface; struct wl_resource *resource; - struct wl_listener surface_destroy; struct wl_list link; // wlr_idle_inhibit_manager_v1.inhibitors @@ -49,6 +50,10 @@ struct wlr_idle_inhibitor_v1 { } events; void *data; + + struct { + struct wl_listener surface_destroy; + } WLR_PRIVATE; }; struct wlr_idle_inhibit_manager_v1 *wlr_idle_inhibit_v1_create(struct wl_display *display); diff --git a/include/wlr/types/wlr_input_method_v2.h b/include/wlr/types/wlr_input_method_v2.h index fd299cc85..02216ddad 100644 --- a/include/wlr/types/wlr_input_method_v2.h +++ b/include/wlr/types/wlr_input_method_v2.h @@ -48,14 +48,16 @@ struct wlr_input_method_v2 { struct wl_list link; - struct wl_listener seat_client_destroy; - struct { struct wl_signal commit; // struct wlr_input_method_v2 struct wl_signal new_popup_surface; // struct wlr_input_popup_surface_v2 struct wl_signal grab_keyboard; // struct wlr_input_method_keyboard_grab_v2 struct wl_signal destroy; // struct wlr_input_method_v2 } events; + + struct { + struct wl_listener seat_client_destroy; + } WLR_PRIVATE; }; struct wlr_input_popup_surface_v2 { @@ -77,25 +79,29 @@ struct wlr_input_method_keyboard_grab_v2 { struct wlr_input_method_v2 *input_method; struct wlr_keyboard *keyboard; - struct wl_listener keyboard_keymap; - struct wl_listener keyboard_repeat_info; - struct wl_listener keyboard_destroy; - struct { struct wl_signal destroy; // struct wlr_input_method_keyboard_grab_v2 } events; + + struct { + struct wl_listener keyboard_keymap; + struct wl_listener keyboard_repeat_info; + struct wl_listener keyboard_destroy; + } WLR_PRIVATE; }; struct wlr_input_method_manager_v2 { struct wl_global *global; struct wl_list input_methods; // struct wlr_input_method_v2.link - struct wl_listener display_destroy; - struct { struct wl_signal input_method; // struct wlr_input_method_v2 struct wl_signal destroy; // struct wlr_input_method_manager_v2 } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_input_method_manager_v2 *wlr_input_method_manager_v2_create( diff --git a/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h b/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h index 946e75f4e..6c9b6889f 100644 --- a/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h +++ b/include/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h @@ -27,14 +27,16 @@ struct wlr_keyboard_shortcuts_inhibit_manager_v1 { struct wl_list inhibitors; struct wl_global *global; - struct wl_listener display_destroy; - struct { struct wl_signal new_inhibitor; // struct wlr_keyboard_shortcuts_inhibitor_v1 struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_keyboard_shortcuts_inhibitor_v1 { @@ -43,9 +45,6 @@ struct wlr_keyboard_shortcuts_inhibitor_v1 { bool active; struct wl_resource *resource; - struct wl_listener surface_destroy; - struct wl_listener seat_destroy; - // wlr_keyboard_shortcuts_inhibit_manager_v1.inhibitors struct wl_list link; @@ -54,6 +53,11 @@ struct wlr_keyboard_shortcuts_inhibitor_v1 { } events; void *data; + + struct { + struct wl_listener surface_destroy; + struct wl_listener seat_destroy; + } WLR_PRIVATE; }; /* diff --git a/include/wlr/types/wlr_layer_shell_v1.h b/include/wlr/types/wlr_layer_shell_v1.h index d46f9b9c9..4234aa72e 100644 --- a/include/wlr/types/wlr_layer_shell_v1.h +++ b/include/wlr/types/wlr_layer_shell_v1.h @@ -31,8 +31,6 @@ struct wlr_layer_shell_v1 { struct wl_global *global; - struct wl_listener display_destroy; - struct { // Note: the output may be NULL. In this case, it is your // responsibility to assign an output before returning. @@ -41,6 +39,10 @@ struct wlr_layer_shell_v1 { } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; enum wlr_layer_surface_v1_state_field { diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 1cc7baecd..e0ee7d092 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -48,8 +48,11 @@ struct wlr_output_cursor { bool own_texture; struct wlr_drm_syncobj_timeline *wait_timeline; uint64_t wait_point; - struct wl_listener renderer_destroy; struct wl_list link; + + struct { + struct wl_listener renderer_destroy; + } WLR_PRIVATE; }; enum wlr_output_adaptive_sync_status { @@ -226,11 +229,13 @@ struct wlr_output { struct wlr_renderer *renderer; struct wlr_swapchain *swapchain; - struct wl_listener display_destroy; - struct wlr_addon_set addons; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_output_event_damage { diff --git a/include/wlr/types/wlr_output_management_v1.h b/include/wlr/types/wlr_output_management_v1.h index 57b880dff..2835a5924 100644 --- a/include/wlr/types/wlr_output_management_v1.h +++ b/include/wlr/types/wlr_output_management_v1.h @@ -39,9 +39,11 @@ struct wlr_output_manager_v1 { struct wl_signal destroy; } events; - struct wl_listener display_destroy; - void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_output_head_v1_state { @@ -67,7 +69,9 @@ struct wlr_output_head_v1 { struct wl_list resources; // wl_resource_get_link() struct wl_list mode_resources; // wl_resource_get_link() - struct wl_listener output_destroy; + struct { + struct wl_listener output_destroy; + } WLR_PRIVATE; }; struct wlr_output_configuration_v1 { @@ -89,7 +93,9 @@ struct wlr_output_configuration_head_v1 { // client state struct wl_resource *resource; // can be NULL if finalized or disabled - struct wl_listener output_destroy; + struct { + struct wl_listener output_destroy; + } WLR_PRIVATE; }; /** diff --git a/include/wlr/types/wlr_output_power_management_v1.h b/include/wlr/types/wlr_output_power_management_v1.h index 688e37a4f..ef8da8e55 100644 --- a/include/wlr/types/wlr_output_power_management_v1.h +++ b/include/wlr/types/wlr_output_power_management_v1.h @@ -8,14 +8,16 @@ struct wlr_output_power_manager_v1 { struct wl_global *global; struct wl_list output_powers; // wlr_output_power_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal set_mode; // struct wlr_output_power_v1_set_mode_event struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_output_power_v1 { @@ -24,10 +26,12 @@ struct wlr_output_power_v1 { struct wlr_output_power_manager_v1 *manager; struct wl_list link; // wlr_output_power_manager_v1.output_powers - struct wl_listener output_destroy_listener; - struct wl_listener output_commit_listener; - void *data; + + struct { + struct wl_listener output_destroy_listener; + struct wl_listener output_commit_listener; + } WLR_PRIVATE; }; struct wlr_output_power_v1_set_mode_event { diff --git a/include/wlr/types/wlr_pointer_constraints_v1.h b/include/wlr/types/wlr_pointer_constraints_v1.h index 75dddb818..e0f588065 100644 --- a/include/wlr/types/wlr_pointer_constraints_v1.h +++ b/include/wlr/types/wlr_pointer_constraints_v1.h @@ -86,9 +86,11 @@ struct wlr_pointer_constraints_v1 { struct wl_signal new_constraint; } events; - struct wl_listener display_destroy; - void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_pointer_constraints_v1 *wlr_pointer_constraints_v1_create( diff --git a/include/wlr/types/wlr_pointer_gestures_v1.h b/include/wlr/types/wlr_pointer_gestures_v1.h index 5510ce21c..bd2715178 100644 --- a/include/wlr/types/wlr_pointer_gestures_v1.h +++ b/include/wlr/types/wlr_pointer_gestures_v1.h @@ -20,13 +20,15 @@ struct wlr_pointer_gestures_v1 { struct wl_list pinches; // wl_resource_get_link() struct wl_list holds; // wl_resource_get_link() - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_pointer_gestures_v1 *wlr_pointer_gestures_v1_create( diff --git a/include/wlr/types/wlr_presentation_time.h b/include/wlr/types/wlr_presentation_time.h index 717665e68..9becffeee 100644 --- a/include/wlr/types/wlr_presentation_time.h +++ b/include/wlr/types/wlr_presentation_time.h @@ -26,7 +26,9 @@ struct wlr_presentation { struct wl_signal destroy; } events; - struct wl_listener display_destroy; + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_presentation_feedback { @@ -39,9 +41,11 @@ struct wlr_presentation_feedback { uint32_t output_commit_seq; bool zero_copy; - struct wl_listener output_commit; - struct wl_listener output_present; - struct wl_listener output_destroy; + struct { + struct wl_listener output_commit; + struct wl_listener output_present; + struct wl_listener output_destroy; + } WLR_PRIVATE; }; struct wlr_presentation_event { diff --git a/include/wlr/types/wlr_primary_selection_v1.h b/include/wlr/types/wlr_primary_selection_v1.h index 78b542a04..3ab2e1bdd 100644 --- a/include/wlr/types/wlr_primary_selection_v1.h +++ b/include/wlr/types/wlr_primary_selection_v1.h @@ -16,13 +16,15 @@ struct wlr_primary_selection_v1_device_manager { struct wl_global *global; struct wl_list devices; // wlr_primary_selection_v1_device.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; /** @@ -36,11 +38,13 @@ struct wlr_primary_selection_v1_device { struct wl_list offers; // wl_resource_get_link() - struct wl_listener seat_destroy; - struct wl_listener seat_focus_change; - struct wl_listener seat_set_primary_selection; - void *data; + + struct { + struct wl_listener seat_destroy; + struct wl_listener seat_focus_change; + struct wl_listener seat_set_primary_selection; + } WLR_PRIVATE; }; struct wlr_primary_selection_v1_device_manager * diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h index fcd44d529..4db7b5220 100644 --- a/include/wlr/types/wlr_relative_pointer_v1.h +++ b/include/wlr/types/wlr_relative_pointer_v1.h @@ -30,9 +30,11 @@ struct wlr_relative_pointer_manager_v1 { struct wl_signal new_relative_pointer; // struct wlr_relative_pointer_v1 } events; - struct wl_listener display_destroy_listener; - void *data; + + struct { + struct wl_listener display_destroy_listener; + } WLR_PRIVATE; }; /** @@ -51,10 +53,12 @@ struct wlr_relative_pointer_v1 { struct wl_signal destroy; } events; - struct wl_listener seat_destroy; - struct wl_listener pointer_destroy; - void *data; + + struct { + struct wl_listener seat_destroy; + struct wl_listener pointer_destroy; + } WLR_PRIVATE; }; struct wlr_relative_pointer_manager_v1 *wlr_relative_pointer_manager_v1_create( diff --git a/include/wlr/types/wlr_screencopy_v1.h b/include/wlr/types/wlr_screencopy_v1.h index c1e990fa8..acd0ce185 100644 --- a/include/wlr/types/wlr_screencopy_v1.h +++ b/include/wlr/types/wlr_screencopy_v1.h @@ -18,13 +18,15 @@ struct wlr_screencopy_manager_v1 { struct wl_global *global; struct wl_list frames; // wlr_screencopy_frame_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_screencopy_v1_client { @@ -50,11 +52,14 @@ struct wlr_screencopy_frame_v1 { struct wlr_buffer *buffer; struct wlr_output *output; - struct wl_listener output_commit; - struct wl_listener output_destroy; - struct wl_listener output_enable; void *data; + + struct { + struct wl_listener output_commit; + struct wl_listener output_destroy; + struct wl_listener output_enable; + } WLR_PRIVATE; }; struct wlr_screencopy_manager_v1 *wlr_screencopy_manager_v1_create( diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index dcb35c62c..69ee69fdd 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -78,15 +78,17 @@ struct wlr_touch_point { struct wlr_seat_client *focus_client; double sx, sy; - struct wl_listener surface_destroy; - struct wl_listener focus_surface_destroy; - struct wl_listener client_destroy; - struct { struct wl_signal destroy; } events; struct wl_list link; + + struct { + struct wl_listener surface_destroy; + struct wl_listener focus_surface_destroy; + struct wl_listener client_destroy; + } WLR_PRIVATE; }; struct wlr_seat_pointer_grab; @@ -194,11 +196,14 @@ struct wlr_seat_pointer_state { uint32_t grab_serial; uint32_t grab_time; - struct wl_listener surface_destroy; struct { struct wl_signal focus_change; // struct wlr_seat_pointer_focus_change_event } events; + + struct { + struct wl_listener surface_destroy; + } WLR_PRIVATE; }; struct wlr_seat_keyboard_state { @@ -208,18 +213,20 @@ struct wlr_seat_keyboard_state { struct wlr_seat_client *focused_client; struct wlr_surface *focused_surface; - struct wl_listener keyboard_destroy; - struct wl_listener keyboard_keymap; - struct wl_listener keyboard_repeat_info; - - struct wl_listener surface_destroy; - struct wlr_seat_keyboard_grab *grab; struct wlr_seat_keyboard_grab *default_grab; struct { struct wl_signal focus_change; // struct wlr_seat_keyboard_focus_change_event } events; + + struct { + struct wl_listener keyboard_destroy; + struct wl_listener keyboard_keymap; + struct wl_listener keyboard_repeat_info; + + struct wl_listener surface_destroy; + } WLR_PRIVATE; }; struct wlr_seat_touch_state { @@ -262,11 +269,6 @@ struct wlr_seat { struct wlr_seat_keyboard_state keyboard_state; struct wlr_seat_touch_state touch_state; - struct wl_listener display_destroy; - struct wl_listener selection_source_destroy; - struct wl_listener primary_selection_source_destroy; - struct wl_listener drag_source_destroy; - struct { struct wl_signal pointer_grab_begin; struct wl_signal pointer_grab_end; @@ -302,6 +304,13 @@ struct wlr_seat { } events; void *data; + + struct { + struct wl_listener display_destroy; + struct wl_listener selection_source_destroy; + struct wl_listener primary_selection_source_destroy; + struct wl_listener drag_source_destroy; + } WLR_PRIVATE; }; struct wlr_seat_pointer_request_set_cursor_event { diff --git a/include/wlr/types/wlr_server_decoration.h b/include/wlr/types/wlr_server_decoration.h index 7e78c5f21..2b0e859eb 100644 --- a/include/wlr/types/wlr_server_decoration.h +++ b/include/wlr/types/wlr_server_decoration.h @@ -49,14 +49,16 @@ struct wlr_server_decoration_manager { uint32_t default_mode; // enum wlr_server_decoration_manager_mode - struct wl_listener display_destroy; - struct { struct wl_signal new_decoration; struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_server_decoration { @@ -71,9 +73,11 @@ struct wlr_server_decoration { struct wl_signal mode; } events; - struct wl_listener surface_destroy_listener; - void *data; + + struct { + struct wl_listener surface_destroy_listener; + } WLR_PRIVATE; }; struct wlr_server_decoration_manager *wlr_server_decoration_manager_create( diff --git a/include/wlr/types/wlr_subcompositor.h b/include/wlr/types/wlr_subcompositor.h index 26be02959..251379d30 100644 --- a/include/wlr/types/wlr_subcompositor.h +++ b/include/wlr/types/wlr_subcompositor.h @@ -41,9 +41,6 @@ struct wlr_subsurface { bool synchronized; bool added; - struct wl_listener surface_client_commit; - struct wl_listener parent_destroy; - struct { struct wl_signal destroy; } events; @@ -52,17 +49,22 @@ struct wlr_subsurface { struct { struct wlr_surface_synced parent_synced; + + struct wl_listener surface_client_commit; + struct wl_listener parent_destroy; } WLR_PRIVATE; }; struct wlr_subcompositor { struct wl_global *global; - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; /** diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h index 57e067d75..dc911f101 100644 --- a/include/wlr/types/wlr_tablet_v2.h +++ b/include/wlr/types/wlr_tablet_v2.h @@ -44,13 +44,15 @@ struct wlr_tablet_manager_v2 { struct wl_list clients; // wlr_tablet_manager_client_v2.link struct wl_list seats; // wlr_tablet_seat_v2.link - struct wl_listener display_destroy; - struct { struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_tablet_v2_tablet { @@ -59,9 +61,11 @@ struct wlr_tablet_v2_tablet { struct wlr_input_device *wlr_device; struct wl_list clients; // wlr_tablet_client_v2.tablet_link - struct wl_listener tablet_destroy; - struct wlr_tablet_client_v2 *current_client; + + struct { + struct wl_listener tablet_destroy; + } WLR_PRIVATE; }; struct wlr_tablet_v2_tablet_tool { @@ -69,11 +73,8 @@ struct wlr_tablet_v2_tablet_tool { struct wlr_tablet_tool *wlr_tool; struct wl_list clients; // wlr_tablet_tool_client_v2.tool_link - struct wl_listener tool_destroy; - struct wlr_tablet_tool_client_v2 *current_client; struct wlr_surface *focused_surface; - struct wl_listener surface_destroy; struct wlr_tablet_tool_v2_grab *grab; struct wlr_tablet_tool_v2_grab default_grab; @@ -88,6 +89,11 @@ struct wlr_tablet_v2_tablet_tool { struct { struct wl_signal set_cursor; // struct wlr_tablet_v2_event_cursor } events; + + struct { + struct wl_listener surface_destroy; + struct wl_listener tool_destroy; + } WLR_PRIVATE; }; struct wlr_tablet_v2_tablet_pad { @@ -99,8 +105,6 @@ struct wlr_tablet_v2_tablet_pad { size_t group_count; uint32_t *groups; - struct wl_listener pad_destroy; - struct wlr_tablet_pad_client_v2 *current_client; struct wlr_tablet_pad_v2_grab *grab; struct wlr_tablet_pad_v2_grab default_grab; @@ -110,6 +114,10 @@ struct wlr_tablet_v2_tablet_pad { struct wl_signal strip_feedback; // struct wlr_tablet_v2_event_feedback struct wl_signal ring_feedback; // struct wlr_tablet_v2_event_feedback } events; + + struct { + struct wl_listener pad_destroy; + } WLR_PRIVATE; }; struct wlr_tablet_v2_event_cursor { diff --git a/include/wlr/types/wlr_tearing_control_v1.h b/include/wlr/types/wlr_tearing_control_v1.h index ddcb22bcc..ff981e414 100644 --- a/include/wlr/types/wlr_tearing_control_v1.h +++ b/include/wlr/types/wlr_tearing_control_v1.h @@ -44,13 +44,16 @@ struct wlr_tearing_control_manager_v1 { struct wl_list surface_hints; // wlr_tearing_control_v1.link - struct wl_listener display_destroy; struct { struct wl_signal new_object; // struct wlr_tearing_control_v1* struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_tearing_control_manager_v1 *wlr_tearing_control_manager_v1_create( diff --git a/include/wlr/types/wlr_text_input_v3.h b/include/wlr/types/wlr_text_input_v3.h index 37397c1f3..20396a91f 100644 --- a/include/wlr/types/wlr_text_input_v3.h +++ b/include/wlr/types/wlr_text_input_v3.h @@ -56,27 +56,31 @@ struct wlr_text_input_v3 { struct wl_list link; - struct wl_listener surface_destroy; - struct wl_listener seat_destroy; - struct { struct wl_signal enable; // struct wlr_text_input_v3 struct wl_signal commit; // struct wlr_text_input_v3 struct wl_signal disable; // struct wlr_text_input_v3 struct wl_signal destroy; // struct wlr_text_input_v3 } events; + + struct { + struct wl_listener surface_destroy; + struct wl_listener seat_destroy; + } WLR_PRIVATE; }; struct wlr_text_input_manager_v3 { struct wl_global *global; struct wl_list text_inputs; // struct wlr_text_input_v3.resource.link - struct wl_listener display_destroy; - struct { struct wl_signal text_input; // struct wlr_text_input_v3 struct wl_signal destroy; // struct wlr_input_method_manager_v3 } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_text_input_manager_v3 *wlr_text_input_manager_v3_create( diff --git a/include/wlr/types/wlr_transient_seat_v1.h b/include/wlr/types/wlr_transient_seat_v1.h index b0d329fd5..9aafed3b4 100644 --- a/include/wlr/types/wlr_transient_seat_v1.h +++ b/include/wlr/types/wlr_transient_seat_v1.h @@ -24,7 +24,6 @@ struct wlr_transient_seat_v1 { struct wlr_transient_seat_manager_v1 { struct wl_global *global; - struct wl_listener display_destroy; struct { /** @@ -36,6 +35,10 @@ struct wlr_transient_seat_manager_v1 { */ struct wl_signal create_seat; // struct wlr_transient_seat_v1 } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_transient_seat_manager_v1 *wlr_transient_seat_manager_v1_create( diff --git a/include/wlr/types/wlr_viewporter.h b/include/wlr/types/wlr_viewporter.h index e1e2ec04a..55773724a 100644 --- a/include/wlr/types/wlr_viewporter.h +++ b/include/wlr/types/wlr_viewporter.h @@ -29,7 +29,9 @@ struct wlr_viewporter { struct wl_signal destroy; } events; - struct wl_listener display_destroy; + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_viewporter *wlr_viewporter_create(struct wl_display *display); diff --git a/include/wlr/types/wlr_virtual_keyboard_v1.h b/include/wlr/types/wlr_virtual_keyboard_v1.h index cb0bb9823..babc535a5 100644 --- a/include/wlr/types/wlr_virtual_keyboard_v1.h +++ b/include/wlr/types/wlr_virtual_keyboard_v1.h @@ -16,12 +16,14 @@ struct wlr_virtual_keyboard_manager_v1 { struct wl_global *global; struct wl_list virtual_keyboards; // wlr_virtual_keyboard_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal new_virtual_keyboard; // struct wlr_virtual_keyboard_v1 struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_virtual_keyboard_v1 { diff --git a/include/wlr/types/wlr_virtual_pointer_v1.h b/include/wlr/types/wlr_virtual_pointer_v1.h index a05268547..c8804e84e 100644 --- a/include/wlr/types/wlr_virtual_pointer_v1.h +++ b/include/wlr/types/wlr_virtual_pointer_v1.h @@ -18,12 +18,14 @@ struct wlr_virtual_pointer_manager_v1 { struct wl_global *global; struct wl_list virtual_pointers; // wlr_virtual_pointer_v1.link - struct wl_listener display_destroy; - struct { struct wl_signal new_virtual_pointer; // struct wlr_virtual_pointer_v1_new_pointer_event struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_virtual_pointer_v1 { diff --git a/include/wlr/types/wlr_xdg_decoration_v1.h b/include/wlr/types/wlr_xdg_decoration_v1.h index 24928e915..78f84eb39 100644 --- a/include/wlr/types/wlr_xdg_decoration_v1.h +++ b/include/wlr/types/wlr_xdg_decoration_v1.h @@ -14,14 +14,16 @@ struct wlr_xdg_decoration_manager_v1 { struct wl_global *global; struct wl_list decorations; // wlr_xdg_toplevel_decoration.link - struct wl_listener display_destroy; - struct { struct wl_signal new_toplevel_decoration; // struct wlr_xdg_toplevel_decoration struct wl_signal destroy; } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_toplevel_decoration_v1_configure { diff --git a/include/wlr/types/wlr_xdg_foreign_registry.h b/include/wlr/types/wlr_xdg_foreign_registry.h index c240c8f3a..aa33b33a6 100644 --- a/include/wlr/types/wlr_xdg_foreign_registry.h +++ b/include/wlr/types/wlr_xdg_foreign_registry.h @@ -23,10 +23,13 @@ struct wlr_xdg_foreign_registry { struct wl_list exported_surfaces; // struct wlr_xdg_foreign_exported_surface - struct wl_listener display_destroy; struct { struct wl_signal destroy; } events; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_foreign_exported { diff --git a/include/wlr/types/wlr_xdg_foreign_v1.h b/include/wlr/types/wlr_xdg_foreign_v1.h index 7b31a61ab..975828c2c 100644 --- a/include/wlr/types/wlr_xdg_foreign_v1.h +++ b/include/wlr/types/wlr_xdg_foreign_v1.h @@ -18,9 +18,6 @@ struct wlr_xdg_foreign_v1 { struct wl_list objects; // wlr_xdg_exported_v1.link or wlr_xdg_imported_v1.link } exporter, importer; - struct wl_listener foreign_registry_destroy; - struct wl_listener display_destroy; - struct wlr_xdg_foreign_registry *registry; struct { @@ -28,24 +25,34 @@ struct wlr_xdg_foreign_v1 { } events; void *data; + + struct { + struct wl_listener foreign_registry_destroy; + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_exported_v1 { struct wlr_xdg_foreign_exported base; struct wl_resource *resource; - struct wl_listener xdg_toplevel_destroy; - struct wl_list link; // wlr_xdg_foreign_v1.exporter.objects + + struct { + struct wl_listener xdg_toplevel_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_imported_v1 { struct wlr_xdg_foreign_exported *exported; - struct wl_listener exported_destroyed; struct wl_resource *resource; struct wl_list link; // wlr_xdg_foreign_v1.importer.objects struct wl_list children; + + struct { + struct wl_listener exported_destroyed; + } WLR_PRIVATE; }; struct wlr_xdg_imported_child_v1 { @@ -54,8 +61,10 @@ struct wlr_xdg_imported_child_v1 { struct wl_list link; // wlr_xdg_imported_v1.children - struct wl_listener xdg_toplevel_destroy; - struct wl_listener xdg_toplevel_set_parent; + struct { + struct wl_listener xdg_toplevel_destroy; + struct wl_listener xdg_toplevel_set_parent; + } WLR_PRIVATE; }; struct wlr_xdg_foreign_v1 *wlr_xdg_foreign_v1_create( diff --git a/include/wlr/types/wlr_xdg_foreign_v2.h b/include/wlr/types/wlr_xdg_foreign_v2.h index f5e14c700..0af0be52e 100644 --- a/include/wlr/types/wlr_xdg_foreign_v2.h +++ b/include/wlr/types/wlr_xdg_foreign_v2.h @@ -18,9 +18,6 @@ struct wlr_xdg_foreign_v2 { struct wl_list objects; // wlr_xdg_exported_v2.link or wlr_xdg_imported_v2.link } exporter, importer; - struct wl_listener foreign_registry_destroy; - struct wl_listener display_destroy; - struct wlr_xdg_foreign_registry *registry; struct { @@ -28,24 +25,34 @@ struct wlr_xdg_foreign_v2 { } events; void *data; + + struct { + struct wl_listener foreign_registry_destroy; + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_exported_v2 { struct wlr_xdg_foreign_exported base; struct wl_resource *resource; - struct wl_listener xdg_toplevel_destroy; - struct wl_list link; // wlr_xdg_foreign_v2.exporter.objects + + struct { + struct wl_listener xdg_toplevel_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_imported_v2 { struct wlr_xdg_foreign_exported *exported; - struct wl_listener exported_destroyed; struct wl_resource *resource; struct wl_list link; // wlr_xdg_foreign_v2.importer.objects struct wl_list children; + + struct { + struct wl_listener exported_destroyed; + } WLR_PRIVATE; }; struct wlr_xdg_imported_child_v2 { @@ -54,8 +61,10 @@ struct wlr_xdg_imported_child_v2 { struct wl_list link; // wlr_xdg_imported_v2.children - struct wl_listener xdg_toplevel_destroy; - struct wl_listener xdg_toplevel_set_parent; + struct { + struct wl_listener xdg_toplevel_destroy; + struct wl_listener xdg_toplevel_set_parent; + } WLR_PRIVATE; }; struct wlr_xdg_foreign_v2 *wlr_xdg_foreign_v2_create( diff --git a/include/wlr/types/wlr_xdg_output_v1.h b/include/wlr/types/wlr_xdg_output_v1.h index 340252ddf..4ee8ec3b8 100644 --- a/include/wlr/types/wlr_xdg_output_v1.h +++ b/include/wlr/types/wlr_xdg_output_v1.h @@ -21,8 +21,10 @@ struct wlr_xdg_output_v1 { int32_t x, y; int32_t width, height; - struct wl_listener destroy; - struct wl_listener description; + struct { + struct wl_listener destroy; + struct wl_listener description; + } WLR_PRIVATE; }; struct wlr_xdg_output_manager_v1 { @@ -35,10 +37,12 @@ struct wlr_xdg_output_manager_v1 { struct wl_signal destroy; } events; - struct wl_listener display_destroy; - struct wl_listener layout_add; - struct wl_listener layout_change; - struct wl_listener layout_destroy; + struct { + struct wl_listener display_destroy; + struct wl_listener layout_add; + struct wl_listener layout_change; + struct wl_listener layout_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_output_manager_v1 *wlr_xdg_output_manager_v1_create( diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 723f8adf6..3e9fd2b70 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -22,8 +22,6 @@ struct wlr_xdg_shell { struct wl_list popup_grabs; uint32_t ping_timeout; - struct wl_listener display_destroy; - struct { struct wl_signal new_surface; // struct wlr_xdg_surface struct wl_signal new_toplevel; // struct wlr_xdg_toplevel @@ -32,6 +30,10 @@ struct wlr_xdg_shell { } events; void *data; + + struct { + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_client { @@ -124,7 +126,10 @@ struct wlr_xdg_popup_grab { struct wlr_seat *seat; struct wl_list popups; struct wl_list link; // wlr_xdg_shell.popup_grabs - struct wl_listener seat_destroy; + + struct { + struct wl_listener seat_destroy; + } WLR_PRIVATE; }; enum wlr_xdg_surface_role { @@ -176,7 +181,10 @@ struct wlr_xdg_toplevel_configure { struct wlr_xdg_toplevel_requested { bool maximized, minimized, fullscreen; struct wlr_output *fullscreen_output; - struct wl_listener fullscreen_output_destroy; + + struct { + struct wl_listener fullscreen_output_destroy; + } WLR_PRIVATE; }; struct wlr_xdg_toplevel { @@ -184,7 +192,6 @@ struct wlr_xdg_toplevel { struct wlr_xdg_surface *base; struct wlr_xdg_toplevel *parent; - struct wl_listener parent_unmap; struct wlr_xdg_toplevel_state current, pending; @@ -223,6 +230,8 @@ struct wlr_xdg_toplevel { struct { struct wlr_surface_synced synced; + + struct wl_listener parent_unmap; } WLR_PRIVATE; }; diff --git a/include/wlr/xwayland/server.h b/include/wlr/xwayland/server.h index fa16a3b00..b699b8f4f 100644 --- a/include/wlr/xwayland/server.h +++ b/include/wlr/xwayland/server.h @@ -48,10 +48,12 @@ struct wlr_xwayland_server { struct wl_signal destroy; } events; - struct wl_listener client_destroy; - struct wl_listener display_destroy; - void *data; + + struct { + struct wl_listener client_destroy; + struct wl_listener display_destroy; + } WLR_PRIVATE; }; struct wlr_xwayland_server_ready_event { diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h index 339aef0ec..dbd881fda 100644 --- a/include/wlr/xwayland/xwayland.h +++ b/include/wlr/xwayland/xwayland.h @@ -133,9 +133,6 @@ struct wlr_xwayland_surface { struct wlr_surface *surface; struct wlr_addon surface_addon; - struct wl_listener surface_commit; - struct wl_listener surface_map; - struct wl_listener surface_unmap; int16_t x, y; uint16_t width, height; @@ -216,6 +213,12 @@ struct wlr_xwayland_surface { } events; void *data; + + struct { + struct wl_listener surface_commit; + struct wl_listener surface_map; + struct wl_listener surface_unmap; + } WLR_PRIVATE; }; struct wlr_xwayland_surface_configure_event {