summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-04-15 12:23:55 -0500
committerBryce Harrington <bryce@osg.samsung.com>2015-07-17 17:46:54 -0700
commit612341f1a62b8c5cd2975343b7d607beb397fa57 (patch)
treeb1410037def0897cc5cfaec842e2fc3f3d577f1d /desktop-shell
parentf814c5dc9db7fd6597ddebe5ae221e33768323a0 (diff)
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>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index f87b6bbe..35f719b6 100644
--- a/desktop-shell/shell.c
+++ b/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: