Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree/container: ensure pixman rect is valid in container_arrange_title_bar() #8112

Merged
merged 1 commit into from May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions sway/tree/container.c
Expand Up @@ -352,6 +352,8 @@ void container_arrange_title_bar(struct sway_container *con) {

int alloc_width = MIN((int)node->width,
width - h_padding - config->titlebar_h_padding);
alloc_width = MAX(alloc_width, 0);

sway_text_node_set_max_width(node, alloc_width);
wlr_scene_node_set_position(node->node,
h_padding, (height - node->height) >> 1);
Expand All @@ -376,6 +378,8 @@ void container_arrange_title_bar(struct sway_container *con) {

int alloc_width = MIN((int) node->width,
width - h_padding - config->titlebar_h_padding);
alloc_width = MAX(alloc_width, 0);

sway_text_node_set_max_width(node, alloc_width);
wlr_scene_node_set_position(node->node,
h_padding, (height - node->height) >> 1);
Expand Down