Commit 9ddeb292 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

do not choose height over width for the "should I change orientation"

2007-06-19  Vincent Untz  <vuntz@gnome.org>

	* panel-toplevel.c: (panel_toplevel_calc_new_orientation): do not
	choose height over width for the "should I change orientation"
	distance because the orientation is horizontal: since the geometry of
	the panel might not have been updated, those may be swapped (eg, if
	you had an horizontal panel and it becomes vertical, they're swapped
	for some time). Instead, choose the lowest of the two which is correct
	all cases, even when the height is bigger than the width in an
	horizontal panel (think about it for a few minutes).
	Fix the "panel goes a bit crazy when moving it around", also known as
	bug #394670.

svn path=/trunk/; revision=10472
parent b03ce42e
2007-06-19 Vincent Untz <vuntz@gnome.org>
* panel-toplevel.c: (panel_toplevel_calc_new_orientation): do not
choose height over width for the "should I change orientation"
distance because the orientation is horizontal: since the geometry of
the panel might not have been updated, those may be swapped (eg, if
you had an horizontal panel and it becomes vertical, they're swapped
for some time). Instead, choose the lowest of the two which is correct
all cases, even when the height is bigger than the width in an
horizontal panel (think about it for a few minutes).
Fix the "panel goes a bit crazy when moving it around", also known as
bug #394670.
==================== 2.19.4 ====================
 
2007-06-15 Vincent Untz <vuntz@gnome.org>
......
......@@ -579,7 +579,7 @@ panel_toplevel_calc_new_orientation (PanelToplevel *toplevel,
monitor = gdk_screen_get_monitor_at_point (screen, pointer_x, pointer_y);
if (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK)
if (toplevel->priv->geometry.height < toplevel->priv->geometry.width)
vborder = hborder = (3 * toplevel->priv->geometry.height) >> 1;
else
vborder = hborder = (3 * toplevel->priv->geometry.width) >> 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment