mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge branch 'master' into xwayland-dnd
This commit is contained in:
commit
58ac05c276
18 changed files with 230 additions and 27 deletions
|
|
@ -34,6 +34,16 @@ static struct wlr_layer_surface *layer_surface_from_resource(
|
|||
return wl_resource_get_user_data(resource);
|
||||
}
|
||||
|
||||
bool wlr_surface_is_layer_surface(struct wlr_surface *surface) {
|
||||
return strcmp(surface->role, zwlr_layer_surface_role) == 0;
|
||||
}
|
||||
|
||||
struct wlr_layer_surface *wlr_layer_surface_from_wlr_surface(
|
||||
struct wlr_surface *surface) {
|
||||
assert(wlr_surface_is_layer_surface(surface));
|
||||
return (struct wlr_layer_surface *)surface->role_data;
|
||||
}
|
||||
|
||||
static void layer_surface_configure_destroy(
|
||||
struct wlr_layer_surface_configure *configure) {
|
||||
if (configure == NULL) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,16 @@
|
|||
|
||||
static const char *wlr_wl_shell_surface_role = "wl-shell-surface";
|
||||
|
||||
bool wlr_surface_is_wl_shell_surface(struct wlr_surface *surface) {
|
||||
return strcmp(surface->role, wlr_wl_shell_surface_role) == 0;
|
||||
}
|
||||
|
||||
struct wlr_wl_surface *wlr_wl_shell_surface_from_wlr_surface(
|
||||
struct wlr_surface *surface) {
|
||||
assert(wlr_surface_is_wl_shell_surface(surface));
|
||||
return (struct wlr_wl_surface *)surface->role_data;
|
||||
}
|
||||
|
||||
static void shell_pointer_grab_end(struct wlr_seat_pointer_grab *grab) {
|
||||
struct wlr_wl_shell_popup_grab *popup_grab = grab->data;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,17 @@
|
|||
static const char *wlr_desktop_xdg_toplevel_role = "xdg_toplevel";
|
||||
static const char *wlr_desktop_xdg_popup_role = "xdg_popup";
|
||||
|
||||
bool wlr_surface_is_xdg_surface(struct wlr_surface *surface) {
|
||||
return strcmp(surface->role, wlr_desktop_xdg_toplevel_role) == 0 ||
|
||||
strcmp(surface->role, wlr_desktop_xdg_popup_role) == 0;
|
||||
}
|
||||
|
||||
struct wlr_xdg_surface *wlr_xdg_surface_from_wlr_surface(
|
||||
struct wlr_surface *surface) {
|
||||
assert(wlr_surface_is_xdg_surface(surface));
|
||||
return (struct wlr_xdg_surface *)surface->role_data;
|
||||
}
|
||||
|
||||
struct wlr_xdg_positioner {
|
||||
struct wl_resource *resource;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,17 @@
|
|||
static const char *wlr_desktop_xdg_toplevel_role = "xdg_toplevel_v6";
|
||||
static const char *wlr_desktop_xdg_popup_role = "xdg_popup_v6";
|
||||
|
||||
bool wlr_surface_is_xdg_surface_v6(struct wlr_surface *surface) {
|
||||
return strcmp(surface->role, wlr_desktop_xdg_toplevel_role) == 0 ||
|
||||
strcmp(surface->role, wlr_desktop_xdg_popup_role) == 0;
|
||||
}
|
||||
|
||||
struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_from_wlr_surface(
|
||||
struct wlr_surface *surface) {
|
||||
assert(wlr_surface_is_xdg_surface_v6(surface));
|
||||
return (struct wlr_xdg_surface_v6 *)surface->role_data;
|
||||
}
|
||||
|
||||
struct wlr_xdg_positioner_v6_resource {
|
||||
struct wl_resource *resource;
|
||||
struct wlr_xdg_positioner_v6 attrs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue