From 61bd79200cc3892b143b7321886db77e97c9f69f Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Tue, 16 Jan 2018 19:04:26 -0500 Subject: basic decorations --- rootston/cursor.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 5 deletions(-) (limited to 'rootston/cursor.c') diff --git a/rootston/cursor.c b/rootston/cursor.c index 8bd514cc..8a34cd13 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -30,19 +30,81 @@ void roots_cursor_destroy(struct roots_cursor *cursor) { // TODO } +static void seat_view_deco_motion(struct roots_seat_view *view, double deco_vx, double deco_vy) { + struct roots_cursor *cursor = view->seat->cursor; + + double vx = deco_vx; + double vy = deco_vy; + if (view->has_button_grab) { + vx = view->grab_vx; + vy = view->grab_vy; + } + + bool is_titlebar = vy < 0 && -vy < view->view->titlebar_height; + uint32_t edges = 0; + if (vx < 0) { + edges |= WLR_EDGE_LEFT; + } else if (vx > view->view->wlr_surface->current->width) { + edges |= WLR_EDGE_RIGHT; + } else if (vy > view->view->wlr_surface->current->height) { + edges |= WLR_EDGE_BOTTOM; + } else if (-vy > view->view->titlebar_height) { + edges |= WLR_EDGE_TOP; + } + + if (view->has_button_grab) { + if (is_titlebar) { + roots_seat_begin_move(view->seat, view->view); + } else if (edges) { + roots_seat_begin_resize(view->seat, view->view, edges); + } + view->has_button_grab = false; + } else { + if (is_titlebar) { + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); + } else if (edges) { + const char *resize_name = wlr_xcursor_get_resize_name(edges); + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + resize_name, cursor->cursor); + } + } +} + +static void seat_view_deco_leave(struct roots_seat_view *view) { + view->has_button_grab = false; +} + +static void seat_view_deco_button(struct roots_seat_view *view, double vx, + double vy, uint32_t button, uint32_t state) { + if (button == BTN_LEFT && state == WLR_BUTTON_PRESSED) { + view->has_button_grab = true; + view->grab_vx = vx; + view->grab_vy = vy; + } else { + view->has_button_grab = false; + } +} + static void roots_cursor_update_position(struct roots_cursor *cursor, uint32_t time) { struct roots_desktop *desktop = cursor->seat->input->server->desktop; struct roots_seat *seat = cursor->seat; struct roots_view *view; - struct wlr_surface *surface; + struct wlr_surface *surface = NULL; double sx, sy; switch (cursor->mode) { case ROOTS_CURSOR_PASSTHROUGH: view = desktop_view_at(desktop, cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); + struct roots_seat_view *seat_view = + roots_seat_view_from_view(seat, view); + if (cursor->pointer_view && (surface || seat_view != cursor->pointer_view)) { + seat_view_deco_leave(cursor->pointer_view); + cursor->pointer_view = NULL; + } bool set_compositor_cursor = !view && cursor->cursor_client; - if (view) { + if (view && surface) { struct wl_client *view_client = wl_resource_get_client(view->wlr_surface->resource); set_compositor_cursor = view_client != cursor->cursor_client; @@ -52,7 +114,15 @@ static void roots_cursor_update_position(struct roots_cursor *cursor, cursor->default_xcursor, cursor->cursor); cursor->cursor_client = NULL; } - if (view) { + if (view && !surface) { + if (seat_view) { + cursor->pointer_view = seat_view; + seat_view_deco_motion(seat_view, + cursor->cursor->x - seat_view->view->x, + cursor->cursor->y - seat_view->view->y); + } + } if (view && surface) { + // motion over a view surface wlr_seat_pointer_notify_enter(seat->seat, surface, sx, sy); wlr_seat_pointer_notify_motion(seat->seat, time, sx, sy); } else { @@ -166,16 +236,30 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, } return; } + + if (view && !surface) { + if (cursor->pointer_view) { + seat_view_deco_button(cursor->pointer_view, + cursor->cursor->x - cursor->pointer_view->view->x, + cursor->cursor->y - cursor->pointer_view->view->y, + button, state); + } + } + if (state == WLR_BUTTON_RELEASED && cursor->mode != ROOTS_CURSOR_PASSTHROUGH) { cursor->mode = ROOTS_CURSOR_PASSTHROUGH; + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); if (seat->seat->pointer_state.button_count == 0) { return; } } - if (!is_touch) { - wlr_seat_pointer_notify_button(seat->seat, time, button, state); + if (view && surface) { + if (!is_touch) { + wlr_seat_pointer_notify_button(seat->seat, time, button, state); + } } switch (state) { -- cgit v1.2.3 From 41832714758c003c557da30193c6b02a2afe54b2 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:24:53 -0500 Subject: make it work with rotation --- include/rootston/seat.h | 4 ++-- include/rootston/view.h | 14 ++++++++++++- rootston/cursor.c | 39 +++++++++++++++++-------------------- rootston/desktop.c | 52 +++++++++++++++++++++++++++++++++++++++++-------- rootston/output.c | 10 ++++++++-- 5 files changed, 85 insertions(+), 34 deletions(-) (limited to 'rootston/cursor.c') diff --git a/include/rootston/seat.h b/include/rootston/seat.h index 6ae7c3fa..966d98e5 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -30,8 +30,8 @@ struct roots_seat_view { struct roots_view *view; bool has_button_grab; - double grab_vx; - double grab_vy; + double grab_sx; + double grab_sy; struct wl_list link; // roots_seat::views diff --git a/include/rootston/view.h b/include/rootston/view.h index 68ccbef8..77b78852 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -120,7 +120,6 @@ struct roots_view { }; void view_get_box(const struct roots_view *view, struct wlr_box *box); -void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); void view_activate(struct roots_view *view, bool active); void view_move(struct roots_view *view, double x, double y); void view_resize(struct roots_view *view, uint32_t width, uint32_t height); @@ -134,4 +133,17 @@ bool view_center(struct roots_view *view); void view_setup(struct roots_view *view); void view_teardown(struct roots_view *view); +void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); + +enum wlr_deco_part { + WLR_DECO_PART_NONE = 0, + WLR_DECO_PART_TOP_BORDER = (1 << 0), + WLR_DECO_PART_BOTTOM_BORDER = (1 << 1), + WLR_DECO_PART_LEFT_BORDER = (1 << 2), + WLR_DECO_PART_RIGHT_BORDER = (1 << 3), + WLR_DECO_PART_TITLEBAR = (1 << 4), +}; + +enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); + #endif diff --git a/rootston/cursor.c b/rootston/cursor.c index 8a34cd13..87f568a8 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -30,25 +30,27 @@ void roots_cursor_destroy(struct roots_cursor *cursor) { // TODO } -static void seat_view_deco_motion(struct roots_seat_view *view, double deco_vx, double deco_vy) { +static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, double deco_sy) { struct roots_cursor *cursor = view->seat->cursor; - double vx = deco_vx; - double vy = deco_vy; + double sx = deco_sx; + double sy = deco_sy; if (view->has_button_grab) { - vx = view->grab_vx; - vy = view->grab_vy; + sx = view->grab_sx; + sy = view->grab_sy; } - bool is_titlebar = vy < 0 && -vy < view->view->titlebar_height; + enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); + + bool is_titlebar = (parts & WLR_DECO_PART_TITLEBAR); uint32_t edges = 0; - if (vx < 0) { + if (parts & WLR_DECO_PART_LEFT_BORDER) { edges |= WLR_EDGE_LEFT; - } else if (vx > view->view->wlr_surface->current->width) { + } else if (parts & WLR_DECO_PART_RIGHT_BORDER) { edges |= WLR_EDGE_RIGHT; - } else if (vy > view->view->wlr_surface->current->height) { + } else if (parts & WLR_DECO_PART_BOTTOM_BORDER) { edges |= WLR_EDGE_BOTTOM; - } else if (-vy > view->view->titlebar_height) { + } else if (parts & WLR_DECO_PART_TOP_BORDER) { edges |= WLR_EDGE_TOP; } @@ -75,12 +77,12 @@ static void seat_view_deco_leave(struct roots_seat_view *view) { view->has_button_grab = false; } -static void seat_view_deco_button(struct roots_seat_view *view, double vx, - double vy, uint32_t button, uint32_t state) { +static void seat_view_deco_button(struct roots_seat_view *view, double sx, + double sy, uint32_t button, uint32_t state) { if (button == BTN_LEFT && state == WLR_BUTTON_PRESSED) { view->has_button_grab = true; - view->grab_vx = vx; - view->grab_vy = vy; + view->grab_sx = sx; + view->grab_sy = sy; } else { view->has_button_grab = false; } @@ -117,9 +119,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor, if (view && !surface) { if (seat_view) { cursor->pointer_view = seat_view; - seat_view_deco_motion(seat_view, - cursor->cursor->x - seat_view->view->x, - cursor->cursor->y - seat_view->view->y); + seat_view_deco_motion(seat_view, sx, sy); } } if (view && surface) { // motion over a view surface @@ -239,10 +239,7 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, if (view && !surface) { if (cursor->pointer_view) { - seat_view_deco_button(cursor->pointer_view, - cursor->cursor->x - cursor->pointer_view->view->x, - cursor->cursor->y - cursor->pointer_view->view->y, - button, state); + seat_view_deco_button(cursor->pointer_view, sx, sy, button, state); } } diff --git a/rootston/desktop.c b/rootston/desktop.c index 1ec1d552..2632eebd 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -19,6 +19,7 @@ #include "rootston/server.h" #include "rootston/seat.h" #include "rootston/xcursor.h" +#include "rootston/view.h" void view_get_box(const struct roots_view *view, struct wlr_box *box) { box->x = view->x; @@ -43,6 +44,43 @@ void view_get_deco_box(const struct roots_view *view, struct wlr_box *box) { box->height += (view->border_width * 2 + view->titlebar_height); } +enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy) { + if (!view->decorated) { + return WLR_DECO_PART_NONE; + } + + int sw = view->wlr_surface->current->width; + int sh = view->wlr_surface->current->height; + int bw = view->border_width; + int titlebar_h = view->titlebar_height; + + if (sx > 0 && sx < sw && sy < 0 && sy > -view->titlebar_height) { + return WLR_DECO_PART_TITLEBAR; + } + + enum wlr_deco_part parts = 0; + if (sy >= -(titlebar_h + bw) && + sy <= sh + bw) { + if (sx < 0 && sx > -bw) { + parts |= WLR_DECO_PART_LEFT_BORDER; + } else if (sx > sw && sx < sw + bw) { + parts |= WLR_DECO_PART_RIGHT_BORDER; + } + } + + if (sx >= -bw && sx <= sw + bw) { + if (sy > sh && sy <= sh + bw) { + parts |= WLR_DECO_PART_BOTTOM_BORDER; + } else if (sy >= -(titlebar_h + bw) && sy < 0) { + parts |= WLR_DECO_PART_TOP_BORDER; + } + } + + // TODO corners + + return parts; +} + static void view_update_output(const struct roots_view *view, const struct wlr_box *before) { struct roots_desktop *desktop = view->desktop; @@ -359,6 +397,12 @@ static bool view_at(struct roots_view *view, double lx, double ly, return true; } + if (view_get_deco_part(view, view_sx, view_sy)) { + *sx = view_sx; + *sy = view_sy; + return view; + } + if (wlr_box_contains_point(&box, view_sx, view_sy) && pixman_region32_contains_point(&view->wlr_surface->current->input, view_sx, view_sy, NULL)) { @@ -392,14 +436,6 @@ struct roots_view *desktop_view_at(struct roots_desktop *desktop, double lx, if (view_at(view, lx, ly, surface, sx, sy)) { return view; } - - if (view->decorated) { - struct wlr_box deco_box; - view_get_deco_box(view, &deco_box); - if (wlr_box_contains_point(&deco_box, lx, ly)) { - return view; - } - } } return NULL; } diff --git a/rootston/output.c b/rootston/output.c index 3680beac..0e568a14 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -158,8 +158,14 @@ static void render_decorations(struct roots_view *view, } struct wlr_box deco_box; view_get_deco_box(view, &deco_box); - double ox = deco_box.x; - double oy = deco_box.y; + double sx = deco_box.x - view->x; + double sy = deco_box.y - view->y; + rotate_child_position(&sx, &sy, deco_box.width, deco_box.height, + view->wlr_surface->current->width, + view->wlr_surface->current->height, view->rotation); + double ox = sx + view->x; + double oy = sy + view->y; + wlr_output_layout_output_coords(desktop->layout, output, &ox, &oy); ox *= output->scale; oy *= output->scale; -- cgit v1.2.3 From 54776dd19c20b0d0775a9426e811f81004a9a960 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:32:06 -0500 Subject: fix cursor issue --- rootston/cursor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'rootston/cursor.c') diff --git a/rootston/cursor.c b/rootston/cursor.c index 87f568a8..8f6091ee 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -74,6 +74,9 @@ static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, } static void seat_view_deco_leave(struct roots_seat_view *view) { + struct roots_cursor *cursor = view->seat->cursor; + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); view->has_button_grab = false; } @@ -86,6 +89,13 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx, } else { view->has_button_grab = false; } + + enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); + if (state == WLR_BUTTON_RELEASED && (parts & WLR_DECO_PART_TITLEBAR)) { + struct roots_cursor *cursor = view->seat->cursor; + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); + } } static void roots_cursor_update_position(struct roots_cursor *cursor, @@ -246,8 +256,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, if (state == WLR_BUTTON_RELEASED && cursor->mode != ROOTS_CURSOR_PASSTHROUGH) { cursor->mode = ROOTS_CURSOR_PASSTHROUGH; - wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, - cursor->default_xcursor, cursor->cursor); if (seat->seat->pointer_state.button_count == 0) { return; } -- cgit v1.2.3 From e8c407d00e9acaff27973af8df4eaf19b6571d88 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:46:19 -0500 Subject: rename wlr_deco_part to roots_deco_part --- include/rootston/view.h | 16 ++++++++-------- rootston/cursor.c | 16 ++++++++-------- rootston/desktop.c | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'rootston/cursor.c') diff --git a/include/rootston/view.h b/include/rootston/view.h index 77b78852..108a8267 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -135,15 +135,15 @@ void view_teardown(struct roots_view *view); void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); -enum wlr_deco_part { - WLR_DECO_PART_NONE = 0, - WLR_DECO_PART_TOP_BORDER = (1 << 0), - WLR_DECO_PART_BOTTOM_BORDER = (1 << 1), - WLR_DECO_PART_LEFT_BORDER = (1 << 2), - WLR_DECO_PART_RIGHT_BORDER = (1 << 3), - WLR_DECO_PART_TITLEBAR = (1 << 4), +enum roots_deco_part { + ROOTS_DECO_PART_NONE = 0, + ROOTS_DECO_PART_TOP_BORDER = (1 << 0), + ROOTS_DECO_PART_BOTTOM_BORDER = (1 << 1), + ROOTS_DECO_PART_LEFT_BORDER = (1 << 2), + ROOTS_DECO_PART_RIGHT_BORDER = (1 << 3), + ROOTS_DECO_PART_TITLEBAR = (1 << 4), }; -enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); +enum roots_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); #endif diff --git a/rootston/cursor.c b/rootston/cursor.c index 8f6091ee..5430afe5 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -40,17 +40,17 @@ static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, sy = view->grab_sy; } - enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); + enum roots_deco_part parts = view_get_deco_part(view->view, sx, sy); - bool is_titlebar = (parts & WLR_DECO_PART_TITLEBAR); + bool is_titlebar = (parts & ROOTS_DECO_PART_TITLEBAR); uint32_t edges = 0; - if (parts & WLR_DECO_PART_LEFT_BORDER) { + if (parts & ROOTS_DECO_PART_LEFT_BORDER) { edges |= WLR_EDGE_LEFT; - } else if (parts & WLR_DECO_PART_RIGHT_BORDER) { + } else if (parts & ROOTS_DECO_PART_RIGHT_BORDER) { edges |= WLR_EDGE_RIGHT; - } else if (parts & WLR_DECO_PART_BOTTOM_BORDER) { + } else if (parts & ROOTS_DECO_PART_BOTTOM_BORDER) { edges |= WLR_EDGE_BOTTOM; - } else if (parts & WLR_DECO_PART_TOP_BORDER) { + } else if (parts & ROOTS_DECO_PART_TOP_BORDER) { edges |= WLR_EDGE_TOP; } @@ -90,8 +90,8 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx, view->has_button_grab = false; } - enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); - if (state == WLR_BUTTON_RELEASED && (parts & WLR_DECO_PART_TITLEBAR)) { + enum roots_deco_part parts = view_get_deco_part(view->view, sx, sy); + if (state == WLR_BUTTON_RELEASED && (parts & ROOTS_DECO_PART_TITLEBAR)) { struct roots_cursor *cursor = view->seat->cursor; wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, cursor->default_xcursor, cursor->cursor); diff --git a/rootston/desktop.c b/rootston/desktop.c index 2632eebd..5fa27db2 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -44,9 +44,9 @@ void view_get_deco_box(const struct roots_view *view, struct wlr_box *box) { box->height += (view->border_width * 2 + view->titlebar_height); } -enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy) { +enum roots_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy) { if (!view->decorated) { - return WLR_DECO_PART_NONE; + return ROOTS_DECO_PART_NONE; } int sw = view->wlr_surface->current->width; @@ -55,24 +55,24 @@ enum wlr_deco_part view_get_deco_part(struct roots_view *view, double sx, double int titlebar_h = view->titlebar_height; if (sx > 0 && sx < sw && sy < 0 && sy > -view->titlebar_height) { - return WLR_DECO_PART_TITLEBAR; + return ROOTS_DECO_PART_TITLEBAR; } - enum wlr_deco_part parts = 0; + enum roots_deco_part parts = 0; if (sy >= -(titlebar_h + bw) && sy <= sh + bw) { if (sx < 0 && sx > -bw) { - parts |= WLR_DECO_PART_LEFT_BORDER; + parts |= ROOTS_DECO_PART_LEFT_BORDER; } else if (sx > sw && sx < sw + bw) { - parts |= WLR_DECO_PART_RIGHT_BORDER; + parts |= ROOTS_DECO_PART_RIGHT_BORDER; } } if (sx >= -bw && sx <= sw + bw) { if (sy > sh && sy <= sh + bw) { - parts |= WLR_DECO_PART_BOTTOM_BORDER; + parts |= ROOTS_DECO_PART_BOTTOM_BORDER; } else if (sy >= -(titlebar_h + bw) && sy < 0) { - parts |= WLR_DECO_PART_TOP_BORDER; + parts |= ROOTS_DECO_PART_TOP_BORDER; } } -- cgit v1.2.3 From fc627afd1842a8288cec620daa729c170be2af17 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Tue, 23 Jan 2018 07:11:54 -0500 Subject: fix decorations on wayland backend --- rootston/cursor.c | 4 ++-- rootston/desktop.c | 3 ++- rootston/seat.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'rootston/cursor.c') diff --git a/rootston/cursor.c b/rootston/cursor.c index 5430afe5..d8753f44 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -115,7 +115,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor, seat_view_deco_leave(cursor->pointer_view); cursor->pointer_view = NULL; } - bool set_compositor_cursor = !view && cursor->cursor_client; + bool set_compositor_cursor = !view && !surface && cursor->cursor_client; if (view && surface) { struct wl_client *view_client = wl_resource_get_client(view->wlr_surface->resource); @@ -211,7 +211,7 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, struct roots_desktop *desktop = seat->input->server->desktop; bool is_touch = device->type == WLR_INPUT_DEVICE_TOUCH; - struct wlr_surface *surface; + struct wlr_surface *surface = NULL; double sx, sy; struct roots_view *view = desktop_view_at(desktop, lx, ly, &surface, &sx, &sy); diff --git a/rootston/desktop.c b/rootston/desktop.c index 5fa27db2..70dafec4 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -400,7 +400,8 @@ static bool view_at(struct roots_view *view, double lx, double ly, if (view_get_deco_part(view, view_sx, view_sy)) { *sx = view_sx; *sy = view_sy; - return view; + *surface = NULL; + return true; } if (wlr_box_contains_point(&box, view_sx, view_sy) && diff --git a/rootston/seat.c b/rootston/seat.c index 41ae6c9f..e6e505b5 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -573,6 +573,10 @@ static void seat_view_destroy(struct roots_seat_view *seat_view) { seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH; } + if (seat_view == seat->cursor->pointer_view) { + seat->cursor->pointer_view = NULL; + } + wl_list_remove(&seat_view->view_destroy.link); wl_list_remove(&seat_view->link); free(seat_view); -- cgit v1.2.3