summaryrefslogtreecommitdiff
path: root/clients/editor.c
diff options
context:
space:
mode:
authorPeter Maatman <blackwolf12333@gmail.com>2013-07-06 20:55:54 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-07-09 19:43:53 -0400
commitb9a23f4fb867a1a50ff4f9c36f650ec3b0b0b2d8 (patch)
tree7277ba4a78030d81ef290afbad53379e97f0b6e5 /clients/editor.c
parent08c38d4bc5ef54b4cc67b3ab6dff6878293085ff (diff)
downloadweston-b9a23f4fb867a1a50ff4f9c36f650ec3b0b0b2d8.tar.gz
clients/editor.c: Draw cursor at correct verical position
With this patch, the editor cursor now moves up and down correctly instead of having the top part stuck on the first line.
Diffstat (limited to 'clients/editor.c')
-rw-r--r--clients/editor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/editor.c b/clients/editor.c
index 5e8ae8ec..7e694036 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -946,8 +946,8 @@ text_entry_draw_cursor(struct text_entry *entry, cairo_t *cr)
&cursor_pos, NULL);
cairo_set_line_width(cr, 1.0);
- cairo_move_to(cr, PANGO_PIXELS(cursor_pos.x), PANGO_PIXELS(extents.height) + 2);
- cairo_line_to(cr, PANGO_PIXELS(cursor_pos.x), - 2);
+ cairo_move_to(cr, PANGO_PIXELS(cursor_pos.x), PANGO_PIXELS(cursor_pos.y));
+ cairo_line_to(cr, PANGO_PIXELS(cursor_pos.x), PANGO_PIXELS(cursor_pos.y) + PANGO_PIXELS(cursor_pos.height));
cairo_stroke(cr);
}