On Wed, 23 Mar 2016 13:50:49 +0100 Quentin Glidic <[email protected]> wrote:
> From: Quentin Glidic <[email protected]> > > This will allow plugins to be aware of e.g. panels, to avoid covering > them with other surfaces. > > Signed-off-by: Quentin Glidic <[email protected]> > --- > desktop-shell/shell.c | 4 +++- > src/compositor.h | 1 + > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c > index 24437d8..9b01f4f 100644 > --- a/desktop-shell/shell.c > +++ b/desktop-shell/shell.c > @@ -453,10 +453,11 @@ get_output_panel_size(struct desktop_shell *shell, > } > > static void > -get_output_work_area(struct desktop_shell *shell, > +get_output_work_area(void *data, > struct weston_output *output, > pixman_rectangle32_t *area) > { > + struct desktop_shell *shell = data; > int32_t panel_width = 0, panel_height = 0; > > area->x = output->x; > @@ -6625,6 +6626,7 @@ module_init(struct weston_compositor *ec, > ec->shell_interface.set_window_geometry = set_window_geometry; > ec->shell_interface.set_maximized = shell_interface_set_maximized; > ec->shell_interface.set_pid = set_pid; > + ec->shell_interface.get_output_work_area = get_output_work_area; > > weston_layer_init(&shell->fullscreen_layer, &ec->cursor_layer.link); > weston_layer_init(&shell->panel_layer, &shell->fullscreen_layer.link); > diff --git a/src/compositor.h b/src/compositor.h > index 08b4059..d61a327 100644 > --- a/src/compositor.h > +++ b/src/compositor.h > @@ -116,6 +116,7 @@ struct weston_shell_interface { > int32_t width, int32_t height); > void (*set_maximized)(struct shell_surface *shsurf); > void (*set_pid)(struct shell_surface *shsurf, pid_t pid); > + void (*get_output_work_area)(void *shell, struct weston_output *output, > pixman_rectangle32_t *area); > }; > > struct weston_animation { Hi, this is a rather odd addition to the API exclusively used by the xwayland module. I can't help but think that there must be a better way, but I recall you have a plugin to implement some sort of notifications, and their placement needs this. Normally you'd handle the surfaces to the shell plugin to be placed, but that'd be awkward for other reasons. So, okay, pushed: aa25898..5c20195 master -> master But beware that there are no in-tree users, so someone might try to remove this as unused. Thanks, pq
pgp0KKWEMODum.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
