Check that window min and max size hints are at least 1. Fix for #107110.

2003-03-08  Rob Adams <robadams@ucla.edu>

	* src/window-props.c (reload_normal_hints):  Check that window min
	and max size hints are at least 1.  Fix for #107110.
This commit is contained in:
Rob Adams 2003-03-08 18:15:22 +00:00 committed by Rob Adams
parent c595a7ac0f
commit 4481be72d1
2 changed files with 38 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-03-08 Rob Adams <robadams@ucla.edu>
* src/window-props.c (reload_normal_hints): Check that window min
and max size hints are at least 1. Fix for #107110.
2003-02-27 Havoc Pennington <hp@pobox.com>
Changes made on plane from FOSDEM, syncing from laptop.

View File

@ -620,6 +620,39 @@ reload_normal_hints (MetaWindow *window,
window->size_hints.min_height);
window->size_hints.max_height = window->size_hints.min_height;
}
if (window->size_hints.min_width < 1)
{
/* another cracksmoker */
meta_topic (META_DEBUG_GEOMETRY,
"Window %s sets min width to 0, which makes no sense\n",
window->desc);
window->size_hints.min_width = 1;
}
if (window->size_hints.max_width < 1)
{
/* another cracksmoker */
meta_topic (META_DEBUG_GEOMETRY,
"Window %s sets max width to 0, which makes no sense\n",
window->desc);
window->size_hints.max_width = 1;
}
if (window->size_hints.min_height < 1)
{
/* another cracksmoker */
meta_topic (META_DEBUG_GEOMETRY,
"Window %s sets min height to 0, which makes no sense\n",
window->desc);
window->size_hints.min_height = 1;
}
if (window->size_hints.max_height < 1)
{
/* another cracksmoker */
meta_topic (META_DEBUG_GEOMETRY,
"Window %s sets max height to 0, which makes no sense\n",
window->desc);
window->size_hints.max_height = 1;
}
if (window->size_hints.flags & PResizeInc)
{