mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-16 08:21:20 -04:00
Crosshair coredump fix. Crosshair styles.
Fixed possibilities for coredumps when having a fixed cross hair and modifying the window size to the extend the crosshair would now be out of the window boundaries. Implemented a Crosshair style switch from Full Cross to Vertical Line to Horizontal Line.
This commit is contained in:
parent
c742f640af
commit
9a3ac3a406
8 changed files with 63 additions and 26 deletions
20
input.c
20
input.c
|
|
@ -202,6 +202,26 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
term->crosshair.use_mouse_pixel_coordinates = !term->crosshair.use_mouse_pixel_coordinates;
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_CROSSHAIR_STYLE:
|
||||
switch (term->crosshair.style) {
|
||||
case CROSSHAIR_FULL:
|
||||
term->crosshair.style = CROSSHAIR_VERTICAL;
|
||||
break;
|
||||
|
||||
case CROSSHAIR_VERTICAL:
|
||||
term->crosshair.style = CROSSHAIR_HORIZONTAL;
|
||||
break;
|
||||
|
||||
case CROSSHAIR_HORIZONTAL:
|
||||
term->crosshair.style = CROSSHAIR_FULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
BUG("Unhandled crosshair style");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
case BIND_ACTION_FONT_SIZE_UP:
|
||||
term_font_size_increase(term);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue