mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-17 19:38:08 +02:00
test: make the peck_dispatch_until_stable() a macro
This way we can insert the line number for easier debugging Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c72f27b4c2
commit
4de3380a88
2 changed files with 7 additions and 4 deletions
|
|
@ -401,18 +401,18 @@ peck_dispatch_ei(struct peck *peck)
|
|||
}
|
||||
|
||||
void
|
||||
peck_dispatch_until_stable(struct peck *peck)
|
||||
_peck_dispatch_until_stable(struct peck *peck, int lineno)
|
||||
{
|
||||
bool eis, ei;
|
||||
|
||||
log_debug(peck, "dispatching until stable state >>>>>\n");
|
||||
log_debug(peck, "dispatching until stable state at line %d >>>>>\n", lineno);
|
||||
|
||||
do {
|
||||
eis = peck_dispatch_eis(peck);
|
||||
ei = peck_dispatch_ei(peck);
|
||||
} while (ei || eis);
|
||||
|
||||
log_debug(peck, "<<<<<\n");
|
||||
log_debug(peck, "<<<<< stable at %d\n", lineno);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -149,7 +149,10 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct peck*, peck_unref);
|
|||
* pending that are not processed by the current behaviors.
|
||||
*/
|
||||
void
|
||||
peck_dispatch_until_stable(struct peck *peck);
|
||||
_peck_dispatch_until_stable(struct peck *peck, int lineno);
|
||||
|
||||
#define peck_dispatch_until_stable(_p) \
|
||||
_peck_dispatch_until_stable((_p), __LINE__)
|
||||
|
||||
/**
|
||||
* Discard all pending events.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue