Skip to content

Commit

Permalink
Implement content-type-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Nov 25, 2023
1 parent 1cf479d commit c172d33
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ wayland_scanner = find_program(
native: true,
)

content_type_protocol = custom_target(
'content_type_v1_protocol_h',
input: join_paths(wayland_protocol_dir, 'staging', 'content-type', 'content-type-v1.xml'),
output: 'content-type-v1-protocol.h',
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
build_by_default: false,
)

xdg_shell_protocol = custom_target(
'xdg_shell_server_h',
input: join_paths(wayland_protocol_dir, 'stable', 'xdg-shell', 'xdg-shell.xml'),
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ magpie_sources = [
'surface/view.cpp',
'surface/xdg_view.cpp',
'surface/xwayland_view.cpp',
content_type_protocol,
xdg_shell_protocol,
wlr_layer_shell_protocol,
wlr_output_power_management_protocol,
Expand Down
2 changes: 2 additions & 0 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,6 @@ Server::Server() : listeners(*this) {
listeners.drm_lease_request.notify = drm_lease_notify;
wl_signal_add(&drm_manager->events.request, &listeners.drm_lease_request);
}

content_type_manager = wlr_content_type_manager_v1_create(display, 1);
}
2 changes: 2 additions & 0 deletions src/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "wlr-wrap-start.hpp"
#include <wlr/backend/session.h>
#include <wlr/render/allocator.h>
#include <wlr/types/wlr_content_type_v1.h>
#include <wlr/types/wlr_drm_lease_v1.h>
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
Expand Down Expand Up @@ -90,6 +91,7 @@ class Server {
wlr_idle_inhibit_manager_v1* idle_inhibit_manager;

wlr_drm_lease_v1_manager* drm_manager;
wlr_content_type_manager_v1* content_type_manager;

Server();

Expand Down

0 comments on commit c172d33

Please sign in to comment.