mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
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:
parent
6ed2617394
commit
164b17c279
4 changed files with 9 additions and 20 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue