Daniel Eklöf
e48d90ae12
bar/xcb: cleanup: don't try to free NULL resources
2019-02-07 11:51:26 +01:00
Daniel Eklöf
f71aaf9615
bar: call backend->cleanup() when backend->setup() fails
...
This makes it easier to implement proper cleanup in the backends, as
setup() doesn't have to clean up it's own mess upon failure.
2019-02-07 11:50:52 +01:00
Daniel Eklöf
0fc5778107
bar/wayland: wl_* APIs typically don't handle destroy(NULL)
2019-02-07 11:22:02 +01:00
Daniel Eklöf
a831490462
modules: fix strncpy calls to ensure strings are NULL-terminated
2019-02-06 18:10:06 +01:00
Daniel Eklöf
0e3866186f
plugin: for now, the defines *all* use the word PLUGIN
2019-02-06 18:09:48 +01:00
Daniel Eklöf
4a064ebfff
bar/wayland: fix includes
2019-02-06 18:04:32 +01:00
Daniel Eklöf
dbce871d27
module/i3: dynamically grow receive buffer when needed
2019-02-06 16:30:46 +01:00
Daniel Eklöf
ed7b6e20d3
cmake: add function that generates custom commands for wayland protocols
2019-02-06 16:13:24 +01:00
Daniel Eklöf
9383142858
cmake: manually run pkg-config --variable=pkgdatadir wayland-protocols
...
To get the path to the wayland protocol definitions, manually run
pkg-config with --variable=pkgdatadir.
Then use this instead of a hardcoded path into
/usr/share/wayland-protocols when defining the custom commands to
generate .c/.h files from the protocol XML definitions.
2019-02-06 16:01:18 +01:00
Daniel Eklöf
da062f26d5
cmake: remove hardcoded, local, path
2019-02-06 15:41:21 +01:00
Daniel Eklöf
70499654a3
module/i3: delay bar refresh until all received events have been processed
...
This fixes an issue where switching between empty workspaces (or one
empty, one non-empty) momentarily flashed two workspaces.
I.e. we immediately rendered the new workspace, and then re-rendered
when the first workspace was destroyed.
2019-02-06 15:39:11 +01:00
Daniel Eklöf
6562cb61df
cmake: don't try to link againt xcb-errors when we didn't find it
2019-02-03 20:09:02 +01:00
Daniel Eklöf
63618b8fab
ci: no working wayland dev environment on CI
...
The docker image lacks wlroots.
2019-02-03 20:07:03 +01:00
Daniel Eklöf
727d7b343f
cmake: initial support for building wayland-only, or x11-only
2019-02-03 20:05:44 +01:00
Daniel Eklöf
f3b225adf7
make: let pkg_check_module() create targets
2019-02-03 19:27:03 +01:00
Daniel Eklöf
578c76326d
cmake: pull in wlr-layer-shell-unstable-v1 from wlroots git submodule
2019-02-03 19:12:58 +01:00
Daniel Eklöf
73c62e9797
bar/wayland: cleanup
2019-02-03 17:45:26 +01:00
Daniel Eklöf
38c87ad165
ci: nein
2019-02-03 17:35:29 +01:00
Daniel Eklöf
c7c378d844
ci: again
2019-02-03 17:34:15 +01:00
Daniel Eklöf
9ad7626b3f
ci: how about now?
2019-02-03 17:32:24 +01:00
Daniel Eklöf
92d165e7e6
ci: switch to alpine:edge, which has wlroots
2019-02-03 17:29:41 +01:00
Daniel Eklöf
29b57bcc48
bar/wayland: call on_mouse() directly from listeners
2019-02-03 15:28:32 +01:00
Daniel Eklöf
85a1940e47
bar/wayland: free XDG outputs, and manager, in cleanup()
2019-02-03 15:16:19 +01:00
Daniel Eklöf
c6fd99f005
bar/wayland: track XDG outputs, as this gets us the monitor identifiers
2019-02-03 15:10:26 +01:00
Daniel Eklöf
c226f9f0c8
bar/wayland: initial support for multiple monitors
...
We don't actually support multiple monitors, but now we at least track
the available monitors.
This also adds support for the BAR_BOTTOM location.
2019-02-03 13:55:21 +01:00
Daniel Eklöf
47ac57dd03
bar/wayland: cursor support
...
This implements backend.set_cursor().
2019-02-03 13:13:10 +01:00
Daniel Eklöf
130043a259
bar/wayland: comment out most of the debug logging
2019-02-03 12:21:42 +01:00
Daniel Eklöf
8e769b491a
module/i3: try SWAYSOCK before falling back to I3_SOCKET_PATH
2019-02-03 12:20:59 +01:00
Daniel Eklöf
ed8e17c6c9
wayland: mucho wip: initial sort-of-working wayland backend
...
Bar is drawn, though only TOP is supported atm. No
screen/display/output selection is possible yet. Mouse *click* works,
but not setting the cursor.
Lots of debug output, crappy code yada yada.
2019-02-03 11:08:53 +01:00
Daniel Eklöf
ff88d87ca8
cmake: build bar XCB backend as a (static) library
...
This allows us to remove the XCB dependencies from the main 'f00bar'
target.
2019-01-29 21:46:54 +01:00
Daniel Eklöf
ffa4448b3c
ci: build as much as possible
2019-01-29 21:39:16 +01:00
Daniel Eklöf
785fe8bb0c
main: poll() return value is unused in release builds
...
Because it's only used in an assert()
2019-01-29 21:38:21 +01:00
Daniel Eklöf
deb9105d3e
main: move xcb_init() call to bar's XCB backend
2019-01-29 21:37:38 +01:00
Daniel Eklöf
9239d4298c
main: drop xcb dependency
...
Handle program termination by a) using a signal handler to detect
e.g. ctrl-c, and b) listening on the abort_fd to detect when the bar
aborts (e.g. due to XCB disconnect, i.e. when the X server dies).
2019-01-29 21:35:38 +01:00
Daniel Eklöf
404a7a7dcd
bar: xcb: remove unneeded braces
2019-01-29 21:05:51 +01:00
Daniel Eklöf
7f1567c973
bar: do generic cursor stuff in bar, not in backend
2019-01-29 21:05:28 +01:00
Daniel Eklöf
0684aaaf95
bar: xcb: cleanup
2019-01-29 21:03:13 +01:00
Daniel Eklöf
4954479e11
bar: generic setup shouldn't be done by a backend
2019-01-29 21:02:10 +01:00
Daniel Eklöf
c2e7b1c507
bar: remove more includes that aren't needed anymore
2019-01-29 21:01:16 +01:00
Daniel Eklöf
36201e251e
bar: no xcb stuff needed directly by bar anymore
2019-01-29 21:00:27 +01:00
Daniel Eklöf
88daaf0ab7
bar: wip: define a 'backend' interface
...
Implement the current XCB backend in terms of this new interface.
2019-01-29 20:59:25 +01:00
Daniel Eklöf
f37dfbc727
module/mpd: free strdup:ed path string
2019-01-29 20:58:55 +01:00
Daniel Eklöf
2d104e4a7d
bar: break out 'private' struct definition to a header file
2019-01-29 20:20:11 +01:00
Daniel Eklöf
aa21991323
bar: move C file to subdirectory
2019-01-29 20:18:37 +01:00
Daniel Eklöf
f5aebc07ef
bar: break out all XCB specific code to separate functions
2019-01-29 20:09:07 +01:00
Daniel Eklöf
8d1afd027b
module/xkb: initialize indicators
...
This fixes a bug where we tried to free invalid indicator names.
2019-01-27 22:05:00 +01:00
Daniel Eklöf
452c4b6015
plugins: export a const function pointer interface struct
2019-01-26 18:32:04 +01:00
Daniel Eklöf
37266ae419
log: colorize console output only when stdout is a tty
2019-01-26 15:14:45 +01:00
Daniel Eklöf
4e03dca051
log: for now, only log errors and warnings to syslog
...
Eventually, this should probably be made configurable, and/or possible
to control through command line options.
2019-01-26 14:56:26 +01:00
Daniel Eklöf
a146bed317
Merge branch 'syslog'
2019-01-26 14:54:20 +01:00