diff options
| author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | |
|---|---|---|
| 2022-10-08 13:00:03 -0500 | ||
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | |
| 2022-10-08 13:02:43 -0500 | ||
| commit | 952fde68a3cb1871f39c464d56f999d5a966e7a4 (patch) | |
| tree | 4ddfb9d721bca7eca02db70c56d0d13e6a9fbc9d /client.h | |
| parent | 0d1ca4663ca62329e1e171053ceb35bbc71ec30a (diff) | |
| download | dwl-952fde68a3cb1871f39c464d56f999d5a966e7a4.tar.gz dwl-952fde68a3cb1871f39c464d56f999d5a966e7a4.tar.bz2 dwl-952fde68a3cb1871f39c464d56f999d5a966e7a4.zip | |
correctly handle cursor motion when button is held (for layer surfaces)
@@ -307,3 +307,18 @@ toplevel_from_popup(struct wlr_xdg_popup *popup) } } } + +static inline void * +toplevel_from_wlr_layer_surface(struct wlr_surface *s) +{ + Client *c; + struct wlr_layer_surface_v1 *wlr_layer_surface; + + if ((c = client_from_wlr_surface(s))) + return c; + else if (s && wlr_surface_is_layer_surface(s) + && (wlr_layer_surface = wlr_layer_surface_v1_from_wlr_surface(s))) + return wlr_layer_surface->data; + + return NULL; +} |