fix: don't call the callback synchronously on watcher init
This makes `xev.TtyWatcher` behave according to my expectations: namely that the callback will only file after the function which registers it has returned.
This commit is contained in:
parent
c213919849
commit
9c2d18d5a2
1 changed files with 0 additions and 2 deletions
|
@ -99,8 +99,6 @@ pub fn TtyWatcher(comptime Userdata: type) type {
|
|||
.callback = Self.signalCallback,
|
||||
};
|
||||
try Tty.notifyWinsize(handler);
|
||||
const winsize = try Tty.getWinsize(self.tty.fd);
|
||||
_ = self.callback(self.ud, loop, self, .{ .winsize = winsize });
|
||||
}
|
||||
|
||||
fn signalCallback(ptr: *anyopaque) void {
|
||||
|
|
Loading…
Reference in a new issue