summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Ribeiro <leandro.ribeiro@collabora.com>2024-04-12 10:17:17 -0300
committerPekka Paalanen <pq@iki.fi>2024-04-26 14:15:28 +0000
commitc427ae5a49577cfee5557627db4c18b27aedfa8a (patch)
tree345a43f38acd0479a57c8a366207c2f367f205ad
parentc9e76869c4232ca9a6a55699d495fce21f2ad7dd (diff)
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>
-rw-r--r--clients/image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/image.c b/clients/image.c
index fa2fd16b..5f1d9c89 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -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;