wayland: Make DnD role inherit from MetaWaylandActorSurface
It is meant to hold surfaces that require a ClutterActor, just like wl/xdg shell surfaces and subsurfaces. Make it inherit from MetaWaylandActorSurface so it gets that for free. The type declaration is also made completely private, in order to avoid cyclic dependency between meta-wayland-surface.h and meta-wayland-actor-surface.h. We just require the GType fro assign_role() anyway.
This commit is contained in:
parent
f6f188dad4
commit
f8cd1e55a4
@ -39,6 +39,7 @@
|
||||
#include "compositor/region-utils.h"
|
||||
#include "core/display-private.h"
|
||||
#include "core/window-private.h"
|
||||
#include "wayland/meta-wayland-actor-surface.h"
|
||||
#include "wayland/meta-wayland-buffer.h"
|
||||
#include "wayland/meta-wayland-data-device.h"
|
||||
#include "wayland/meta-wayland-gtk-shell.h"
|
||||
@ -91,9 +92,14 @@ struct _MetaWaylandSurfaceRoleDND
|
||||
MetaWaylandSurfaceRole parent;
|
||||
};
|
||||
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandSurfaceRoleDND,
|
||||
meta_wayland_surface_role_dnd,
|
||||
META, WAYLAND_SURFACE_ROLE_DND,
|
||||
MetaWaylandActorSurface);
|
||||
|
||||
G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
|
||||
meta_wayland_surface_role_dnd,
|
||||
META_TYPE_WAYLAND_SURFACE_ROLE);
|
||||
META_TYPE_WAYLAND_ACTOR_SURFACE);
|
||||
|
||||
enum {
|
||||
SURFACE_DESTROY,
|
||||
|
@ -70,10 +70,8 @@ struct _MetaWaylandSerial {
|
||||
};
|
||||
|
||||
#define META_TYPE_WAYLAND_SURFACE_ROLE_DND (meta_wayland_surface_role_dnd_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandSurfaceRoleDND,
|
||||
meta_wayland_surface_role_dnd,
|
||||
META, WAYLAND_SURFACE_ROLE_DND,
|
||||
MetaWaylandSurfaceRole);
|
||||
|
||||
GType meta_wayland_surface_role_dnd_get_type (void);
|
||||
|
||||
struct _MetaWaylandPendingState
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user