desktop-shell: use output position in get_output_panel_size()
The panel size calculation needs to take the output position into account
or it's only correct when the output is at 0, 0.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index f87b6bb..35f719b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -424,13 +424,12 @@
switch (shell->panel_position) {
case DESKTOP_SHELL_PANEL_POSITION_TOP:
case DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
-
weston_view_to_global_float(view,
view->surface->width, 0,
&x, &y);
- *width = (int) x;
- *height = view->surface->height + (int) y;
+ *width = (int)x - output->x;
+ *height = view->surface->height + (int) y - output->y;
return;
case DESKTOP_SHELL_PANEL_POSITION_LEFT:
@@ -439,8 +438,8 @@
0, view->surface->height,
&x, &y);
- *width = view->surface->width + (int) x;
- *height = (int) y;
+ *width = view->surface->width + (int)x - output->x;
+ *height = (int)y - output->y;
return;
default: