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:
parent
c9e76869c4
commit
c427ae5a49
|
@ -121,7 +121,7 @@ redraw_handler(struct widget *widget, void *data)
|
||||||
|
|
||||||
surface = window_get_surface(image->window);
|
surface = window_get_surface(image->window);
|
||||||
cr = cairo_create(surface);
|
cr = cairo_create(surface);
|
||||||
widget_get_allocation(image->frame_widget, &allocation);
|
widget_get_allocation(widget, &allocation);
|
||||||
cairo_rectangle(cr, allocation.x, allocation.y,
|
cairo_rectangle(cr, allocation.x, allocation.y,
|
||||||
allocation.width, allocation.height);
|
allocation.width, allocation.height);
|
||||||
cairo_clip(cr);
|
cairo_clip(cr);
|
||||||
|
@ -193,7 +193,7 @@ enter_handler(struct widget *widget,
|
||||||
struct image *image = data;
|
struct image *image = data;
|
||||||
struct rectangle allocation;
|
struct rectangle allocation;
|
||||||
|
|
||||||
widget_get_allocation(image->frame_widget, &allocation);
|
widget_get_allocation(widget, &allocation);
|
||||||
x -= allocation.x;
|
x -= allocation.x;
|
||||||
y -= allocation.y;
|
y -= allocation.y;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ motion_handler(struct widget *widget,
|
||||||
struct image *image = data;
|
struct image *image = data;
|
||||||
struct rectangle allocation;
|
struct rectangle allocation;
|
||||||
|
|
||||||
widget_get_allocation(image->frame_widget, &allocation);
|
widget_get_allocation(widget, &allocation);
|
||||||
x -= allocation.x;
|
x -= allocation.x;
|
||||||
y -= allocation.y;
|
y -= allocation.y;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue