aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-03 12:46:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-03 12:46:37 +0000
commit765fe13aff4b9e9b3b1f487a6595a421efbd26b3 (patch)
treed998d63a784c7a2ab3256664cd19318625540bbb
parentwayland: window: pass window pointer to xdg toplevel callbacks (diff)
wayland: remove wayl_terminal_from_xdg_{surface,toplevel}
-rw-r--r--wayland.c26
-rw-r--r--wayland.h4
2 files changed, 0 insertions, 30 deletions
diff --git a/wayland.c b/wayland.c
index 51e9079f..a015fdb6 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1006,29 +1006,3 @@ wayl_terminal_from_surface(struct wayland *wayl, struct wl_surface *surface)
LOG_WARN("surface %p doesn't map to a terminal", surface);
return NULL;
}
-
-struct terminal *
-wayl_terminal_from_xdg_surface(struct wayland *wayl,
- struct xdg_surface *surface)
-{
- tll_foreach(wayl->terms, it) {
- if (it->item->window->xdg_surface == surface)
- return it->item;
- }
-
- assert(false);
- return NULL;
-}
-
-struct terminal *
-wayl_terminal_from_xdg_toplevel(struct wayland *wayl,
- struct xdg_toplevel *toplevel)
-{
- tll_foreach(wayl->terms, it) {
- if (it->item->window->xdg_toplevel == toplevel)
- return it->item;
- }
-
- assert(false);
- return NULL;
-}
diff --git a/wayland.h b/wayland.h
index b47bf0c3..99b678fb 100644
--- a/wayland.h
+++ b/wayland.h
@@ -173,10 +173,6 @@ void wayl_destroy(struct wayland *wayl);
struct terminal *wayl_terminal_from_surface(
struct wayland *wayl, struct wl_surface *surface);
-struct terminal *wayl_terminal_from_xdg_surface(
- struct wayland *wayl, struct xdg_surface *surface);
-struct terminal *wayl_terminal_from_xdg_toplevel(
- struct wayland *wayl, struct xdg_toplevel *toplevel);
/* TODO: pass something other than 'term'? Need scale... */
bool wayl_cursor_set(struct wayland *wayl, const struct terminal *term);