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>
dev
Derek Foreman 10 years ago committed by Bryce Harrington
parent f814c5dc9d
commit 612341f1a6
  1. 9
      desktop-shell/shell.c

@ -424,13 +424,12 @@ get_output_panel_size(struct desktop_shell *shell,
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 @@ get_output_panel_size(struct desktop_shell *shell,
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:

Loading…
Cancel
Save