Skip to content

Commit

Permalink
Fix test to fail without the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tsayao committed Dec 3, 2024
1 parent 3cb3342 commit cf9eb23
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,8 @@ void WindowContextTop::set_bounds(int x, int y, bool xSet, bool ySet, int w, int
geometry.final_width.type = BOUNDSTYPE_CONTENT;
geometry.final_width.value = cw;
newW = cw;
} else {
newW = geometry_get_content_width(&geometry);
}

if (h > 0) {
Expand All @@ -1112,8 +1114,11 @@ void WindowContextTop::set_bounds(int x, int y, bool xSet, bool ySet, int w, int
geometry.final_height.type = BOUNDSTYPE_CONTENT;
geometry.final_height.value = ch;
newH = ch;
} else {
newH = geometry_get_content_height(&geometry);
}


if (newW > 0 || newH > 0) {
// call update_window_constraints() to let gtk_window_resize succeed, because it's bound to geometry constraints
update_window_constraints();
Expand Down

0 comments on commit cf9eb23

Please sign in to comment.