mirror of
https://github.com/brl/mutter.git
synced 2025-02-09 01:54:10 +00:00
[test-clip] Use gint for hand_{width,height} when calulating -hand_* /2
It was a fluke that this worked out due to how the incorrect integer result gets converted by CLUTTER_INT_TO_FIXED.
This commit is contained in:
parent
cc8cd8392f
commit
e4b1859077
@ -15,7 +15,7 @@ typedef enum
|
|||||||
struct _Clip
|
struct _Clip
|
||||||
{
|
{
|
||||||
ClipType type;
|
ClipType type;
|
||||||
gint x1, y1, x2, y2;
|
gint x1, y1, x2, y2;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CallbackData
|
struct _CallbackData
|
||||||
@ -24,7 +24,7 @@ struct _CallbackData
|
|||||||
CoglHandle hand;
|
CoglHandle hand;
|
||||||
|
|
||||||
Clip current_clip;
|
Clip current_clip;
|
||||||
|
|
||||||
GSList *clips;
|
GSList *clips;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ on_paint (ClutterActor *actor, CallbackData *data)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
ClutterGeometry stage_size;
|
ClutterGeometry stage_size;
|
||||||
guint hand_width, hand_height;
|
gint hand_width, hand_height;
|
||||||
GSList *node;
|
GSList *node;
|
||||||
|
|
||||||
clutter_actor_get_allocation_geometry (data->stage, &stage_size);
|
clutter_actor_get_allocation_geometry (data->stage, &stage_size);
|
||||||
@ -242,7 +242,7 @@ on_motion (ClutterActor *stage, ClutterMotionEvent *event,
|
|||||||
{
|
{
|
||||||
data->current_clip.x2 = event->x;
|
data->current_clip.x2 = event->x;
|
||||||
data->current_clip.y2 = event->y;
|
data->current_clip.y2 = event->y;
|
||||||
|
|
||||||
clutter_actor_queue_redraw (stage);
|
clutter_actor_queue_redraw (stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user