Merge pull request #2383 from RedSoxFan/fix-title-scale
Fix title textures on scale change
This commit is contained in:
commit
5f8676f214
|
@ -270,6 +270,8 @@ int container_count_descendants_of_type(struct sway_container *con,
|
||||||
|
|
||||||
void container_create_notify(struct sway_container *container);
|
void container_create_notify(struct sway_container *container);
|
||||||
|
|
||||||
|
void container_update_textures_recursive(struct sway_container *con);
|
||||||
|
|
||||||
void container_damage_whole(struct sway_container *container);
|
void container_damage_whole(struct sway_container *container);
|
||||||
|
|
||||||
bool container_reap_empty(struct sway_container *con);
|
bool container_reap_empty(struct sway_container *con);
|
||||||
|
|
|
@ -506,14 +506,10 @@ static void handle_transform(struct wl_listener *listener, void *data) {
|
||||||
transaction_commit_dirty();
|
transaction_commit_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_scale_iterator(struct sway_container *view, void *data) {
|
|
||||||
view_update_marks_textures(view->sway_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handle_scale(struct wl_listener *listener, void *data) {
|
static void handle_scale(struct wl_listener *listener, void *data) {
|
||||||
struct sway_output *output = wl_container_of(listener, output, scale);
|
struct sway_output *output = wl_container_of(listener, output, scale);
|
||||||
arrange_layers(output);
|
arrange_layers(output);
|
||||||
container_descendants(output->swayc, C_VIEW, handle_scale_iterator, NULL);
|
container_update_textures_recursive(output->swayc);
|
||||||
arrange_windows(output->swayc);
|
arrange_windows(output->swayc);
|
||||||
transaction_commit_dirty();
|
transaction_commit_dirty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ void container_create_notify(struct sway_container *container) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void container_update_textures_recursive(struct sway_container *con) {
|
void container_update_textures_recursive(struct sway_container *con) {
|
||||||
if (con->type == C_CONTAINER || con->type == C_VIEW) {
|
if (con->type == C_CONTAINER || con->type == C_VIEW) {
|
||||||
container_update_title_textures(con);
|
container_update_title_textures(con);
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,10 @@ static void container_update_textures_recursive(struct sway_container *con) {
|
||||||
struct sway_container *child = con->children->items[i];
|
struct sway_container *child = con->children->items[i];
|
||||||
container_update_textures_recursive(child);
|
container_update_textures_recursive(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (con->type == C_WORKSPACE) {
|
||||||
|
container_update_textures_recursive(con->sway_workspace->floating);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue