Merge pull request #524 from acrisci/role-committed

[wip] Role committed
This commit is contained in:
emersion 2017-12-27 13:02:49 +01:00 committed by GitHub
commit a79dc7df51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 44 deletions

View file

@ -73,7 +73,6 @@ struct wlr_drag_icon {
} events;
struct wl_listener surface_destroy;
struct wl_listener surface_commit;
struct wl_listener seat_client_destroy;
};

View file

@ -77,6 +77,10 @@ struct wlr_surface {
struct wl_listener compositor_listener;
void *compositor_data;
// surface commit callback for the role that runs before all others
void (*role_committed)(struct wlr_surface *surface, void *role_data);
void *role_data;
// subsurface properties
struct wlr_subsurface *subsurface;
struct wl_list subsurface_list; // wlr_subsurface::parent_link
@ -146,4 +150,12 @@ void wlr_surface_send_leave(struct wlr_surface *surface,
void wlr_surface_send_frame_done(struct wlr_surface *surface,
const struct timespec *when);
/**
* Set a callback for surface commit that runs before all the other callbacks.
* This is intended for use by the surface role.
*/
void wlr_surface_set_role_committed(struct wlr_surface *surface,
void (*role_committed)(struct wlr_surface *surface, void *role_data),
void *role_data);
#endif

View file

@ -70,7 +70,6 @@ struct wlr_wl_shell_surface {
char *class;
struct wl_listener surface_destroy_listener;
struct wl_listener surface_commit_listener;
struct wlr_wl_shell_surface *parent;
struct wl_list popup_link;
@ -79,7 +78,6 @@ struct wlr_wl_shell_surface {
struct {
struct wl_signal destroy;
struct wl_signal commit;
struct wl_signal ping_timeout;
struct wl_signal request_move;

View file

@ -122,10 +122,8 @@ struct wlr_xdg_surface_v6 {
struct wlr_box *geometry;
struct wl_listener surface_destroy_listener;
struct wl_listener surface_commit_listener;
struct {
struct wl_signal commit;
struct wl_signal destroy;
struct wl_signal ping_timeout;

View file

@ -134,7 +134,6 @@ struct wlr_xwayland_surface {
} events;
struct wl_listener surface_destroy;
struct wl_listener surface_commit;
void *data;
};