diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-04-04 12:06:00 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-04-04 12:06:00 +0200 |
| commit | 3cd3537ef8d077de9da2a041ee4268979feeb39d (patch) | |
| tree | 6526e41cb0d4a3f377361f88e69632339526b3e7 /libdecor/src/libdecor.c | |
| parent | fb48bc22cca0adc38689ba7c96666ff772ab91a6 (diff) | |
Update bundled libdecor to last upstream version (Apr 4, 2025)
Diffstat (limited to 'libdecor/src/libdecor.c')
| -rw-r--r-- | libdecor/src/libdecor.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/libdecor/src/libdecor.c b/libdecor/src/libdecor.c index 92d4f46e5..8cef57221 100644 --- a/libdecor/src/libdecor.c +++ b/libdecor/src/libdecor.c @@ -451,11 +451,28 @@ xdg_toplevel_close(void *user_data, #ifdef HAVE_XDG_SHELL_V6 static void -xdg_toplevel_configure_bounds(void *data, +xdg_toplevel_configure_bounds(void *user_data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) { + struct libdecor_frame *frame = user_data; + struct libdecor_frame_private *frame_priv = frame->priv; + struct libdecor *context = frame_priv->context; + struct libdecor_plugin *plugin = context->plugin; + int left = 0, top = 0, right = 0, bottom = 0; + + if (frame_has_visible_client_side_decoration(frame) && + plugin->priv->iface->frame_get_border_size) { + plugin->priv->iface->frame_get_border_size(plugin, frame, NULL, + &left, &right, &top, &bottom); + } + + width -= left + right; + height -= top + bottom; + if (frame_priv->iface->bounds) { + frame_priv->iface->bounds(frame, width, height, frame_priv->user_data); + } } static void @@ -1261,6 +1278,16 @@ libdecor_frame_get_xdg_toplevel(struct libdecor_frame *frame) return frame->priv->xdg_toplevel; } +LIBDECOR_EXPORT void +libdecor_set_handle_application_cursor(struct libdecor *context, + bool handle_cursor) +{ + struct libdecor_plugin *plugin = context->plugin; + + plugin->priv->iface->set_handle_application_cursor(plugin, + handle_cursor); +} + LIBDECOR_EXPORT int libdecor_frame_get_content_width(struct libdecor_frame *frame) { |
