mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: don’t allow diagonal resize when tiled
This commit is contained in:
parent
ebd4a32768
commit
90544ef391
2 changed files with 13 additions and 8 deletions
|
|
@ -23,6 +23,7 @@
|
|||
file. Note that foot will run, but without support for dead keys.
|
||||
(https://codeberg.org/dnkl/foot/issues/170).
|
||||
* Restored window size when window is un-tiled.
|
||||
* XCursor shape in CSD corners when window is tiled.
|
||||
|
||||
|
||||
## 1.5.2
|
||||
|
|
|
|||
20
input.c
20
input.c
|
|
@ -1049,8 +1049,9 @@ is_top_left(const struct terminal *term, int x, int y)
|
|||
{
|
||||
int csd_border_size = term->conf->csd.border_width;
|
||||
return (
|
||||
(term->active_surface == TERM_SURF_BORDER_LEFT && y < 10 * term->scale) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_TOP && x < (10 + csd_border_size) * term->scale));
|
||||
(!term->window->is_tiled_top && !term->window->is_tiled_left) &&
|
||||
((term->active_surface == TERM_SURF_BORDER_LEFT && y < 10 * term->scale) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_TOP && x < (10 + csd_border_size) * term->scale)));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -1058,8 +1059,9 @@ is_top_right(const struct terminal *term, int x, int y)
|
|||
{
|
||||
int csd_border_size = term->conf->csd.border_width;
|
||||
return (
|
||||
(term->active_surface == TERM_SURF_BORDER_RIGHT && y < 10 * term->scale) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_TOP && x > term->width + 1 * csd_border_size * term->scale - 10 * term->scale));
|
||||
(!term->window->is_tiled_top && !term->window->is_tiled_right) &&
|
||||
((term->active_surface == TERM_SURF_BORDER_RIGHT && y < 10 * term->scale) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_TOP && x > term->width + 1 * csd_border_size * term->scale - 10 * term->scale)));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -1068,8 +1070,9 @@ is_bottom_left(const struct terminal *term, int x, int y)
|
|||
int csd_title_size = term->conf->csd.title_height;
|
||||
int csd_border_size = term->conf->csd.border_width;
|
||||
return (
|
||||
(term->active_surface == TERM_SURF_BORDER_LEFT && y > csd_title_size * term->scale + term->height) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_BOTTOM && x < (10 + csd_border_size) * term->scale));
|
||||
(!term->window->is_tiled_bottom && !term->window->is_tiled_left) &&
|
||||
((term->active_surface == TERM_SURF_BORDER_LEFT && y > csd_title_size * term->scale + term->height) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_BOTTOM && x < (10 + csd_border_size) * term->scale)));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -1078,8 +1081,9 @@ is_bottom_right(const struct terminal *term, int x, int y)
|
|||
int csd_title_size = term->conf->csd.title_height;
|
||||
int csd_border_size = term->conf->csd.border_width;
|
||||
return (
|
||||
(term->active_surface == TERM_SURF_BORDER_RIGHT && y > csd_title_size * term->scale + term->height) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_BOTTOM && x > term->width + 1 * csd_border_size * term->scale - 10 * term->scale));
|
||||
(!term->window->is_tiled_bottom && !term->window->is_tiled_right) &&
|
||||
((term->active_surface == TERM_SURF_BORDER_RIGHT && y > csd_title_size * term->scale + term->height) ||
|
||||
(term->active_surface == TERM_SURF_BORDER_BOTTOM && x > term->width + 1 * csd_border_size * term->scale - 10 * term->scale)));
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue