window-actor: Select X11 or Wayland actor based on client type
X11 clients now have a MetaWindowActorX11 on the surface. Next commits will move the X11-specific code to MetaWindowActorX11. https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
This commit is contained in:
parent
7e8fc13504
commit
ac2f8cad0c
1 changed files with 15 additions and 1 deletions
|
@ -27,6 +27,8 @@
|
|||
#include "compositor/meta-surface-actor.h"
|
||||
#include "compositor/meta-texture-rectangle.h"
|
||||
#include "compositor/meta-window-actor-private.h"
|
||||
#include "compositor/meta-window-actor-wayland.h"
|
||||
#include "compositor/meta-window-actor-x11.h"
|
||||
#include "compositor/region-utils.h"
|
||||
#include "meta/display.h"
|
||||
#include "meta/meta-enum-types.h"
|
||||
|
@ -1480,8 +1482,20 @@ meta_window_actor_new (MetaWindow *window)
|
|||
MetaCompositor *compositor = display->compositor;
|
||||
MetaWindowActor *self;
|
||||
ClutterActor *window_group;
|
||||
GType window_actor_type;
|
||||
|
||||
self = g_object_new (META_TYPE_WINDOW_ACTOR,
|
||||
switch (window->client_type)
|
||||
{
|
||||
case META_WINDOW_CLIENT_TYPE_X11:
|
||||
window_actor_type = META_TYPE_WINDOW_ACTOR_X11;
|
||||
break;
|
||||
|
||||
case META_WINDOW_CLIENT_TYPE_WAYLAND:
|
||||
window_actor_type = META_TYPE_WINDOW_ACTOR_WAYLAND;
|
||||
break;
|
||||
}
|
||||
|
||||
self = g_object_new (window_actor_type,
|
||||
"meta-window", window,
|
||||
NULL);
|
||||
priv = meta_window_actor_get_instance_private (self);
|
||||
|
|
Loading…
Reference in a new issue