mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 07:26:51 -05:00
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:
parent
1117d45f8a
commit
de44b2d794
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
2003-09-17 Fatih Demir <kabalak@gtranslator.org>
|
2003-09-17 Fatih Demir <kabalak@gtranslator.org>
|
||||||
|
|
||||||
* configure.in: Added "ta" (Tamil) to the languages' list.
|
* configure.in: Added "ta" (Tamil) to the languages' list.
|
||||||
|
@ -389,9 +389,9 @@ get_outermost_onscreen_positions (MetaWindow *window,
|
|||||||
* overlapping the strut rect.
|
* overlapping the strut rect.
|
||||||
*/
|
*/
|
||||||
if (((current.y - info->fgeom.top_height >= rect->y) &&
|
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) &&
|
||||||
(current.y <= rect->y + rect->height)))
|
(current.y < rect->y + rect->height)))
|
||||||
{
|
{
|
||||||
*leftmost_x_p = MAX (*leftmost_x_p, rect->width);
|
*leftmost_x_p = MAX (*leftmost_x_p, rect->width);
|
||||||
}
|
}
|
||||||
@ -420,9 +420,9 @@ get_outermost_onscreen_positions (MetaWindow *window,
|
|||||||
* overlapping the strut rect.
|
* overlapping the strut rect.
|
||||||
*/
|
*/
|
||||||
if (((current.y - info->fgeom.top_height >= rect->y) &&
|
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) &&
|
||||||
(current.y <= rect->y + rect->height)))
|
(current.y < rect->y + rect->height)))
|
||||||
{
|
{
|
||||||
*rightmost_x_p = MIN (*rightmost_x_p, rect->x);
|
*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
|
/* here the strut matters if the titlebar is overlapping
|
||||||
* the window horizontally
|
* the window horizontally
|
||||||
*/
|
*/
|
||||||
if ((current.x <= rect->x + rect->width) &&
|
if ((current.x < rect->x + rect->width) &&
|
||||||
(current.x + current.width >= rect->x))
|
(current.x + current.width > rect->x))
|
||||||
{
|
{
|
||||||
*topmost_y_p = MAX (*topmost_y_p, rect->height);
|
*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
|
/* here the strut matters if the titlebar is overlapping
|
||||||
* the window horizontally
|
* the window horizontally
|
||||||
*/
|
*/
|
||||||
if ((current.x <= rect->x + rect->width) &&
|
if ((current.x < rect->x + rect->width) &&
|
||||||
(current.x + current.width >= rect->x))
|
(current.x + current.width > rect->x))
|
||||||
{
|
{
|
||||||
bottommost_y = MIN (bottommost_y, rect->y);
|
bottommost_y = MIN (bottommost_y, rect->y);
|
||||||
}
|
}
|
||||||
|
12
src/window.c
12
src/window.c
@ -3209,7 +3209,7 @@ meta_window_stick (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
workspace = (MetaWorkspace *) tmp->data;
|
workspace = (MetaWorkspace *) tmp->data;
|
||||||
if (!g_list_find (workspace->mru_list, window))
|
if (!g_list_find (workspace->mru_list, window))
|
||||||
g_list_append (workspace->mru_list, window);
|
workspace->mru_list = g_list_append (workspace->mru_list, window);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
@ -3238,7 +3238,7 @@ meta_window_unstick (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
workspace = (MetaWorkspace *) tmp->data;
|
workspace = (MetaWorkspace *) tmp->data;
|
||||||
if (!meta_workspace_contains_window (workspace, window))
|
if (!meta_workspace_contains_window (workspace, window))
|
||||||
g_list_remove (workspace->mru_list, window);
|
workspace->mru_list = g_list_remove (workspace->mru_list, window);
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4949,13 +4949,13 @@ meta_window_update_struts (MetaWindow *window)
|
|||||||
new_bottom.y = window->screen->height -
|
new_bottom.y = window->screen->height -
|
||||||
new_bottom.height;
|
new_bottom.height;
|
||||||
new_left.y = struts[4];
|
new_left.y = struts[4];
|
||||||
new_left.height = struts[5] - new_left.y;
|
new_left.height = struts[5] - new_left.y + 1;
|
||||||
new_right.y = struts[6];
|
new_right.y = struts[6];
|
||||||
new_right.height = struts[7] - new_right.y;
|
new_right.height = struts[7] - new_right.y + 1;
|
||||||
new_top.x = struts[8];
|
new_top.x = struts[8];
|
||||||
new_top.width = struts[9] - new_top.x;
|
new_top.width = struts[9] - new_top.x + 1;
|
||||||
new_bottom.x = struts[10];
|
new_bottom.x = struts[10];
|
||||||
new_bottom.width = struts[11] - new_bottom.x;
|
new_bottom.width = struts[11] - new_bottom.x + 1;
|
||||||
|
|
||||||
meta_verbose ("_NET_WM_STRUT_PARTIAL struts %d %d %d %d for window %s\n",
|
meta_verbose ("_NET_WM_STRUT_PARTIAL struts %d %d %d %d for window %s\n",
|
||||||
new_left.width,
|
new_left.width,
|
||||||
|
@ -453,14 +453,17 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
|||||||
if ((i == 0) && (w->struts->right.width > 0))
|
if ((i == 0) && (w->struts->right.width > 0))
|
||||||
{
|
{
|
||||||
workspace->right_struts = g_slist_prepend (workspace->right_struts,
|
workspace->right_struts = g_slist_prepend (workspace->right_struts,
|
||||||
&w->struts->right);
|
&w->struts->right);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meta_screen_rect_intersects_xinerama (w->screen,
|
if (meta_screen_rect_intersects_xinerama (w->screen,
|
||||||
&w->struts->right,
|
&w->struts->right,
|
||||||
i))
|
i))
|
||||||
{
|
{
|
||||||
right_strut = MAX (right_strut, w->struts->right.width);
|
right_strut = MAX (right_strut, w->struts->right.width -
|
||||||
|
workspace->screen->width +
|
||||||
|
workspace->screen->xinerama_infos[i].width +
|
||||||
|
workspace->screen->xinerama_infos[i].x_origin);
|
||||||
all_right_strut = MAX (all_right_strut, w->struts->right.width);
|
all_right_strut = MAX (all_right_strut, w->struts->right.width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +493,10 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
|||||||
&w->struts->bottom,
|
&w->struts->bottom,
|
||||||
i))
|
i))
|
||||||
{
|
{
|
||||||
bottom_strut = MAX (bottom_strut, w->struts->bottom.height);
|
bottom_strut = MAX (bottom_strut, w->struts->bottom.height -
|
||||||
|
workspace->screen->height +
|
||||||
|
workspace->screen->xinerama_infos[i].height +
|
||||||
|
workspace->screen->xinerama_infos[i].y_origin);
|
||||||
all_bottom_strut = MAX (all_bottom_strut, w->struts->bottom.height);
|
all_bottom_strut = MAX (all_bottom_strut, w->struts->bottom.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user