Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add breaking changes for wlroots 0.15 #51

Merged
merged 2 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions wlroots/ffi_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ def check_version():

void wlr_box_transform(struct wlr_box *dest, const struct wlr_box *box,
enum wl_output_transform transform, int width, int height);

void wlr_box_rotated_bounds(struct wlr_box *dest, const struct wlr_box *box, float rotation);
"""

# types/wlr_cursor.h
Expand All @@ -170,6 +168,7 @@ def check_version():
struct wl_signal touch_down;
struct wl_signal touch_motion;
struct wl_signal touch_cancel;
struct wl_signal touch_frame;

struct wl_signal tablet_tool_axis;
struct wl_signal tablet_tool_proximity;
Expand Down Expand Up @@ -572,7 +571,7 @@ def check_version():
struct pixman_region32 previous[WLR_OUTPUT_DAMAGE_PREVIOUS_LEN];
size_t previous_idx;

enum wlr_output_state_buffer_type pending_buffer_type;
bool pending_attach_render;

struct {
struct wl_signal frame;
Expand Down Expand Up @@ -1103,7 +1102,7 @@ def check_version():
uint32_t committed;
uint32_t seq;

struct wl_resource *buffer_resource;
struct wlr_buffer *buffer;
int32_t dx, dy;
struct pixman_region32 surface_damage, buffer_damage;
struct pixman_region32 opaque, input;
Expand All @@ -1114,6 +1113,8 @@ def check_version():
int width, height;
int buffer_width, buffer_height;

struct wl_list subsurfaces_below;
struct wl_list subsurfaces_above;
...;
};

Expand Down Expand Up @@ -1141,7 +1142,7 @@ def check_version():
struct pixman_region32 buffer_damage;
struct pixman_region32 opaque_region;
struct pixman_region32 input_region;
struct wlr_surface_state current, pending, previous;
struct wlr_surface_state current, pending;

struct wl_list cached;

Expand All @@ -1154,18 +1155,14 @@ def check_version():
struct wl_signal destroy;
} events;

struct wl_list subsurfaces_below;
struct wl_list subsurfaces_above;
struct wl_list subsurfaces_pending_below;
struct wl_list subsurfaces_pending_above;
struct wl_list current_outputs;
void *data;
struct wl_listener renderer_destroy;

void *data;
...;
};

struct wlr_subsurface_state {
struct wlr_subsurface_parent_state {
int32_t x, y;
...;
};
Expand All @@ -1175,7 +1172,7 @@ def check_version():
struct wlr_surface *surface;
struct wlr_surface *parent;

struct wlr_subsurface_state current, pending;
struct wlr_subsurface_parent_state current, pending;

uint32_t cached_seq;
bool has_cache;
Expand All @@ -1184,9 +1181,6 @@ def check_version():
bool reordered;
bool mapped;

struct wl_list parent_link;
struct wl_list parent_pending_link;

struct wl_listener surface_destroy;
struct wl_listener parent_destroy;

Expand All @@ -1211,10 +1205,6 @@ def check_version():

struct wlr_texture *wlr_surface_get_texture(struct wlr_surface *surface);

struct wlr_subsurface *wlr_subsurface_create(struct wlr_surface *surface,
struct wlr_surface *parent, uint32_t version, uint32_t id,
struct wl_list *resource_list);

struct wlr_surface *wlr_surface_get_root_surface(struct wlr_surface *surface);

bool wlr_surface_point_accepts_input(struct wlr_surface *surface,
Expand Down Expand Up @@ -1772,7 +1762,7 @@ def check_version():
struct wlr_layer_shell_v1 *shell;
struct wl_list popups; // wlr_xdg_popup::link
char *namespace;
bool added, configured, mapped, closed;
bool added, configured, mapped;
uint32_t configure_serial;
uint32_t configure_next_serial;
struct wl_list configure_list;
Expand All @@ -1797,7 +1787,7 @@ def check_version():
void wlr_layer_surface_v1_configure(struct wlr_layer_surface_v1 *surface,
uint32_t width, uint32_t height);

void wlr_layer_surface_v1_close(struct wlr_layer_surface_v1 *surface);
void wlr_layer_surface_v1_destroy(struct wlr_layer_surface_v1 *surface);

bool wlr_surface_is_layer_surface(struct wlr_surface *surface);

Expand Down
8 changes: 2 additions & 6 deletions wlroots/wlr_types/layer_shell_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ def configured(self) -> bool:
def mapped(self) -> bool:
return self._ptr.mapped

@property
def closed(self) -> bool:
return self._ptr.closed

@property
def client_pending(self) -> LayerSurfaceV1State:
state_ptr = self._ptr.client_pending
Expand All @@ -159,8 +155,8 @@ def configure(self, width: int, height: int) -> None:
"""
lib.wlr_layer_surface_v1_configure(self._ptr, width, height)

def close(self) -> None:
lib.wlr_layer_surface_v1_close(self._ptr)
def destroy(self) -> None:
lib.wlr_layer_surface_v1_destroy(self._ptr)

@classmethod
def from_wlr_surface(cls, surface: Surface):
Expand Down