-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement per output configuration & fractional scaling
- Loading branch information
Showing
16 changed files
with
711 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ project( | |
|
||
cc = meson.get_compiler('c') | ||
|
||
wayland_protos = dependency('wayland-protocols', version: '>=1.13') | ||
# minimal version with fractional scaling protocol | ||
wayland_protos = dependency('wayland-protocols', version: '>=1.31') | ||
wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') | ||
wayland_scanner = find_program('wayland-scanner') | ||
wayland_client = dependency('wayland-client') | ||
|
@@ -32,34 +33,31 @@ wayland_scanner_client = generator( | |
arguments: ['client-header', '@INPUT@', '@OUTPUT@'], | ||
) | ||
|
||
client_protocols = [ | ||
[wl_protocol_dir + '/stable/xdg-shell', 'xdg-shell.xml'], | ||
[meson.project_source_root() + '/protocols', 'wlr-layer-shell-unstable-v1.xml'], | ||
wl_proto_xml = [ | ||
wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml', | ||
wl_protocol_dir / 'stable/viewporter/viewporter.xml', | ||
'protocols/wlr-layer-shell-unstable-v1.xml', | ||
wl_protocol_dir / 'staging/fractional-scale/fractional-scale-v1.xml', | ||
] | ||
|
||
foreach p : client_protocols | ||
xml = join_paths(p) | ||
src = wayland_scanner_code.process(xml) | ||
header = wayland_scanner_client.process(xml) | ||
|
||
name = p[1].split('.')[0].underscorify() | ||
|
||
lib = static_library( | ||
name, | ||
[src, header], | ||
dependencies: [wayland_client], | ||
) | ||
|
||
dep = declare_dependency( | ||
link_with: lib, | ||
sources: header, | ||
) | ||
|
||
set_variable(name, dep) | ||
wl_proto_headers = [] | ||
wl_proto_src = [] | ||
foreach proto : wl_proto_xml | ||
wl_proto_headers += custom_target( | ||
proto.underscorify() + '_client_header', | ||
output: '@[email protected]', | ||
input: proto, | ||
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@']) | ||
|
||
wl_proto_src += custom_target( | ||
proto.underscorify() + '_private_code', | ||
output: '@[email protected]', | ||
input: proto, | ||
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@']) | ||
endforeach | ||
|
||
wob_sources = ['src/main.c', 'src/image.c', 'src/log.c', 'src/color.c', 'src/config.c', 'src/wob.c'] | ||
wob_dependencies = [wayland_client, wlr_layer_shell_unstable_v1, xdg_shell, rt, inih] | ||
wob_sources = ['src/main.c', 'src/image.c', 'src/log.c', 'src/color.c', 'src/config.c', 'src/wob.c', 'src/shm.c', wl_proto_src, wl_proto_headers] | ||
wob_dependencies = [wayland_client, rt, inih] | ||
if seccomp.found() | ||
wob_dependencies += seccomp | ||
wob_sources += 'src/pledge_seccomp.c' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.