meson.build: resolve deprecation warnings
Support static output again
This regressed a bit in 1a7c56a43d21903d78406aa7ac66bdccfa898222 where
the overall handling for dynamic feeds was improved. The examples in the
README no longer functioned as wayout exited immediately after EOF:
I re-added a static mode that does not exit after input ends. This is
the default if no --feed-* parameter is specified. For Sxmo we largely
rely on the feed modes, these remain they were before and there wayout
will exit when stdin finishes.
This patch also fixes some position issues for text that overflows the
box. Launching with a desired --width and --height is recommended.
Fix issues with disabling handle-signals
Disabling handle signals was causing compile errors, and it was trying
to poll the signalfd even though it wasn't set up.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
refactor reading stdin
Motivation: the desktop widget is consistently one minute behind in
sxmo, I believe this is the root cause.
If more than one line is available when poll returns, getline will only
read the first line and ignore the rest. Poll believes we have read all
of it and won't notify again.
This includes a handful of closely related changes:
* replace getline with read, this should fix the original problem
* --feed-delimiter now takes a regex, and doesn't match full line by
default. Note: this is a breaking change to get the old behavior -d
'^old param value$' can be used.
* exit if stdin receives eof, previously it would just stop reading it
* make sure to handle cases where multiple frames are read at once, or
the start of the next frame is read. Both should be very rare anyway
given wayout's intended use case.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Fix Wayland event flushing in event loop
Before this patch, the flush loop could get stuck.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
added some ackward compatible/flexible command line parameters
Even more cleanup and commenting things
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Do not update unrelated layer surface settings on configure event
Before this patch, wlclock would always update all layer surface settings on
every configure event. This is known to create a feedback loop with faulty
compositors (see https://github.com/swaywm/sway/pull/6709). While wlclock did
nothing wrong before, not updating these settings is more idiomatic.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
implemented --center parameter
no forced flushbuffer on timer events
rewrote command line parsing, got rid of getopts because of inconsistency between glibc/musl