Split main() up by adding parseArgs() and run()
parseArgs() contains all of the argument parsing logic in a single fn. run() handles the event loop. To work with the bar, I had to re-write the loop to use polling similar to the loop in `beanclock` instead of just `while (true) dispatch`.
This commit is contained in:
parent
40088b4ab6
commit
5501ccbe26
3 changed files with 125 additions and 48 deletions
|
|
@ -107,7 +107,6 @@ pub fn destroy(libinput_device: *LibinputDevice) void {
|
|||
fn riverLibinputDeviceV1Listener(river_libinput_device_v1: *river.LibinputDeviceV1, event: river.LibinputDeviceV1.Event, libinput_device: *LibinputDevice) void {
|
||||
assert(libinput_device.river_libinput_device_v1 == river_libinput_device_v1);
|
||||
const im = libinput_device.context.im;
|
||||
log.debug("bwbuhse: {s} for {d}", .{ @tagName(event), river_libinput_device_v1.getId() });
|
||||
switch (event) {
|
||||
.removed => {
|
||||
river_libinput_device_v1.destroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue