Fix a bug with partial-width panel struts caused by incorrect computation

2003-09-19  Rob Adams <readams@readams.net>

	Fix a bug with partial-width panel struts caused by incorrect
	computation of rectangle widths, and another when using different
	screen resolutions on xineramas.  See #122404.  Also fix a crash
	bug with the MRU list when sticking and unsticking windows.  See
	#120809.

	* src/constraints.c (get_outermost_onscreen_positions): Fix
	off-by-one error with partial-width struts.

	* src/window.c (meta_window_update_struts): Fix off-by-one error
	with partial-width struts.
	(meta_window_stick): assign back to GList after g_list_append
	(meta_window_unstick): assign back to GList after g_list_append

	* src/workspace.c (ensure_work_areas_validated): For right and
	bottom struts, compute strut relative to root window and not to
	xinerama edge in compliance with EWMH recommendations.
This commit is contained in:
Rob Adams
2003-09-20 04:58:25 +00:00
committed by Rob Adams
parent 1117d45f8a
commit de44b2d794
4 changed files with 44 additions and 17 deletions

View File

@@ -389,9 +389,9 @@ get_outermost_onscreen_positions (MetaWindow *window,
* overlapping the strut rect.
*/
if (((current.y - info->fgeom.top_height >= rect->y) &&
(current.y - info->fgeom.top_height <= rect->y + rect->height)) ||
(current.y - info->fgeom.top_height < rect->y + rect->height)) ||
((current.y >= rect->y) &&
(current.y <= rect->y + rect->height)))
(current.y < rect->y + rect->height)))
{
*leftmost_x_p = MAX (*leftmost_x_p, rect->width);
}
@@ -420,9 +420,9 @@ get_outermost_onscreen_positions (MetaWindow *window,
* overlapping the strut rect.
*/
if (((current.y - info->fgeom.top_height >= rect->y) &&
(current.y - info->fgeom.top_height <= rect->y + rect->height)) ||
(current.y - info->fgeom.top_height < rect->y + rect->height)) ||
((current.y >= rect->y) &&
(current.y <= rect->y + rect->height)))
(current.y < rect->y + rect->height)))
{
*rightmost_x_p = MIN (*rightmost_x_p, rect->x);
}
@@ -450,8 +450,8 @@ get_outermost_onscreen_positions (MetaWindow *window,
/* here the strut matters if the titlebar is overlapping
* the window horizontally
*/
if ((current.x <= rect->x + rect->width) &&
(current.x + current.width >= rect->x))
if ((current.x < rect->x + rect->width) &&
(current.x + current.width > rect->x))
{
*topmost_y_p = MAX (*topmost_y_p, rect->height);
}
@@ -479,8 +479,8 @@ get_outermost_onscreen_positions (MetaWindow *window,
/* here the strut matters if the titlebar is overlapping
* the window horizontally
*/
if ((current.x <= rect->x + rect->width) &&
(current.x + current.width >= rect->x))
if ((current.x < rect->x + rect->width) &&
(current.x + current.width > rect->x))
{
bottommost_y = MIN (bottommost_y, rect->y);
}