From: Emmanuele Bassi Date: Sun, 26 Mar 2023 14:50:22 +0000 (+0100) Subject: Remove wrong annotation from GdkDragSurface::compute-size X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~494^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8dddddfe8c940d1b82175d8fd1078919a37c599c;p=gtk4.git Remove wrong annotation from GdkDragSurface::compute-size Just like GdkToplevel::compute-size, the size argument of the signal is given to the handlers by GDK; it's not an out argument meant to be allocated by the caller. --- diff --git a/gdk/gdkdragsurface.c b/gdk/gdkdragsurface.c index dcb6c28cca..e9c097ed2e 100644 --- a/gdk/gdkdragsurface.c +++ b/gdk/gdkdragsurface.c @@ -69,19 +69,21 @@ gdk_drag_surface_default_init (GdkDragSurfaceInterface *iface) /** * GdkDragSurface::compute-size: * @surface: a `GdkDragSurface` - * @size: (type Gdk.DragSurfaceSize) (out caller-allocates): a - * `GdkDragSurfaceSize` + * @size: (type Gdk.DragSurfaceSize): the size of the drag surface * * Emitted when the size for the surface needs to be computed, when it is * present. * - * It will normally be emitted during the native surface layout cycle when the - * surface size needs to be recomputed. + * This signal will normally be emitted during the native surface layout + * cycle when the surface size needs to be recomputed. * - * It is the responsibility of the drag surface user to handle this signal and - * compute the desired size of the surface, storing the computed size in the - * [struct@Gdk.DragSurfaceSize] object. Failing to do so will result in an - * arbitrary size being used as a result. + * It is the responsibility of the drag surface user to handle this signal + * and compute the desired size of the surface, storing the computed size + * in the [struct@Gdk.DragSurfaceSize] object that is passed to the signal + * handler, using [method@Gdk.DragSurfaceSize.set_size]. + * + * Failing to set a size so will result in an arbitrary size being used as + * a result. * * Since: 4.12 */ @@ -108,8 +110,8 @@ gdk_drag_surface_default_init (GdkDragSurfaceInterface *iface) */ gboolean gdk_drag_surface_present (GdkDragSurface *drag_surface, - int width, - int height) + int width, + int height) { g_return_val_if_fail (GDK_IS_DRAG_SURFACE (drag_surface), FALSE); g_return_val_if_fail (width > 0, FALSE);