aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-29 10:53:41 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-29 10:53:41 -0700
commit88b8c199e3524b7c4e2667db3683c77d70f34a26 (patch)
treeafe6f897edf813e9cf2c9221f3eab3fee935a900
parentb9a07a67b85e9192faa0e285b4419bd5ef242a03 (diff)
feat(wm): working prototype
-rw-r--r--Makefile5
-rw-r--r--compile_commands.json2405
-rw-r--r--rules.mk6
-rw-r--r--share/dynamic.mk16
-rw-r--r--sys/cmd/rules.mk3
-rw-r--r--sys/cmd/wm/client.c45
-rw-r--r--sys/cmd/wm/input.c72
-rw-r--r--sys/cmd/wm/main.c61
-rw-r--r--sys/cmd/wm/output.c153
-rw-r--r--sys/cmd/wm/rules.mk21
-rw-r--r--sys/cmd/wm/wm.h123
-rw-r--r--sys/cmd/wm/xdg.c41
-rwxr-xr-xvendor/sync16
13 files changed, 1781 insertions, 1186 deletions
diff --git a/Makefile b/Makefile
index 83f45ed..0ef5b88 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,10 @@
CC := gcc
AR := ar
AS := nasm
-PKG := pkg-config
+PKG := PKG_CONFIG_PATH=lib/pkgconfig pkg-config
+
+WL_PROTO:=$(shell $(PKG) --variable=pkgdatadir wayland-protocols)
+WL_SCAN:=$(shell $(PKG) --variable=wayland_scanner wayland-scanner)
# All needed build directories
INC_DIR := include
diff --git a/compile_commands.json b/compile_commands.json
index 1bf8db0..32f7c5e 100644
--- a/compile_commands.json
+++ b/compile_commands.json
@@ -1,1050 +1,1359 @@
[
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/error.o",
- "sys/libn/error.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/error.c",
- "output": "/home/nolln/root/.build/sys/libn/error.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/bufio.o",
- "sys/libn/bufio.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/bufio.c",
- "output": "/home/nolln/root/.build/sys/libn/bufio.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/coro.o",
- "sys/libn/coro.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/coro.c",
- "output": "/home/nolln/root/.build/sys/libn/coro.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/arg.o",
- "sys/libn/arg.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/arg.c",
- "output": "/home/nolln/root/.build/sys/libn/arg.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/flate.o",
- "sys/libn/flate.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/flate.c",
- "output": "/home/nolln/root/.build/sys/libn/flate.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/gz.o",
- "sys/libn/gz.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/gz.c",
- "output": "/home/nolln/root/.build/sys/libn/gz.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/fs.o",
- "sys/libn/fs.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/fs.c",
- "output": "/home/nolln/root/.build/sys/libn/fs.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/io.o",
- "sys/libn/io.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/io.c",
- "output": "/home/nolln/root/.build/sys/libn/io.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/os.o",
- "sys/libn/os.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/os.c",
- "output": "/home/nolln/root/.build/sys/libn/os.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/memory.o",
- "sys/libn/memory.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/memory.c",
- "output": "/home/nolln/root/.build/sys/libn/memory.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/mmap.o",
- "sys/libn/mmap.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/mmap.c",
- "output": "/home/nolln/root/.build/sys/libn/mmap.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/random.o",
- "sys/libn/random.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/random.c",
- "output": "/home/nolln/root/.build/sys/libn/random.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/string.o",
- "sys/libn/string.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/string.c",
- "output": "/home/nolln/root/.build/sys/libn/string.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libn/sort.o",
- "sys/libn/sort.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libn/sort.c",
- "output": "/home/nolln/root/.build/sys/libn/sort.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libmath/basic.o",
- "sys/libmath/basic.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libmath/basic.c",
- "output": "/home/nolln/root/.build/sys/libmath/basic.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libmath/blas1.o",
- "sys/libmath/blas1.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libmath/blas1.c",
- "output": "/home/nolln/root/.build/sys/libmath/blas1.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libmath/blas2.o",
- "sys/libmath/blas2.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libmath/blas2.c",
- "output": "/home/nolln/root/.build/sys/libmath/blas2.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libmath/blas3.o",
- "sys/libmath/blas3.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libmath/blas3.c",
- "output": "/home/nolln/root/.build/sys/libmath/blas3.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libbio/fasta.o",
- "sys/libbio/fasta.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libbio/fasta.c",
- "output": "/home/nolln/root/.build/sys/libbio/fasta.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libbio/newick.o",
- "sys/libbio/newick.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libbio/newick.c",
- "output": "/home/nolln/root/.build/sys/libbio/newick.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/libbio/phylo.o",
- "sys/libbio/phylo.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/libbio/phylo.c",
- "output": "/home/nolln/root/.build/sys/libbio/phylo.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/dwm/drw.o",
- "sys/cmd/dwm/drw.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/dwm/drw.c",
- "output": "/home/nolln/root/.build/sys/cmd/dwm/drw.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/dwm/hook.o",
- "sys/cmd/dwm/hook.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/dwm/hook.c",
- "output": "/home/nolln/root/.build/sys/cmd/dwm/hook.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/dwm/client.o",
- "sys/cmd/dwm/client.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/dwm/client.c",
- "output": "/home/nolln/root/.build/sys/cmd/dwm/client.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/dwm/util.o",
- "sys/cmd/dwm/util.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/dwm/util.c",
- "output": "/home/nolln/root/.build/sys/cmd/dwm/util.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/dwm/dwm.o",
- "sys/cmd/dwm/dwm.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/dwm/dwm.c",
- "output": "/home/nolln/root/.build/sys/cmd/dwm/dwm.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/cmd/filter/filter.o",
- "sys/cmd/filter/filter.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/filter/filter.c",
- "output": "/home/nolln/root/.build/sys/cmd/filter/filter.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-c",
- "-o",
- ".build/sys/cmd/menu/menu.o",
- "sys/cmd/menu/menu.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/menu/menu.c",
- "output": "/home/nolln/root/.build/sys/cmd/menu/menu.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-c",
- "-o",
- ".build/sys/cmd/menu/drw.o",
- "sys/cmd/menu/drw.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/menu/drw.c",
- "output": "/home/nolln/root/.build/sys/cmd/menu/drw.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-c",
- "-o",
- ".build/sys/cmd/menu/util.o",
- "sys/cmd/menu/util.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/menu/util.c",
- "output": "/home/nolln/root/.build/sys/cmd/menu/util.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/term/term.o",
- "sys/cmd/term/term.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/term/term.c",
- "output": "/home/nolln/root/.build/sys/cmd/term/term.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/sys/cmd/walk/walk.o",
- "sys/cmd/walk/walk.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/walk/walk.c",
- "output": "/home/nolln/root/.build/sys/cmd/walk/walk.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I/usr/include/freetype2",
- "-I/usr/include/libpng16",
- "-I/usr/include/harfbuzz",
- "-I/usr/include/glib-2.0",
- "-I/usr/lib/glib-2.0/include",
- "-I",
- "include",
- "-c",
- "-o",
- ".build/sys/cmd/term/x.o",
- "sys/cmd/term/x.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/sys/cmd/term/x.c",
- "output": "/home/nolln/root/.build/sys/cmd/term/x.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/util.o",
- "src/pangraph/util.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/util.c",
- "output": "/home/nolln/root/.build/src/pangraph/util.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/interval.o",
- "src/pangraph/interval.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/interval.c",
- "output": "/home/nolln/root/.build/src/pangraph/interval.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/sim.o",
- "src/pangraph/sim.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/sim.c",
- "output": "/home/nolln/root/.build/src/pangraph/sim.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/sketch.o",
- "src/pangraph/sketch.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/sketch.c",
- "output": "/home/nolln/root/.build/src/pangraph/sketch.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/builder.o",
- "src/pangraph/builder.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/builder.c",
- "output": "/home/nolln/root/.build/src/pangraph/builder.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/graph.o",
- "src/pangraph/graph.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/graph.c",
- "output": "/home/nolln/root/.build/src/pangraph/graph.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/io.o",
- "src/pangraph/io.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/io.c",
- "output": "/home/nolln/root/.build/src/pangraph/io.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/build.o",
- "src/pangraph/build.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/build.c",
- "output": "/home/nolln/root/.build/src/pangraph/build.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/generate.o",
- "src/pangraph/generate.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/generate.c",
- "output": "/home/nolln/root/.build/src/pangraph/generate.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/pangraph/main.o",
- "src/pangraph/main.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/pangraph/main.c",
- "output": "/home/nolln/root/.build/src/pangraph/main.o"
- },
- {
- "arguments": [
- "/usr/bin/gcc",
- "-g",
- "-march=native",
- "-fno-strict-aliasing",
- "-fwrapv",
- "-fms-extensions",
- "-Wno-microsoft-anon-tag",
- "-I",
- "include",
- "-isystem",
- "include/vendor/libc",
- "-c",
- "-o",
- ".build/src/timetree/main.o",
- "src/timetree/main.c"
- ],
- "directory": "/home/nolln/root",
- "file": "/home/nolln/root/src/timetree/main.c",
- "output": "/home/nolln/root/.build/src/timetree/main.o"
- }
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/error.o",
+ "-c",
+ "sys/libn/error.c"
+ ],
+ "file": "sys/libn/error.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/bufio.o",
+ "-c",
+ "sys/libn/bufio.c"
+ ],
+ "file": "sys/libn/bufio.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/coro.o",
+ "-c",
+ "sys/libn/coro.c"
+ ],
+ "file": "sys/libn/coro.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/arg.o",
+ "-c",
+ "sys/libn/arg.c"
+ ],
+ "file": "sys/libn/arg.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/flate.o",
+ "-c",
+ "sys/libn/flate.c"
+ ],
+ "file": "sys/libn/flate.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/gz.o",
+ "-c",
+ "sys/libn/gz.c"
+ ],
+ "file": "sys/libn/gz.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/fs.o",
+ "-c",
+ "sys/libn/fs.c"
+ ],
+ "file": "sys/libn/fs.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/io.o",
+ "-c",
+ "sys/libn/io.c"
+ ],
+ "file": "sys/libn/io.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/os.o",
+ "-c",
+ "sys/libn/os.c"
+ ],
+ "file": "sys/libn/os.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/memory.o",
+ "-c",
+ "sys/libn/memory.c"
+ ],
+ "file": "sys/libn/memory.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/mmap.o",
+ "-c",
+ "sys/libn/mmap.c"
+ ],
+ "file": "sys/libn/mmap.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/random.o",
+ "-c",
+ "sys/libn/random.c"
+ ],
+ "file": "sys/libn/random.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/string.o",
+ "-c",
+ "sys/libn/string.c"
+ ],
+ "file": "sys/libn/string.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/sort.o",
+ "-c",
+ "sys/libn/sort.c"
+ ],
+ "file": "sys/libn/sort.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/basic.o",
+ "-c",
+ "sys/libmath/basic.c"
+ ],
+ "file": "sys/libmath/basic.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/blas1.o",
+ "-c",
+ "sys/libmath/blas1.c"
+ ],
+ "file": "sys/libmath/blas1.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/blas2.o",
+ "-c",
+ "sys/libmath/blas2.c"
+ ],
+ "file": "sys/libmath/blas2.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/blas3.o",
+ "-c",
+ "sys/libmath/blas3.c"
+ ],
+ "file": "sys/libmath/blas3.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libbio/fasta.o",
+ "-c",
+ "sys/libbio/fasta.c"
+ ],
+ "file": "sys/libbio/fasta.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libbio/newick.o",
+ "-c",
+ "sys/libbio/newick.c"
+ ],
+ "file": "sys/libbio/newick.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libbio/phylo.o",
+ "-c",
+ "sys/libbio/phylo.c"
+ ],
+ "file": "sys/libbio/phylo.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/dwm/drw.o",
+ "-c",
+ "sys/cmd/dwm/drw.c"
+ ],
+ "file": "sys/cmd/dwm/drw.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/dwm/hook.o",
+ "-c",
+ "sys/cmd/dwm/hook.c"
+ ],
+ "file": "sys/cmd/dwm/hook.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/dwm/client.o",
+ "-c",
+ "sys/cmd/dwm/client.c"
+ ],
+ "file": "sys/cmd/dwm/client.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/dwm/util.o",
+ "-c",
+ "sys/cmd/dwm/util.c"
+ ],
+ "file": "sys/cmd/dwm/util.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/dwm/dwm.o",
+ "-c",
+ "sys/cmd/dwm/dwm.c"
+ ],
+ "file": "sys/cmd/dwm/dwm.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/cmd/filter/filter.o",
+ "-c",
+ "sys/cmd/filter/filter.c"
+ ],
+ "file": "sys/cmd/filter/filter.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-o",
+ ".build/sys/cmd/menu/menu.o",
+ "-c",
+ "sys/cmd/menu/menu.c"
+ ],
+ "file": "sys/cmd/menu/menu.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-o",
+ ".build/sys/cmd/menu/drw.o",
+ "-c",
+ "sys/cmd/menu/drw.c"
+ ],
+ "file": "sys/cmd/menu/drw.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-o",
+ ".build/sys/cmd/menu/util.o",
+ "-c",
+ "sys/cmd/menu/util.c"
+ ],
+ "file": "sys/cmd/menu/util.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/term/term.o",
+ "-c",
+ "sys/cmd/term/term.c"
+ ],
+ "file": "sys/cmd/term/term.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/cmd/walk/walk.o",
+ "-c",
+ "sys/cmd/walk/walk.c"
+ ],
+ "file": "sys/cmd/walk/walk.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I/usr/include/freetype2",
+ "-I/usr/include/libpng16",
+ "-I/usr/include/harfbuzz",
+ "-I/usr/include/glib-2.0",
+ "-I/usr/lib/glib-2.0/include",
+ "-I",
+ "include",
+ "-o",
+ ".build/sys/cmd/term/x.o",
+ "-c",
+ "sys/cmd/term/x.c"
+ ],
+ "file": "sys/cmd/term/x.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/util.o",
+ "-c",
+ "src/pangraph/util.c"
+ ],
+ "file": "src/pangraph/util.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/interval.o",
+ "-c",
+ "src/pangraph/interval.c"
+ ],
+ "file": "src/pangraph/interval.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/sim.o",
+ "-c",
+ "src/pangraph/sim.c"
+ ],
+ "file": "src/pangraph/sim.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/sketch.o",
+ "-c",
+ "src/pangraph/sketch.c"
+ ],
+ "file": "src/pangraph/sketch.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/builder.o",
+ "-c",
+ "src/pangraph/builder.c"
+ ],
+ "file": "src/pangraph/builder.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/graph.o",
+ "-c",
+ "src/pangraph/graph.c"
+ ],
+ "file": "src/pangraph/graph.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/io.o",
+ "-c",
+ "src/pangraph/io.c"
+ ],
+ "file": "src/pangraph/io.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/build.o",
+ "-c",
+ "src/pangraph/build.c"
+ ],
+ "file": "src/pangraph/build.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/generate.o",
+ "-c",
+ "src/pangraph/generate.c"
+ ],
+ "file": "src/pangraph/generate.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/pangraph/main.o",
+ "-c",
+ "src/pangraph/main.c"
+ ],
+ "file": "src/pangraph/main.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/timetree/main.o",
+ "-c",
+ "src/timetree/main.c"
+ ],
+ "file": "src/timetree/main.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/xdg-shell-protocol.o",
+ "-c",
+ "sys/cmd/wm/xdg-shell-protocol.c"
+ ],
+ "file": "sys/cmd/wm/xdg-shell-protocol.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/arg.o",
+ "-c",
+ "sys/cmd/wm/arg.c"
+ ],
+ "file": "sys/cmd/wm/arg.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/input.o",
+ "-c",
+ "sys/cmd/wm/input.c"
+ ],
+ "file": "sys/cmd/wm/input.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/output.o",
+ "-c",
+ "sys/cmd/wm/output.c"
+ ],
+ "file": "sys/cmd/wm/output.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/xdg.o",
+ "-c",
+ "sys/cmd/wm/xdg.c"
+ ],
+ "file": "sys/cmd/wm/xdg.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/client.o",
+ "-c",
+ "sys/cmd/wm/client.c"
+ ],
+ "file": "sys/cmd/wm/client.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I/home/nolln/root/include/vendor",
+ "-I/usr/include/libdrm",
+ "-I/usr/include/pixman-1",
+ "-I",
+ "include",
+ "-I",
+ "sys/cmd/wm",
+ "-o",
+ ".build/sys/cmd/wm/main.o",
+ "-c",
+ "sys/cmd/wm/main.c"
+ ],
+ "file": "sys/cmd/wm/main.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/cellnorm/io.o",
+ "-c",
+ "src/cellnorm/io.c"
+ ],
+ "file": "src/cellnorm/io.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/cellnorm/main.o",
+ "-c",
+ "src/cellnorm/main.c"
+ ],
+ "file": "src/cellnorm/main.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/src/kmer/main.o",
+ "-c",
+ "src/kmer/main.c"
+ ],
+ "file": "src/kmer/main.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libn/test.o",
+ "-c",
+ "sys/libn/test.c"
+ ],
+ "file": "sys/libn/test.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-D_GNU_SOURCE",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/blas.o",
+ "-c",
+ "sys/libmath/blas.c"
+ ],
+ "file": "sys/libmath/blas.c"
+ },
+ {
+ "directory": "/home/nolln/root",
+ "arguments": [
+ "gcc",
+ "-MD",
+ "-g",
+ "-march=native",
+ "-fno-strict-aliasing",
+ "-fwrapv",
+ "-fms-extensions",
+ "-Wno-microsoft-anon-tag",
+ "-D_GNU_SOURCE",
+ "-I",
+ "include",
+ "-isystem",
+ "include/vendor/libc",
+ "-o",
+ ".build/sys/libmath/test.o",
+ "-c",
+ "sys/libmath/test.c"
+ ],
+ "file": "sys/libmath/test.c"
+ }
]
diff --git a/rules.mk b/rules.mk
index 8d41f66..8e0c813 100644
--- a/rules.mk
+++ b/rules.mk
@@ -21,10 +21,12 @@ SRCS :=
OBJS :=
DEPS :=
-LIBS :=
+LIBS :=
BINS :=
UNTS :=
+GENS :=
+
# Iterate through directory tree
DIR := sys
include $(DIR)/rules.mk
@@ -55,6 +57,8 @@ clean:
@rm -f $(OBJS)
@echo removing dependency files
@rm -f $(DEPS)
+ @echo removing generated source files
+ @rm -f $(GENS)
@echo removing libraries
@rm -f $(LIBS)
@echo removing binaries
diff --git a/share/dynamic.mk b/share/dynamic.mk
index 3628cd4..c19e235 100644
--- a/share/dynamic.mk
+++ b/share/dynamic.mk
@@ -1,11 +1,11 @@
-$(BINS_$(d)): STATIC =
-$(BINS_$(d)): CINIT =
-$(BINS_$(d)): CFINI =
-$(BINS_$(d)): ELIBS =
+$(BINS_$(d)): STATIC =
+$(BINS_$(d)): CINIT =
+$(BINS_$(d)): CFINI =
+$(BINS_$(d)): ELIBS =
$(BINS_$(d)): INCS = -I $(INC_DIR)
-$(UNTS_$(d)): STATIC =
-$(UNTS_$(d)): CINIT =
-$(UNTS_$(d)): CFINI =
-$(UNTS_$(d)): ELIBS =
+$(UNTS_$(d)): STATIC =
+$(UNTS_$(d)): CINIT =
+$(UNTS_$(d)): CFINI =
+$(UNTS_$(d)): ELIBS =
$(UNTS_$(d)): INCS = -I $(INC_DIR)
diff --git a/sys/cmd/rules.mk b/sys/cmd/rules.mk
index 01edd92..50d9274 100644
--- a/sys/cmd/rules.mk
+++ b/sys/cmd/rules.mk
@@ -8,6 +8,9 @@ include share/push.mk
DIR := $(d)/dwm
include $(DIR)/rules.mk
+DIR := $(d)/tinywl
+include $(DIR)/rules.mk
+
DIR := $(d)/wm
include $(DIR)/rules.mk
diff --git a/sys/cmd/wm/client.c b/sys/cmd/wm/client.c
index 7d828a0..33dfcb1 100644
--- a/sys/cmd/wm/client.c
+++ b/sys/cmd/wm/client.c
@@ -8,12 +8,15 @@ focus(Client *client, struct wlr_surface *new)
struct wlr_xdg_surface *xdg;
struct wlr_keyboard *keyboard;
- if(!client)
- return;
+ if(client) {
+ wl_list_remove(&client->link);
+ wl_list_insert(&server.clients, &client->link);
+ }
seat = server.input.seat;
old = seat->keyboard_state.focused_surface;
- if(old == new)
+
+ if(old==new)
return;
if(old) {
@@ -21,20 +24,26 @@ focus(Client *client, struct wlr_surface *new)
wlr_xdg_toplevel_set_activated(xdg, false);
}
+ if(!client) {
+ wlr_seat_keyboard_notify_clear_focus(seat);
+ return;
+ }
+
keyboard = wlr_seat_get_keyboard(seat);
- wl_list_remove(&client->link);
- wl_list_insert(&server.clients, &client->link);
+ wlr_seat_keyboard_notify_enter(seat, client->xdg->surface,
+ keyboard->keycodes,
+ keyboard->num_keycodes,
+ &keyboard->modifiers
+ );
wlr_xdg_toplevel_set_activated(client->xdg, true);
- wlr_seat_keyboard_notify_enter(seat, client->xdg->surface,
- keyboard->keycodes, keyboard->num_keycodes, &keyboard->modifiers);
}
int
-clienthas(Client *client, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy)
+client_has(Client *client, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy)
{
- double x, y, vsx = lx - client->x, vsy = ly - client->y;
+ double x, y, vsx = lx - client->geo.x, vsy = ly - client->geo.y;
struct wlr_surface *find = nil;
find = wlr_xdg_surface_surface_at(client->xdg, vsx, vsy, &x, &y);
@@ -49,11 +58,11 @@ clienthas(Client *client, double lx, double ly, struct wlr_surface **surface, do
}
Client*
-clientat(double lx, double ly, struct wlr_surface **surface, double *sx, double *sy)
+client_at(double lx, double ly, struct wlr_surface **surface, double *sx, double *sy)
{
Client *it;
wl_list_for_each(it, &server.clients, link) {
- if(clienthas(it, lx, ly, surface, sx, sy))
+ if(client_has(it, lx, ly, surface, sx, sy))
return it;
}
@@ -73,23 +82,21 @@ setinteractive(Client *client, int mode, uint32 edges) {
server.cursor.mode = mode;
if(mode == CursorMove) {
- server.grab.x = server.cursor.dot->x - client->x;
- server.grab.y = server.cursor.dot->y - client->y;
+ server.grab.x = server.cursor.dot->x - client->geo.x;
+ server.grab.y = server.cursor.dot->y - client->geo.y;
} else {
wlr_xdg_surface_get_geometry(client->xdg, &box);
- bx = (client->x + box.x) + ((edges & WLR_EDGE_RIGHT) ? box.width : 0);
- by = (client->y + box.y) + ((edges & WLR_EDGE_BOTTOM) ? box.height : 0);
+ bx = (client->geo.x + box.x) + ((edges & WLR_EDGE_RIGHT) ? box.width : 0);
+ by = (client->geo.y + box.y) + ((edges & WLR_EDGE_BOTTOM) ? box.height : 0);
server.grab.x = server.cursor.dot->x - bx;
server.grab.y = server.cursor.dot->y - by;
server.grab.box = box;
- server.grab.box.x += client->x;
- server.grab.box.y += client->y;
+ server.grab.box.x += client->geo.x;
+ server.grab.box.y += client->geo.y;
server.resize = edges;
}
}
-
-
diff --git a/sys/cmd/wm/input.c b/sys/cmd/wm/input.c
index e155024..295f861 100644
--- a/sys/cmd/wm/input.c
+++ b/sys/cmd/wm/input.c
@@ -15,31 +15,16 @@ keymodifier(struct wl_listener *l, void *data)
static
int
-keybinding(xkb_keysym_t sym)
+keybinding(uint32 modifier, xkb_keysym_t sym)
{
- Client *current, *next;
-
- switch(sym) {
- case XKB_KEY_Escape:
- wl_display_terminate(server.display);
- break;
- case XKB_KEY_F1:
- /* cycle to the next client */
- if(wl_list_length(&server.clients) < 2) break;
-
- current = wl_container_of(server.clients.next, current, link);
- next = wl_container_of(current->link.next, next, link);
-
- focus(next, next->xdg->surface);
-
- /* move previous client to the end of the list */
- wl_list_remove(&current->link);
- wl_list_insert(server.clients.prev, &current->link);
- break;
- default:
- return false;
+ Key *key;
+ for(key=cfg·binding; key!=cfg·endbinding; ++key) {
+ if(modifier == key->modifier && sym == key->sym && key->action){
+ key->action(&key->arg);
+ return 1;
+ }
}
- return true;
+ return 0;
}
static
@@ -51,7 +36,6 @@ keypress(struct wl_listener *l, void *data)
const xkb_keysym_t *syms;
struct Keyboard *keyboard = wl_container_of(l, keyboard, event.press);
struct wlr_event_keyboard_key *event = data;
- struct wlr_seat *seat = server.input.seat;
keycode = event->keycode + 8;
@@ -59,20 +43,35 @@ keypress(struct wl_listener *l, void *data)
n = xkb_state_key_get_syms(keyboard->device->keyboard->xkb_state, keycode, &syms);
modifier = wlr_keyboard_get_modifiers(keyboard->device->keyboard);
- if((modifier & WLR_MODIFIER_ALT) && event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
+ if(event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
for(i=0; i<n; i++)
- h=keybinding(syms[i]);
+ h=keybinding(modifier, syms[i]);
}
if(!h) {
- wlr_seat_set_keyboard(seat, keyboard->device);
- wlr_seat_keyboard_notify_key(seat, event->time_msec,
- event->keycode, event->state);
+ wlr_seat_set_keyboard(server.input.seat, keyboard->device);
+ wlr_seat_keyboard_notify_key(server.input.seat, event->time_msec, event->keycode, event->state);
}
}
static
void
+free_keyboard(struct wl_listener *l, void *data)
+{
+ struct wlr_input_device *device = data;
+ Keyboard *keyboard = device->data;
+
+ /*
+ wl_list_remove(&keyboard->link);
+ wl_list_remove(&keyboard->event.modify.link);
+ wl_list_remove(&keyboard->event.press.link);
+ wl_list_remove(&keyboard->event.destroy.link);
+ free(keyboard);
+ */
+}
+
+static
+void
make_keyboard(struct wlr_input_device *device)
{
Keyboard *keyboard;
@@ -83,21 +82,24 @@ make_keyboard(struct wlr_input_device *device)
keymap = xkb_keymap_new_from_names(context, nil, XKB_KEYMAP_COMPILE_NO_FLAGS);
wlr_keyboard_set_keymap(device->keyboard, keymap);
- wlr_keyboard_set_keymap(device->keyboard, keymap);
xkb_keymap_unref(keymap);
xkb_context_unref(context);
- wlr_keyboard_set_repeat_info(device->keyboard, 25, 600);
+ wlr_keyboard_set_repeat_info(device->keyboard, cfg·repeat_rate, cfg·repeat_delay);
keyboard = calloc(1, sizeof(*keyboard));
keyboard->device = device;
keyboard->event.modify.notify = keymodifier;
wl_signal_add(&device->keyboard->events.modifiers, &keyboard->event.modify);
+
keyboard->event.press.notify = keypress;
wl_signal_add(&device->keyboard->events.key, &keyboard->event.press);
+ keyboard->event.destroy.notify = free_keyboard;
+ wl_signal_add(&device->keyboard->events.destroy, &keyboard->event.destroy);
+
wlr_seat_set_keyboard(server.input.seat, device);
wl_list_insert(&server.input.keyboards, &keyboard->link);
}
@@ -147,8 +149,8 @@ cursorresize(uint32 time)
}
wlr_xdg_surface_get_geometry(client->xdg, &box);
- client->x = new_left - box.x;
- client->y = new_top - box.y;
+ client->geo.x = new_left - box.x;
+ client->geo.y = new_top - box.y;
new_width = new_right - new_left;
new_height = new_bottom - new_top;
@@ -172,7 +174,7 @@ docursor(uint32 time)
/* Otherwise, find the client under the pointer and send the event along. */
seat = server.input.seat;
surface = nil;
- client = clientat(server.cursor.dot->x, server.cursor.dot->y, &surface, &sx, &sy);
+ client = client_at(server.cursor.dot->x, server.cursor.dot->y, &surface, &sx, &sy);
if(!client)
wlr_xcursor_manager_set_cursor_image(server.cursor.manager, "left_ptr", server.cursor.dot);
@@ -211,7 +213,7 @@ cursor_button(struct wl_listener *l, void *data)
wlr_seat_pointer_notify_button(server.input.seat,
event->time_msec, event->button, event->state);
- client = clientat(server.cursor.dot->x, server.cursor.dot->y, &surface, &sx, &sy);
+ client = client_at(server.cursor.dot->x, server.cursor.dot->y, &surface, &sx, &sy);
if (event->state == WLR_BUTTON_RELEASED)
server.cursor.mode = CursorPassthrough;
else
diff --git a/sys/cmd/wm/main.c b/sys/cmd/wm/main.c
index dac0aa3..3dd9903 100644
--- a/sys/cmd/wm/main.c
+++ b/sys/cmd/wm/main.c
@@ -3,7 +3,7 @@
Server server = {
.event = {
.make_input = { .notify = make_input },
- .make_output = { .notify = make_output },
+ .make_monitor = { .notify = make_monitor },
.make_xdg_surface = { .notify = make_xdg_surface },
.cursor_move = { .notify = cursor_move },
@@ -27,26 +27,42 @@ init_compositor(void)
server.display = wl_display_create();
server.backend = wlr_backend_autocreate(server.display);
server.renderer = wlr_backend_get_renderer(server.backend);
+ server.present = wlr_presentation_create(server.display, server.backend);
wlr_renderer_init_wl_display(server.renderer, server.display);
wlr_compositor_create(server.display, server.renderer);
+ wlr_export_dmabuf_manager_v1_create(server.display);
+ wlr_screencopy_manager_v1_create(server.display);
+ wlr_data_control_manager_v1_create(server.display);
wlr_data_device_manager_create(server.display);
+ wlr_gamma_control_manager_v1_create(server.display);
+ wlr_primary_selection_v1_device_manager_create(server.display);
+ wlr_viewporter_create(server.display);
- server.output.layout = wlr_output_layout_create();
+ wlr_data_device_manager_create(server.display);
+
+ server.monitor.layout = wlr_output_layout_create();
- wl_list_init(&server.output.list);
- wl_signal_add(&server.backend->events.new_output, &server.event.make_output);
+ wl_list_init(&server.monitor.list);
+ wl_signal_add(&server.backend->events.new_output, &server.event.make_monitor);
}
static inline
void
-init_desktop(void)
+init_shells(void)
{
wl_list_init(&server.clients);
+ wl_list_init(&server.stack);
server.shell.xdg = wlr_xdg_shell_create(server.display);
wl_signal_add(&server.shell.xdg->events.new_surface, &server.event.make_xdg_surface);
+
+ wlr_server_decoration_manager_set_default_mode(
+ wlr_server_decoration_manager_create(server.display),
+ WLR_SERVER_DECORATION_MANAGER_MODE_SERVER
+ );
+ wlr_xdg_decoration_manager_v1_create(server.display);
}
static inline
@@ -54,7 +70,7 @@ void
init_inputs(void)
{
server.cursor.dot = wlr_cursor_create();
- wlr_cursor_attach_output_layout(server.cursor.dot, server.output.layout);
+ wlr_cursor_attach_output_layout(server.cursor.dot, server.monitor.layout);
server.cursor.manager = wlr_xcursor_manager_create(nil, 24);
wlr_xcursor_manager_load(server.cursor.manager, 1);
@@ -79,6 +95,12 @@ void
cleanup(void)
{
wl_display_destroy_clients(server.display);
+
+ wlr_backend_destroy(server.backend);
+ wlr_xcursor_manager_destroy(server.cursor.manager);
+ wlr_output_layout_destroy(server.monitor.layout);
+ wlr_seat_destroy(server.input.seat);
+
wl_display_destroy(server.display);
}
@@ -86,14 +108,33 @@ cleanup(void)
// main point of entry
int
+usage(void)
+{
+ fprintf(stderr, "usage: %s [-s startup command]\n", argv0);
+ return 1;
+}
+
+
+int
main(int argc, char *argv[])
{
- char *socket;
+ char *socket, *cmd=nil;
+
+ ARGBEGIN {
+ case 's':
+ cmd = ARGF();
+ break;
+ default:
+ return usage();
+ } ARGEND
+
+ if(argc != 0)
+ return usage();
wlr_log_init(WLR_DEBUG, nil);
init_compositor();
- init_desktop();
+ init_shells();
init_inputs();
if(!(socket=(char*)wl_display_add_socket_auto(server.display))) {
@@ -108,6 +149,10 @@ main(int argc, char *argv[])
}
setenv("WAYLAND_DISPLAY", socket, true);
+ if(cmd) {
+ if(fork()==0)
+ execl("/bin/sh", "/bin/sh", "-c", cmd, nil);
+ }
wlr_log(WLR_INFO, "Running Wayland compositor on WAYLAND_DISPLAY=%s", socket);
wl_display_run(server.display); /* event loop */
diff --git a/sys/cmd/wm/output.c b/sys/cmd/wm/output.c
index 3283c41..46e702f 100644
--- a/sys/cmd/wm/output.c
+++ b/sys/cmd/wm/output.c
@@ -1,23 +1,23 @@
#include "wm.h"
-typedef struct Payload Payload;
struct Payload
{
- Client *client;
- struct wlr_output *output;
- struct wlr_renderer *renderer;
- struct timespec *when;
+ Client *client;
+ struct wlr_output *output;
+ struct timespec *when;
+ int x, y;
};
static
void
-draw(struct wlr_surface *surface, int sx, int sy, void *data)
+render(struct wlr_surface *surface, int sx, int sy, void *data)
{
float matrix[9];
- double ox, oy;
+ double x, y;
Client *client;
- Payload *payload;
+ struct Payload *payload;
+
struct wlr_box box;
struct wlr_output *output;
struct wlr_texture *texture;
@@ -31,70 +31,134 @@ draw(struct wlr_surface *surface, int sx, int sy, void *data)
if(!texture)
return;
- ox = 0, oy = 0;
- wlr_output_layout_output_coords(server.output.layout, output, &ox, &oy);
- ox += client->x + sx, oy += client->y + sy;
+ x = 0, y = 0;
+ wlr_output_layout_output_coords(server.monitor.layout, output, &x, &y);
- box = (struct wlr_box){
- .x = ox * output->scale,
- .y = oy * output->scale,
- .width = surface->current.width * output->scale,
- .height = surface->current.height * output->scale,
+ box = (struct wlr_box) {
+ .x = x + payload->x + sx,
+ .y = y + payload->y + sy,
+ .width = surface->current.width,
+ .height = surface->current.height,
};
+ scale_box(&box, output->scale);
transform = wlr_output_transform_invert(surface->current.transform);
wlr_matrix_project_box(matrix, &box, transform, 0, output->transform_matrix);
- wlr_render_texture_with_matrix(payload->renderer, texture, matrix, 1);
+ wlr_render_texture_with_matrix(server.renderer, texture, matrix, 1);
wlr_surface_send_frame_done(surface, payload->when);
+ wlr_presentation_surface_sampled_on_output(server.present, surface, output);
}
static
void
-render(struct wl_listener *l, void *data)
+render_clients(Monitor *monitor, struct timespec *now)
{
- int width, height;
- struct timespec now;
+ double x, y;
+ int i, w, h, bw;
+ float *color;
+
Client *client;
+ struct wlr_output *output;
+ struct wlr_box *borders;
+ struct wlr_surface *surface;
+
+ output = monitor->output;
+ wl_list_for_each_reverse(client, &server.clients, link) {
+ if(!client->ismapped)
+ continue;
+
+ surface = client->xdg->surface;
+
+ x = client->geo.x, y = client->geo.y;
+ wlr_output_layout_output_coords(server.monitor.layout, output, &x, &y);
+
+ if((bw=client->border)) {
+ w = surface->current.width;
+ h = surface->current.height;
+ borders = (struct wlr_box[4]) {
+ {x, y, w+2*bw, bw}, /* top */
+ {x, y+bw, bw, h}, /* left */
+ {x+bw+w, y+bw, bw, h}, /* right */
+ {x, y+bw+h, w+2*bw, bw}, /* bottom */
+ };
+
+ color = (client == server.selected) ? cfg·focuscolor : cfg·bordercolor;
+ for(i=0; i<4; i++) {
+ scale_box(&borders[i], output->scale);
+ wlr_render_rect(server.renderer, &borders[i], color, output->transform_matrix);
+ }
+ }
+
+ struct Payload payload = {
+ .output = output,
+ .client = client,
+ .when = now,
+
+ .x = client->geo.x + client->border,
+ .y = client->geo.y + client->border,
+ };
+
+ wlr_xdg_surface_for_each_surface(client->xdg, render, &payload);
+ }
+}
+
+static
+void
+render_monitor(struct wl_listener *l, void *data)
+{
+ int w, h;
Monitor *monitor;
- struct wlr_renderer *renderer;
- float color[4] = {0.3, 0.3, 0.3, 1.0};
+ struct timespec now;
monitor = wl_container_of(l, monitor, event.render);
- renderer = server.renderer;
clock_gettime(CLOCK_MONOTONIC, &now);
if(!wlr_output_attach_render(monitor->output, nil))
return;
- wlr_output_effective_resolution(monitor->output, &width, &height);
+ wlr_output_effective_resolution(monitor->output, &w, &h);
/* start of rendering kernel */
- wlr_renderer_begin(renderer, width, height);
- wlr_renderer_clear(renderer, color);
+ wlr_renderer_begin(server.renderer, w, h);
+ wlr_renderer_clear(server.renderer, cfg·rootcolor);
- wl_list_for_each_reverse(client, &server.clients, link) {
- if(!client->mapped)
- continue;
-
- Payload payload = {
- .output = monitor->output,
- .client = client,
- .renderer = renderer,
- .when = &now,
- };
-
- wlr_xdg_surface_for_each_surface(client->xdg, draw, &payload);
- }
+ render_clients(monitor, &now);
wlr_output_render_software_cursors(monitor->output, nil);
- wlr_renderer_end(renderer);
+ wlr_renderer_end(server.renderer);
wlr_output_commit(monitor->output);
}
+static
+void
+free_monitor(struct wl_listener *l, void *data)
+{
+ int len, i = 0;
+ struct wlr_output *output = data;
+ Monitor *monitor = output->data;
+
+ wl_list_remove(&monitor->event.destroy.link);
+ wl_list_remove(&monitor->event.render.link);
+ wl_list_remove(&monitor->link);
+
+ wlr_output_layout_remove(server.monitor.layout, monitor->output);
+
+ len = wl_list_length(&server.monitor.list);
+ /*
+ do // don't switch to disabled mons
+ selmon = wl_container_of(mons.prev, selmon, link);
+ while (!selmon->wlr_output->enabled && i++ < nmons);
+ focusclient(focustop(selmon), 1);
+
+ closemon(m);
+ free(monitor);
+ */
+}
+
void
-make_output(struct wl_listener *l, void *data)
+make_monitor(struct wl_listener *l, void *data)
{
struct wlr_output_mode *mode;
struct Monitor *monitor;
@@ -112,10 +176,9 @@ make_output(struct wl_listener *l, void *data)
monitor = calloc(1, sizeof(*monitor));
monitor->output = output;
- monitor->event.render.notify = render;
+ monitor->event.render.notify = render_monitor;
wl_signal_add(&output->events.frame, &monitor->event.render);
- wl_list_insert(&server.output.list, &monitor->link);
+ wl_list_insert(&server.monitor.list, &monitor->link);
- wlr_output_layout_add_auto(server.output.layout, output);
+ wlr_output_layout_add_auto(server.monitor.layout, output);
}
-
diff --git a/sys/cmd/wm/rules.mk b/sys/cmd/wm/rules.mk
index b1ab9c3..8714aec 100644
--- a/sys/cmd/wm/rules.mk
+++ b/sys/cmd/wm/rules.mk
@@ -3,6 +3,9 @@ include share/push.mk
# Local sources
SRCS_$(d) := \
+ $(d)/xdg-shell-protocol.c \
+ $(d)/util.c \
+ $(d)/arg.c \
$(d)/input.c \
$(d)/output.c \
$(d)/xdg.c \
@@ -14,15 +17,29 @@ include share/paths.mk
# Local rules
include share/dynamic.mk
+
+$(d)/xdg-shell-protocol.h:
+ @echo "MK xdg-shell-protocol.h";\
+ $(WL_SCAN) server-header $(WL_PROTO)/stable/xdg-shell/xdg-shell.xml $@
+
+$(d)/xdg-shell-protocol.c: $(d)/xdg-shell-protocol.h
+ @echo "MK xdg-shell-protocol.c";\
+ $(WL_SCAN) private-code $(WL_PROTO)/stable/xdg-shell/xdg-shell.xml $@
+
+GENS += $(d)/xdg-shell-protocol.h $(d)/xdg-shell-protocol.c
+
+$(BINS_$(d)): TCINCS = \
+ -I sys/cmd/wm
+
$(BINS_$(d)): TCFLAGS = \
- `$(PKG) --cflags wlroots ` \
+ `$(PKG) --cflags wlroots` \
`$(PKG) --cflags wayland-server` \
`$(PKG) --cflags xkbcommon`
$(BINS_$(d)): TCLIBS = \
`$(PKG) --libs wlroots` \
`$(PKG) --libs wayland-server` \
- `$(PKG) --libs xkbcommon`
+ `$(PKG) --libs xkbcommon` \
$(BINS_$(d)): $(OBJS_$(d)) $(OBJ_DIR)/sys/libn/libn.a
$(COMPLINK)
diff --git a/sys/cmd/wm/wm.h b/sys/cmd/wm/wm.h
index b9731e9..e1d3670 100644
--- a/sys/cmd/wm/wm.h
+++ b/sys/cmd/wm/wm.h
@@ -10,15 +10,28 @@
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_compositor.h>
+#include <wlr/types/wlr_data_control_v1.h>
#include <wlr/types/wlr_data_device.h>
+#include <wlr/types/wlr_export_dmabuf_v1.h>
+#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_output_management_v1.h>
+#include <wlr/types/wlr_primary_selection.h>
+#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_pointer.h>
+#include <wlr/types/wlr_presentation_time.h>
+#include <wlr/types/wlr_screencopy_v1.h>
+#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_viewporter.h>
#include <wlr/types/wlr_xcursor_manager.h>
+#include <wlr/types/wlr_xdg_activation_v1.h>
+#include <wlr/types/wlr_xdg_decoration_v1.h>
+#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
@@ -26,6 +39,11 @@
#include <xkbcommon/xkbcommon.h>
// -----------------------------------------------------------------------
+// macros
+
+#define ROUND(x) ((int)((x)+0.5))
+
+// -----------------------------------------------------------------------
// types
enum
@@ -35,11 +53,45 @@ enum
CursorResize,
};
+typedef union Arg Arg;
+typedef struct Button Button;
+typedef struct Key Key;
typedef struct Keyboard Keyboard;
typedef struct Client Client;
+typedef struct Layout Layout;
typedef struct Monitor Monitor;
typedef struct Server Server;
+struct Rectangle
+{
+ int x, y;
+ int w, h;
+};
+
+union Arg
+{
+ int i;
+ uint ui;
+ float f;
+ void *v;
+};
+
+struct Key
+{
+ uint modifier;
+ xkb_keysym_t sym;
+ void (*action)(Arg *);
+ Arg arg;
+};
+
+struct Button
+{
+ uint mod;
+ uint button;
+ void (*func)(const Arg *);
+ const Arg arg;
+};
+
struct Keyboard
{
struct wl_list link;
@@ -47,21 +99,41 @@ struct Keyboard
struct {
struct wl_listener press;
struct wl_listener modify;
+ struct wl_listener destroy;
} event;
};
struct Client
{
struct wl_list link;
+ struct wl_list stack;
+
struct wlr_xdg_surface *xdg;
+
struct {
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener request_move;
+ struct wl_listener request_title;
struct wl_listener request_resize;
+ struct wl_listener request_fullscreen;
} event;
- int x, y, mapped;
+
+ struct wlr_box geo, oldgeo;
+
+ uint tags;
+ int border : 4;
+ int ismapped : 1;
+ int isfloating : 1;
+ int isurgent : 1;
+ int isfullscreen : 1;
+};
+
+struct Layout
+{
+ char *symbol;
+ void (*arrange)(Monitor *);
};
struct Monitor
@@ -70,20 +142,45 @@ struct Monitor
struct wlr_output *output;
struct {
struct wl_listener render;
+ struct wl_listener destroy;
} event;
};
+struct MonitorRule
+{
+ char *name;
+ float mfact;
+ int nmaster;
+ float scale;
+ const Layout *lt;
+ enum wl_output_transform rr;
+ int x;
+ int y;
+};
+
+struct Rule
+{
+ char *id;
+ char *title;
+ uint tags;
+ int floating;
+ int monitor;
+};
+
struct Server
{
- struct wl_display *display;
- struct wlr_backend *backend;
- struct wlr_renderer *renderer;
+ struct wl_display *display;
+ struct wlr_backend *backend;
+ struct wlr_renderer *renderer;
+ struct wlr_presentation *present;
struct {
struct wlr_xdg_shell *xdg;
} shell;
struct wl_list clients;
+ struct wl_list stack;
+ Client *selected;
struct {
Client *client;
@@ -95,7 +192,7 @@ struct Server
struct {
struct wlr_output_layout *layout;
struct wl_list list;
- } output;
+ } monitor;
struct {
struct wlr_cursor *dot;
@@ -109,9 +206,10 @@ struct Server
} input;
struct {
- struct wl_listener make_output;
struct wl_listener make_input;
+ struct wl_listener make_monitor;
struct wl_listener make_xdg_surface;
+ struct wl_listener make_layer_surface;
struct wl_listener cursor_move;
struct wl_listener cursor_move_abs;
@@ -129,8 +227,11 @@ extern struct Server server;
// -----------------------------------------------------------------------
// functions
+/* util.c */
+void scale_box(struct wlr_box *, float);
+
/* output.c */
-void make_output(struct wl_listener *, void *);
+void make_monitor(struct wl_listener *, void *);
/* xdg.c */
void make_xdg_surface(struct wl_listener *, void *);
@@ -149,6 +250,10 @@ void request_set_selection(struct wl_listener *, void *);
/* client.c */
void focus(Client *client, struct wlr_surface *new);
-Client* clientat(double, double, struct wlr_surface **, double *, double *);
-int clienthas(Client *, double, double, struct wlr_surface **, double *, double *);
+Client* client_at(double, double, struct wlr_surface **, double *, double *);
+int client_has(Client *, double, double, struct wlr_surface **, double *, double *);
void setinteractive(Client *client, int mode, uint32 edges);
+
+#define CONFIG(a,b,...) extern a cfg·##b
+#include "config.h"
+#undef CONFIG
diff --git a/sys/cmd/wm/xdg.c b/sys/cmd/wm/xdg.c
index 3978cbf..0ff7c0a 100644
--- a/sys/cmd/wm/xdg.c
+++ b/sys/cmd/wm/xdg.c
@@ -5,7 +5,14 @@ void
map(struct wl_listener *l, void *data)
{
Client *client = wl_container_of(l, client, event.map);
- client->mapped = true;
+ client->ismapped = true;
+
+ wl_list_insert(&server.clients, &client->link);
+ wl_list_insert(&server.stack, &client->stack);
+
+ wlr_xdg_surface_get_geometry(client->xdg, &client->geo);
+ client->geo.width += 2 * client->border;
+ client->geo.height += 2 * client->border;
focus(client, client->xdg->surface);
}
@@ -15,7 +22,10 @@ void
unmap(struct wl_listener *l, void *data)
{
Client *client = wl_container_of(l, client, event.unmap);
- client->mapped = false;
+ client->ismapped = false;
+
+ wl_list_remove(&client->link);
+ wl_list_remove(&client->stack);
}
static
@@ -23,7 +33,6 @@ void
destroy(struct wl_listener *l, void *data)
{
Client *client = wl_container_of(l, client, event.destroy);
- wl_list_remove(&client->link);
free(client);
}
@@ -37,6 +46,13 @@ request_move(struct wl_listener *l, void *data)
static
void
+request_title(struct wl_listener *l, void *data)
+{
+ Client *client = wl_container_of(l, client, event.request_title);
+}
+
+static
+void
request_resize(struct wl_listener *l, void *data)
{
struct wlr_xdg_toplevel_resize_event *event = data;
@@ -44,6 +60,14 @@ request_resize(struct wl_listener *l, void *data)
setinteractive(client, CursorResize, event->edges);
}
+static
+void
+request_fullscreen(struct wl_listener *l, void *data)
+{
+ Client *client = wl_container_of(l, client, event.request_fullscreen);
+ client->isfullscreen = 1;
+}
+
void
make_xdg_surface(struct wl_listener *l, void *data)
{
@@ -54,8 +78,9 @@ make_xdg_surface(struct wl_listener *l, void *data)
if(xdg->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
return;
- client = calloc(1, sizeof(*client));
+ client = xdg->surface->data = calloc(1, sizeof(*client));
client->xdg = xdg;
+ client->border = cfg·borderpixel;
client->event.map.notify = map;
wl_signal_add(&xdg->events.map, &client->event.map);
@@ -64,13 +89,13 @@ make_xdg_surface(struct wl_listener *l, void *data)
client->event.destroy.notify = destroy;
wl_signal_add(&xdg->events.destroy, &client->event.destroy);
- /* cotd */
toplevel = xdg->toplevel;
client->event.request_move.notify = request_move;
wl_signal_add(&toplevel->events.request_move, &client->event.request_move);
+ client->event.request_title.notify = request_title;
+ wl_signal_add(&toplevel->events.set_title, &client->event.request_title);
client->event.request_resize.notify = request_resize;
wl_signal_add(&toplevel->events.request_resize, &client->event.request_resize);
-
- /* Add it to the list of client. */
- wl_list_insert(&server.clients, &client->link);
+ client->event.request_fullscreen.notify = request_fullscreen;
+ wl_signal_add(&toplevel->events.request_fullscreen, &client->event.request_fullscreen);
}
diff --git a/vendor/sync b/vendor/sync
index cd3e040..96ae888 100755
--- a/vendor/sync
+++ b/vendor/sync
@@ -164,10 +164,21 @@ WLROOTS_TAG="0.14.1"
build_wlroots()
{
- git clone $WLROOTS wlroots
+ git clone $WLROOTS_URL
cd wlroots && git checkout $WLROOTS_TAG
- meson --prefix=$ROOT build/ && cd ninja -C build/
+ meson \
+ --prefix=$ROOT \
+ --includedir=include/vendor \
+ --libdir=lib/vendor \
+ -Ddefault_library=static \
+ build/ \
+ && ninja -C build/ \
+ && meson install -C build
+
+ mv $ROOT/lib/vendor/pkgconfig/* $ROOT/lib/pkgconfig
+ rm -rf $ROOT/lib/vendor/pkgconfig
+ cd $VENDOR
echo $WLROOTS_TAG > wlroots/build.tag
}
@@ -193,4 +204,5 @@ update nlopt $NLOPT_TAG
update musl $MUSL_TAG
update blas $BLAS_TAG
update zlib $ZLIB_TAG
+update wlroots $WLROOTS_TAG
# update glfw $GLFW_TAG