Skip to content

Commit 3056435

Browse files
committed
Implement wlr-layer-shell.
Very WIP, experimenting mainly with nemo-desktop for now.
1 parent 98298ea commit 3056435

8 files changed

Lines changed: 1272 additions & 5 deletions

src/compositor/compositor.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,13 @@ sync_actor_stacking (MetaCompositor *compositor)
998998
children = clutter_actor_get_children (priv->bottom_window_group);
999999
for (tmp = children; tmp != NULL; tmp = tmp->next)
10001000
{
1001-
MetaWindowActor *child = tmp->data;
1002-
MetaWindow *mw = meta_window_actor_get_meta_window (child);
1001+
ClutterActor *child = tmp->data;
1002+
MetaWindow *mw;
1003+
1004+
if (!META_IS_WINDOW_ACTOR (child))
1005+
continue;
1006+
1007+
mw = meta_window_actor_get_meta_window (META_WINDOW_ACTOR (child));
10031008

10041009
if (mw != NULL)
10051010
{

src/compositor/meta-surface-actor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ get_scaled_region (MetaSurfaceActor *surface_actor,
9494
float x, y;
9595

9696
window_actor = meta_window_actor_from_actor (CLUTTER_ACTOR (surface_actor));
97-
geometry_scale = meta_window_actor_get_geometry_scale (window_actor);
97+
geometry_scale = window_actor ? meta_window_actor_get_geometry_scale (window_actor) : 1;
9898

9999
clutter_actor_get_position (CLUTTER_ACTOR (surface_actor), &x, &y);
100100
cairo_region_translate (region, x, y);
@@ -331,7 +331,7 @@ meta_surface_actor_is_untransformed (MetaCullable *cullable)
331331
clutter_actor_get_abs_allocation_vertices (actor, verts);
332332

333333
window_actor = meta_window_actor_from_actor (actor);
334-
geometry_scale = meta_window_actor_get_geometry_scale (window_actor);
334+
geometry_scale = window_actor ? meta_window_actor_get_geometry_scale (window_actor) : 1;
335335

336336
return meta_actor_vertices_are_untransformed (verts,
337337
width * geometry_scale,

src/meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ if have_wayland
518518
'wayland/meta-wayland-dnd-surface.h',
519519
'wayland/meta-wayland-gtk-shell.c',
520520
'wayland/meta-wayland-gtk-shell.h',
521+
'wayland/meta-wayland-layer-shell.c',
522+
'wayland/meta-wayland-layer-shell.h',
521523
'wayland/meta-wayland.h',
522524
'wayland/meta-wayland-idle-inhibit.c',
523525
'wayland/meta-wayland-idle-inhibit.h',
@@ -805,6 +807,7 @@ if have_wayland
805807
# - protocol version (if stability is 'unstable')
806808
wayland_protocols = [
807809
['gtk-shell', 'private', ],
810+
['wlr-layer-shell-unstable-v1', 'private', ],
808811
['idle-inhibit', 'unstable', 'v1', ],
809812
['keyboard-shortcuts-inhibit', 'unstable', 'v1', ],
810813
['linux-dmabuf', 'unstable', 'v1', ],

0 commit comments

Comments
 (0)