Skip to content

Commit

Permalink
background-view: rewrite plugin to use newer Wayfire helpers and cust…
Browse files Browse the repository at this point in the history
…om views
  • Loading branch information
ammen99 committed Oct 5, 2023
1 parent b716ff9 commit 1b14098
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 131 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ project(

wayfire = dependency('wayfire')
giomm = dependency('giomm-2.4', required: false)
wayland_protos = dependency('wayland-protocols', version: '>=1.12')
wayland_server = dependency('wayland-server')

if get_option('enable_windecor') == true
windecor = subproject('windecor')
Expand Down
30 changes: 10 additions & 20 deletions proto/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
wayland_protos = dependency('wayland-protocols')
wayland_client = dependency('wayland-client')
wl_protocol_dir = wayland_protos.get_variable(pkgconfig: 'pkgdatadir')

wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')

wayland_scanner = find_program('wayland-scanner')
wayland_scanner = find_program('wayland-scanner', native: true)

wayland_scanner_server = generator(
wayland_scanner,
Expand All @@ -17,28 +14,21 @@ wayland_scanner_code = generator(
arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
)

wayland_scanner_client = generator(
wayland_scanner,
output: '@BASENAME@-client-protocol.h',
arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
)

client_protocols = [
'./virtual-keyboard-unstable-v1.xml',
'./wlr-input-inhibitor-unstable-v1.xml'
server_protocols = [
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
]

wl_protos_client_src = []
wl_protos_src = []
wl_protos_headers = []

foreach p : client_protocols
foreach p : server_protocols
xml = join_paths(p)
wl_protos_headers += wayland_scanner_client.process(xml)
wl_protos_client_src += wayland_scanner_code.process(xml)
wl_protos_src += wayland_scanner_code.process(xml)
wl_protos_headers += wayland_scanner_server.process(xml)
endforeach

lib_wl_protos = static_library('wl_protos', wl_protos_client_src + wl_protos_headers,
dependencies: [wayland_client]) # for the include directory
lib_wl_protos = static_library('wl_protos', wl_protos_src + wl_protos_headers,
dependencies: [wayland_server]) # for the include directory

wf_protos = declare_dependency(
link_with: lib_wl_protos,
Expand Down
Loading

0 comments on commit 1b14098

Please sign in to comment.