mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-22 19:24:27 +00:00
desktop-shell: Use weston_coord for configure_static_view
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
60a00d8c6c
commit
9056a11460
|
@ -2878,10 +2878,11 @@ static const struct weston_desktop_api shell_desktop_api = {
|
||||||
* end of libweston-desktop *
|
* end of libweston-desktop *
|
||||||
* ************************ */
|
* ************************ */
|
||||||
static void
|
static void
|
||||||
configure_static_view(struct weston_view *ev, struct weston_layer *layer, int x, int y)
|
configure_static_view(struct weston_view *ev, struct weston_layer *layer,
|
||||||
|
struct weston_coord_global offset_on_output)
|
||||||
{
|
{
|
||||||
struct weston_view *v, *next;
|
|
||||||
struct weston_coord_global pos;
|
struct weston_coord_global pos;
|
||||||
|
struct weston_view *v, *next;
|
||||||
|
|
||||||
if (!ev->output)
|
if (!ev->output)
|
||||||
return;
|
return;
|
||||||
|
@ -2894,9 +2895,7 @@ configure_static_view(struct weston_view *ev, struct weston_layer *layer, int x,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = ev->output->pos;
|
pos = weston_coord_global_add(ev->output->pos, offset_on_output);
|
||||||
pos.c.x += x;
|
|
||||||
pos.c.y += y;
|
|
||||||
weston_view_set_position(ev, pos);
|
weston_view_set_position(ev, pos);
|
||||||
weston_surface_map(ev->surface);
|
weston_surface_map(ev->surface);
|
||||||
|
|
||||||
|
@ -2932,10 +2931,12 @@ background_committed(struct weston_surface *es,
|
||||||
{
|
{
|
||||||
struct desktop_shell *shell = es->committed_private;
|
struct desktop_shell *shell = es->committed_private;
|
||||||
struct weston_view *view;
|
struct weston_view *view;
|
||||||
|
struct weston_coord_global tmp;
|
||||||
|
|
||||||
|
tmp.c = weston_coord(0, 0);
|
||||||
view = container_of(es->views.next, struct weston_view, surface_link);
|
view = container_of(es->views.next, struct weston_view, surface_link);
|
||||||
|
|
||||||
configure_static_view(view, &shell->background_layer, 0, 0);
|
configure_static_view(view, &shell->background_layer, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3015,6 +3016,7 @@ panel_committed(struct weston_surface *es,
|
||||||
struct weston_view *view;
|
struct weston_view *view;
|
||||||
int width, height;
|
int width, height;
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
|
struct weston_coord_global tmp;
|
||||||
|
|
||||||
view = container_of(es->views.next, struct weston_view, surface_link);
|
view = container_of(es->views.next, struct weston_view, surface_link);
|
||||||
|
|
||||||
|
@ -3037,7 +3039,8 @@ panel_committed(struct weston_surface *es,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_static_view(view, &shell->panel_layer, x, y);
|
tmp.c = weston_coord(x, y);
|
||||||
|
configure_static_view(view, &shell->panel_layer, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue