After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478630 - Panel in middle of the screen after reboot when not full-sized
Panel in middle of the screen after reboot when not full-sized
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
2.20.x
Other Linux
: Normal major
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-20 15:25 UTC by Sebastien Bacher
Modified: 2015-03-24 13:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch (1006 bytes, patch)
2007-09-20 15:35 UTC, Vincent Untz
none Details | Review
Panel in the middle of the screen. GNOME gnome-panel 2.20.0 (158.43 KB, image/png)
2007-11-30 01:37 UTC, AD
  Details

Description Sebastien Bacher 2007-09-20 15:25:02 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/39856 and is similar to bug #338538 which has been closed

"http://launchpadlibrarian.net/9304707/screenshot-panel.png
Screenshot after login (66.9 KiB, image/png)

On a bottom panel (orientation bottom), click on properties, uncheck the expand option.
Log out.
Log in.
The panel orientation is top and you can't change it unless you change the expand option to true.
"
Comment 1 Vincent Untz 2007-09-20 15:32:14 UTC
Notes for when I'll have time:

 + in panel_toplevel_set_expand(), we correctly call panel_toplevel_set_x (toplevel, 0, 0, TRUE);

 + so the bottom panel should have x_bottom = 0, and should be placed at the bottom of the screen

 + need to check if the value is correctly saved in gconf

 + need to check if this happens if you unexpand the bottom panel, and then manually move it a bit to the left/right. I'd expect the bug doesn't appear in this case.

Hrm...

Code is:

	if (!toplevel->priv->expand) {
		switch (toplevel->priv->orientation) {
		case PANEL_ORIENTATION_TOP:
			panel_toplevel_set_x (toplevel, 0, -1, TRUE);
			break;
		case PANEL_ORIENTATION_BOTTOM:
			panel_toplevel_set_x (toplevel, 0, 0, TRUE);
			break;
		case PANEL_ORIENTATION_LEFT:
			panel_toplevel_set_y (toplevel, 0, -1, TRUE);
			break;
		case PANEL_ORIENTATION_RIGHT:
			panel_toplevel_set_y (toplevel, 0, 0, TRUE);
			break;
		default:
			g_assert_not_reached ();
			break;
		}
	}

Looks wrong. This should probably be:

	if (!toplevel->priv->expand) {
		switch (toplevel->priv->orientation) {
		case PANEL_ORIENTATION_TOP:
			panel_toplevel_set_x (toplevel, 0, -1, TRUE);
			panel_toplevel_set_y (toplevel, 0, -1, FALSE);
			break;
		case PANEL_ORIENTATION_BOTTOM:
			panel_toplevel_set_x (toplevel, 0, -1, TRUE);
			panel_toplevel_set_y (toplevel, 0, 0, FALSE);
			break;
		case PANEL_ORIENTATION_LEFT:
			panel_toplevel_set_x (toplevel, 0, -1, FALSE);
			panel_toplevel_set_y (toplevel, 0, -1, TRUE);
			break;
		case PANEL_ORIENTATION_RIGHT:
			panel_toplevel_set_x (toplevel, 0, 0, FALSE);
			panel_toplevel_set_y (toplevel, 0, -1, TRUE);
			break;
		default:
			g_assert_not_reached ();
			break;
		}
	}
Comment 2 Vincent Untz 2007-09-20 15:35:21 UTC
Created attachment 95907 [details] [review]
Patch

Patch, to make it easier for someone to test.
Comment 3 AD 2007-11-30 01:37:02 UTC
Created attachment 99880 [details]
Panel in the middle of the screen. 
GNOME gnome-panel 2.20.0


screen resolution is set to 1680x1050 (WSXGA+) however, the gnome-panel is fixed in a different resolution.
Comment 4 Sebastien Bacher 2008-07-23 08:18:19 UTC
Vincent fixed that in 2.23.5, closing the bug