1
0
Fork 0

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:
Georges Basile Stavracas Neto 2018-12-21 18:38:53 -02:00
parent 7e8fc13504
commit ac2f8cad0c
No known key found for this signature in database
GPG key ID: 886C17EE170D1385

View file

@ -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);