From f72add79bdc4b72a54fb72e512d3a15263e7484c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 25 Apr 2014 00:04:06 -0400 Subject: start refactoring to draw parsed text to an intermediary data structure --- src/window-xlib.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/window-xlib.c') diff --git a/src/window-xlib.c b/src/window-xlib.c index 5cd2b04..fcb13ef 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -498,21 +498,22 @@ static void runes_window_backend_audible_bell(RunesTerm *t) static void runes_window_backend_draw_cursor(RunesTerm *t) { - if (!t->hide_cursor) { + if (!t->scr.hide_cursor) { cairo_save(t->backend_cr); cairo_set_source(t->backend_cr, t->cursorcolor); if (t->unfocused) { cairo_set_line_width(t->backend_cr, 1); cairo_rectangle( t->backend_cr, - t->col * t->fontx + 0.5, t->row * t->fonty + 0.5, + t->scr.cur.col * t->fontx + 0.5, + t->scr.cur.row * t->fonty + 0.5, t->fontx, t->fonty); cairo_stroke(t->backend_cr); } else { cairo_rectangle( t->backend_cr, - t->col * t->fontx, t->row * t->fonty, + t->scr.cur.col * t->fontx, t->scr.cur.row * t->fonty, t->fontx, t->fonty); cairo_fill(t->backend_cr); } @@ -620,8 +621,8 @@ static struct function_key *runes_window_backend_find_key_sequence( { struct function_key *key; - if (t->application_keypad) { - if (t->application_cursor) { + if (t->scr.application_keypad) { + if (t->scr.application_cursor) { key = &application_cursor_keys[0]; while (key->sym != XK_VoidSymbol) { if (key->sym == sym) { @@ -658,7 +659,7 @@ static void runes_window_backend_handle_button_event( } } - if (t->mouse_reporting_press_release) { + if (t->scr.mouse_reporting_press_release) { char response[7]; char status = 0; @@ -706,7 +707,7 @@ static void runes_window_backend_handle_button_event( ' ' + (e->y / t->fonty + 1)); runes_pty_backend_write(t, response, 6); } - else if (t->mouse_reporting_press && e->type == ButtonPress) { + else if (t->scr.mouse_reporting_press && e->type == ButtonPress) { char response[7]; sprintf( @@ -762,10 +763,10 @@ static void runes_window_backend_handle_focus_event( { runes_window_backend_clear_urgent(t); if (e->type == FocusIn) { - runes_display_focus_in(t); + t->unfocused = 0; } else { - runes_display_focus_out(t); + t->unfocused = 1; } runes_window_backend_flush(t); } -- cgit v1.2.3-54-g00ecf