view: use fixed default window width

Now it's not very reasonable to determine the default window width based
on the titlebar geometry, as the titlebar can be shrunk to 1px.

Let's use the fixed value of 100px for simplification.
This commit is contained in:
tokyo4j 2025-09-01 17:29:24 +09:00 committed by Johan Malm
parent 6ed2617394
commit 164b17c279
4 changed files with 9 additions and 20 deletions

View file

@ -748,15 +748,13 @@ handle_map_request(struct wl_listener *listener, void *data)
static void
check_natural_geometry(struct view *view)
{
int min_width = view_get_min_width();
/*
* Some applications (example: Thonny) don't set a reasonable
* un-maximized size when started maximized. Try to detect this
* and set a fallback size.
*/
if (!view_is_floating(view)
&& (view->natural_geometry.width < min_width
&& (view->natural_geometry.width < LAB_MIN_VIEW_WIDTH
|| view->natural_geometry.height < LAB_MIN_VIEW_HEIGHT)) {
view_set_fallback_natural_geometry(view);
}