xwm: let the shells decide the position of X windows

The xwm used to automatically send to Xwayland the position of X windows
when that changed, using the x,y of the primary view of the surface.
This works fine for the desktop shell but less so for others.
This patch adds a 'send_position' vfunc to the weston_shell_client that
the shell will call when it wants to let Xwayland know what the position
of a window is.
The logic used by the desktop-shell for that is exactly the same the xwm
used to have.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David Fort <contact@hardening-consulting.com>
This commit is contained in:
Giulio Camuffo
2015-12-11 20:57:05 +02:00
committed by Derek Foreman
parent c112e0c5bc
commit f05d18f3ee
5 changed files with 64 additions and 54 deletions
+1 -3
View File
@@ -86,6 +86,7 @@ struct weston_mode {
struct weston_shell_client {
void (*send_configure)(struct weston_surface *surface, int32_t width, int32_t height);
void (*send_position)(struct weston_surface *surface, int32_t x, int32_t y);
};
struct weston_shell_interface {
@@ -94,9 +95,6 @@ struct weston_shell_interface {
struct shell_surface *(*create_shell_surface)(void *shell,
struct weston_surface *surface,
const struct weston_shell_client *client);
struct weston_view *(*get_primary_view)(void *shell,
struct shell_surface *shsurf);
void (*set_toplevel)(struct shell_surface *shsurf);
void (*set_transient)(struct shell_surface *shsurf,