aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-29 17:03:19 +0100
committerSimon Ser <contact@emersion.fr>2022-12-05 10:51:46 +0100
commitd9629181285c7e4589eed5608fc8bf29f311e45b (patch)
tree8d9f34ec6504361242dacfc3e69554ccaca79dae
parentc4727240afce2ba62f6059b8724fba6af9306107 (diff)
xwayland/xwm: rename xwm_map_shell_surface()
Rename xwm_map_shell_surface() to xwayland_surface_associate(). This function doesn't actually "map" the surface in Wayland parlance, the wl_surface may not have a buffer attached yet.
-rw-r--r--xwayland/xwm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index cb8acd5d..c07f1a58 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -875,7 +875,7 @@ static const struct wlr_surface_role xwayland_surface_role = {
.destroy = xwayland_surface_role_destroy,
};
-static void xwm_map_shell_surface(struct wlr_xwm *xwm,
+static void xwayland_surface_associate(struct wlr_xwm *xwm,
struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) {
if (!wlr_surface_set_role(surface, &xwayland_surface_role, xsurface,
NULL, 0)) {
@@ -1112,7 +1112,7 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
if (resource) {
struct wlr_surface *surface = wlr_surface_from_resource(resource);
xsurface->surface_id = 0;
- xwm_map_shell_surface(xwm, xsurface, surface);
+ xwayland_surface_associate(xwm, xsurface, surface);
} else {
xsurface->surface_id = id;
wl_list_remove(&xsurface->unpaired_link);
@@ -1142,7 +1142,7 @@ static void xwm_handle_surface_serial_message(struct wlr_xwm *xwm,
struct wlr_surface *surface = wlr_xwayland_shell_v1_surface_from_serial(
xwm->xwayland->shell_v1, xsurface->serial);
if (surface != NULL) {
- xwm_map_shell_surface(xwm, xsurface, surface);
+ xwayland_surface_associate(xwm, xsurface, surface);
} else {
wl_list_remove(&xsurface->unpaired_link);
wl_list_insert(&xwm->unpaired_surfaces, &xsurface->unpaired_link);
@@ -1672,7 +1672,7 @@ static void handle_compositor_new_surface(struct wl_listener *listener,
struct wlr_xwayland_surface *xsurface;
wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
if (xsurface->surface_id == surface_id) {
- xwm_map_shell_surface(xwm, xsurface, surface);
+ xwayland_surface_associate(xwm, xsurface, surface);
xcb_flush(xwm->xcb_conn);
return;
}
@@ -1697,7 +1697,7 @@ static void handle_shell_v1_new_surface(struct wl_listener *listener,
struct wlr_xwayland_surface *xsurface;
wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
if (xsurface->serial == shell_surface->serial) {
- xwm_map_shell_surface(xwm, xsurface, shell_surface->surface);
+ xwayland_surface_associate(xwm, xsurface, shell_surface->surface);
return;
}
}