compositor.h: Add shell_interface.get_output_work_area
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Wed, 23 Mar 2016 12:50:49 +0000 (13:50 +0100)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 3 May 2016 12:45:24 +0000 (15:45 +0300)
This will allow plugins to be aware of e.g. panels, to avoid covering
them with other surfaces.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
desktop-shell/shell.c
src/compositor.h

index 27a6ca3..1c39a12 100644 (file)
@@ -451,10 +451,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;
@@ -6628,6 +6629,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);
index cb9df00..a95f05d 100644 (file)
@@ -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 {