clients/image: use widget variable directly

Cosmetic change. Instead of accessing image->frame_widget on the widget
handlers, use the parameter widget.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2024-04-12 10:17:17 -03:00 committed by Pekka Paalanen
parent c9e76869c4
commit c427ae5a49
1 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ redraw_handler(struct widget *widget, void *data)
surface = window_get_surface(image->window);
cr = cairo_create(surface);
widget_get_allocation(image->frame_widget, &allocation);
widget_get_allocation(widget, &allocation);
cairo_rectangle(cr, allocation.x, allocation.y,
allocation.width, allocation.height);
cairo_clip(cr);
@ -193,7 +193,7 @@ enter_handler(struct widget *widget,
struct image *image = data;
struct rectangle allocation;
widget_get_allocation(image->frame_widget, &allocation);
widget_get_allocation(widget, &allocation);
x -= allocation.x;
y -= allocation.y;
@ -225,7 +225,7 @@ motion_handler(struct widget *widget,
struct image *image = data;
struct rectangle allocation;
widget_get_allocation(image->frame_widget, &allocation);
widget_get_allocation(widget, &allocation);
x -= allocation.x;
y -= allocation.y;