Fix shell_hook_paint_red_border
In overriding _paint we're already offset to our allocation coordinates, don't re-add them. https://bugzilla.gnome.org/show_bug.cgi?id=595514
This commit is contained in:
parent
19fa0b5d5b
commit
3ba6ff4ca9
@ -183,25 +183,20 @@ hook_paint_red_border (ClutterActor *actor,
|
|||||||
CoglColor color;
|
CoglColor color;
|
||||||
ClutterGeometry geom;
|
ClutterGeometry geom;
|
||||||
float width = 2;
|
float width = 2;
|
||||||
float x2;
|
|
||||||
float y2;
|
|
||||||
|
|
||||||
cogl_color_set_from_4ub (&color, 0xff, 0, 0, 0xc4);
|
cogl_color_set_from_4ub (&color, 0xff, 0, 0, 0xc4);
|
||||||
cogl_set_source_color (&color);
|
cogl_set_source_color (&color);
|
||||||
|
|
||||||
clutter_actor_get_allocation_geometry (actor, &geom);
|
clutter_actor_get_allocation_geometry (actor, &geom);
|
||||||
x2 = geom.x + geom.width;
|
|
||||||
y2 = geom.y + geom.height;
|
|
||||||
|
|
||||||
/** clockwise order **/
|
/** clockwise order **/
|
||||||
cogl_rectangle (geom.x, geom.y,
|
cogl_rectangle (0, 0, geom.width, width);
|
||||||
x2, geom.y + width);
|
cogl_rectangle (geom.width - width, width,
|
||||||
cogl_rectangle (x2 - width, geom.y + width,
|
geom.width, geom.height);
|
||||||
x2, y2);
|
cogl_rectangle (0, geom.height,
|
||||||
cogl_rectangle (x2 - width, y2,
|
geom.width - width, geom.height - width);
|
||||||
geom.x, y2 - width);
|
cogl_rectangle (0, geom.height - width,
|
||||||
cogl_rectangle (geom.x + width, y2 - width,
|
width, width);
|
||||||
geom.x, geom.y + width);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
guint
|
||||||
|
Loading…
Reference in New Issue
Block a user