mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
gap resize
This commit is contained in:
parent
7169ebc24c
commit
f25c6b312b
5 changed files with 140 additions and 24 deletions
|
|
@ -653,15 +653,24 @@ void update_visibility(swayc_t *container) {
|
|||
}
|
||||
}
|
||||
|
||||
void reset_gaps(swayc_t *view, void *data) {
|
||||
(void) data;
|
||||
void set_gaps(swayc_t *view, void *_data) {
|
||||
int *data = _data;
|
||||
if (!ASSERT_NONNULL(view)) {
|
||||
return;
|
||||
}
|
||||
if (view->type == C_WORKSPACE) {
|
||||
view->gaps = -1;
|
||||
}
|
||||
if (view->type == C_VIEW) {
|
||||
view->gaps = -1;
|
||||
if (view->type == C_WORKSPACE || view->type == C_VIEW) {
|
||||
view->gaps = *data;
|
||||
}
|
||||
}
|
||||
|
||||
void add_gaps(swayc_t *view, void *_data) {
|
||||
int *data = _data;
|
||||
if (!ASSERT_NONNULL(view)) {
|
||||
return;
|
||||
}
|
||||
if (view->type == C_WORKSPACE || view->type == C_VIEW) {
|
||||
if ((view->gaps += *data) < 0) {
|
||||
view->gaps = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue