desktop-shell: Port to libweston-desktop

All the shell protocol details, Xwayland glue and popups (and their
grab) are now handled in libweston-desktop.
Fullscreen methods (for wl_shell) are removed for now.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com>

Differential Revision: https://phabricator.freedesktop.org/D1209
dev
Quentin Glidic 8 years ago
parent 955cec06c7
commit 8f9d90a84b
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 2
      Makefile.am
  2. 2952
      desktop-shell/shell.c
  3. 4
      desktop-shell/shell.h
  4. 29
      libweston/compositor.h
  5. 11
      shared/helpers.h

@ -896,7 +896,7 @@ desktop_shell_la_CPPFLAGS = \
-DIN_WESTON -DIN_WESTON
desktop_shell_la_LDFLAGS = -module -avoid-version desktop_shell_la_LDFLAGS = -module -avoid-version
desktop_shell_la_LIBADD = libshared.la $(COMPOSITOR_LIBS) desktop_shell_la_LIBADD = libshared.la libweston-desktop-@LIBWESTON_MAJOR@.la $(COMPOSITOR_LIBS)
desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) desktop_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
desktop_shell_la_SOURCES = \ desktop_shell_la_SOURCES = \
desktop-shell/shell.h \ desktop-shell/shell.h \

File diff suppressed because it is too large Load Diff

@ -28,6 +28,7 @@
#include <time.h> #include <time.h>
#include "compositor.h" #include "compositor.h"
#include "xwayland/xwayland-api.h"
#include "weston-desktop-shell-server-protocol.h" #include "weston-desktop-shell-server-protocol.h"
@ -123,8 +124,11 @@ struct shell_output {
struct wl_listener background_surface_listener; struct wl_listener background_surface_listener;
}; };
struct weston_desktop;
struct desktop_shell { struct desktop_shell {
struct weston_compositor *compositor; struct weston_compositor *compositor;
struct weston_desktop *desktop;
const struct weston_xwayland_surface_api *xwayland_surface_api;
struct wl_listener idle_listener; struct wl_listener idle_listener;
struct wl_listener wake_listener; struct wl_listener wake_listener;

@ -100,38 +100,9 @@ struct weston_mode {
struct wl_list link; struct wl_list link;
}; };
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 { struct weston_shell_interface {
void *shell; /* either desktop or tablet */ void *shell; /* either desktop or tablet */
struct shell_surface *(*create_shell_surface)(void *shell,
struct weston_surface *surface,
const struct weston_shell_client *client);
void (*set_toplevel)(struct shell_surface *shsurf);
void (*set_transient)(struct shell_surface *shsurf,
struct weston_surface *parent,
int x, int y, uint32_t flags);
void (*set_fullscreen)(struct shell_surface *shsurf,
uint32_t method,
uint32_t framerate,
struct weston_output *output);
void (*set_xwayland)(struct shell_surface *shsurf,
int x, int y, uint32_t flags);
int (*move)(struct shell_surface *shsurf, struct weston_pointer *pointer);
int (*resize)(struct shell_surface *shsurf,
struct weston_pointer *pointer, uint32_t edges);
void (*set_title)(struct shell_surface *shsurf,
const char *title);
void (*set_window_geometry)(struct shell_surface *shsurf,
int32_t x, int32_t y,
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); void (*get_output_work_area)(void *shell, struct weston_output *output, pixman_rectangle32_t *area);
}; };

@ -52,6 +52,17 @@ extern "C" {
#define MIN(x,y) (((x) < (y)) ? (x) : (y)) #define MIN(x,y) (((x) < (y)) ? (x) : (y))
#endif #endif
/**
* Returns the bigger of two values.
*
* @param x the first item to compare.
* @param y the second item to compare.
* @return the value that evaluates to more than the other.
*/
#ifndef MAX
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
#endif
/** /**
* Returns a pointer the the containing struct of a given member item. * Returns a pointer the the containing struct of a given member item.
* *

Loading…
Cancel
Save