Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clutter/clutter/clutter-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
#ifdef CLUTTER_WINDOWING_EGL
#include "egl/clutter-backend-eglnative.h"
#endif
#ifdef CLUTTER_WINDOWING_WAYLAND_CLIENT
#include "wayland-client/clutter-backend-wayland-client.h"
#endif

#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
#include <cogl/cogl-wayland-server.h>
Expand Down Expand Up @@ -452,6 +455,9 @@ static const struct {
#endif
#ifdef CLUTTER_WINDOWING_EGL
{ CLUTTER_WINDOWING_EGL, clutter_backend_egl_native_new },
#endif
#ifdef CLUTTER_WINDOWING_WAYLAND_CLIENT
{ CLUTTER_WINDOWING_WAYLAND_CLIENT, clutter_backend_wayland_client_new },
#endif
{ NULL, NULL },
};
Expand Down
3 changes: 3 additions & 0 deletions clutter/clutter/clutter-build-config.h.meson
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
/* Have evdev support for input handling */
#mesondefine HAVE_EVDEV

/* Have Wayland client backend support */
#mesondefine HAVE_WAYLAND_CLIENT

/* Building with libwacom for advanced tablet management */
#mesondefine HAVE_LIBWACOM

Expand Down
2 changes: 1 addition & 1 deletion clutter/clutter/cogl/clutter-stage-cogl.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_REGION);

has_buffer_age =
COGL_ONSCREEN (onscreen) &&
cogl_is_onscreen (onscreen) &&
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);

redraw_clip = clutter_stage_view_take_redraw_clip (view);
Expand Down
62 changes: 62 additions & 0 deletions clutter/clutter/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,62 @@ if have_wayland
clutter_backend_private_headers += clutter_wayland_private_headers
endif

if have_wayland_client
# Generate Wayland client protocols
wayland_scanner = find_program('wayland-scanner')
wayland_protocols_dir = wayland_protocols_dep.get_variable(pkgconfig: 'pkgdatadir')

# xdg-shell protocol (required by layer-shell)
xdg_shell_xml = join_paths(wayland_protocols_dir, 'stable', 'xdg-shell', 'xdg-shell.xml')

xdg_shell_client_header = custom_target('xdg-shell-client-protocol.h',
input: xdg_shell_xml,
output: 'xdg-shell-client-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)

xdg_shell_protocol_code = custom_target('xdg-shell-protocol.c',
input: xdg_shell_xml,
output: 'xdg-shell-protocol.c',
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)

# layer-shell protocol
layer_shell_xml = files('wayland-client/wlr-layer-shell-unstable-v1.xml')

layer_shell_client_header = custom_target('wlr-layer-shell-client-protocol.h',
input: layer_shell_xml,
output: 'wlr-layer-shell-unstable-v1-client-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)

layer_shell_protocol_code = custom_target('wlr-layer-shell-protocol.c',
input: layer_shell_xml,
output: 'wlr-layer-shell-unstable-v1-protocol.c',
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)

clutter_wayland_client_sources = [
'wayland-client/clutter-backend-wayland-client.c',
'wayland-client/clutter-stage-wayland-client.c',
'wayland-client/clutter-seat-wayland-client.c',
'wayland-client/clutter-keymap-wayland-client.c',
xdg_shell_protocol_code,
layer_shell_protocol_code,
]
clutter_backend_sources += clutter_wayland_client_sources

clutter_wayland_client_private_headers = [
'wayland-client/clutter-backend-wayland-client.h',
'wayland-client/clutter-stage-wayland-client.h',
'wayland-client/clutter-seat-wayland-client.h',
'wayland-client/clutter-keymap-wayland-client.h',
xdg_shell_client_header,
layer_shell_client_header,
]
clutter_backend_private_headers += clutter_wayland_client_private_headers
endif

cally_headers = [
'cally/cally-actor.h',
'cally/cally-clone.h',
Expand Down Expand Up @@ -334,6 +390,7 @@ cdata = configuration_data()
cdata.set_quoted('MUFFIN_VERSION', meson.project_version())
cdata.set('CLUTTER_DRIVERS', '"*"')
cdata.set('HAVE_EVDEV', have_native_backend)
cdata.set('HAVE_WAYLAND_CLIENT', have_wayland_client)
cdata.set('HAVE_LIBWACOM', have_libwacom)
cdata.set('HAVE_PANGO_FT2', have_pango_ft2)

Expand Down Expand Up @@ -364,6 +421,11 @@ if have_native_backend
'#define CLUTTER_INPUT_EVDEV "evdev"',
]
endif
if have_wayland_client
clutter_config_defines += [
'#define CLUTTER_WINDOWING_WAYLAND_CLIENT "wayland-client"',
]
endif
clutter_config_defines += [
'#define CLUTTER_INPUT_NULL "null"',
]
Expand Down
Loading
Loading