Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 52da68b

Browse files
Kirill Primakemersion
authored andcommitted
xdg popup: move function to a file it belongs to
1 parent e479dc1 commit 52da68b

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

types/xdg_shell/wlr_xdg_popup.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,21 @@ struct wlr_xdg_popup_grab *get_xdg_shell_popup_grab_from_seat(
196196
return xdg_grab;
197197
}
198198

199+
void handle_xdg_surface_popup_committed(struct wlr_xdg_surface *surface) {
200+
assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
201+
202+
if (!surface->popup->parent) {
203+
wl_resource_post_error(surface->resource,
204+
XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
205+
"xdg_popup has no parent");
206+
return;
207+
}
208+
209+
if (!surface->popup->committed) {
210+
schedule_xdg_surface_configure(surface);
211+
surface->popup->committed = true;
212+
}
213+
}
199214

200215
static const struct xdg_popup_interface xdg_popup_implementation;
201216

types/xdg_shell/wlr_xdg_positioner.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,6 @@ void create_xdg_positioner(struct wlr_xdg_client *client, uint32_t id) {
140140
positioner, xdg_positioner_handle_resource_destroy);
141141
}
142142

143-
void handle_xdg_surface_popup_committed(struct wlr_xdg_surface *surface) {
144-
assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
145-
146-
if (!surface->popup->parent) {
147-
wl_resource_post_error(surface->resource,
148-
XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
149-
"xdg_popup has no parent");
150-
return;
151-
}
152-
153-
if (!surface->popup->committed) {
154-
schedule_xdg_surface_configure(surface);
155-
surface->popup->committed = true;
156-
}
157-
}
158-
159143
static bool positioner_anchor_has_edge(enum xdg_positioner_anchor anchor,
160144
enum xdg_positioner_anchor edge) {
161145
switch (edge) {

0 commit comments

Comments
 (0)