This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16-epplets.
View the commit online.
commit a85954ad53ae66b5fc1cfe1288fbe001b2a54733
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Dec 10 17:51:46 2023 +0100
comms: Some trivial changes
---
api/comms.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/api/comms.c b/api/comms.c
index d3baae9..609b95a 100644
--- a/api/comms.c
+++ b/api/comms.c
@@ -138,10 +138,16 @@ CommsSend(const char *buf, unsigned int len)
static Bool
ev_check(Display *d __UNUSED__, XEvent *ev, XPointer p __UNUSED__)
{
- if (((ev->type == ClientMessage) && (ev->xclient.window == my_win)) ||
- ((ev->type == DestroyNotify) &&
- (ev->xdestroywindow.window == comms_win)))
- return True;
+ if (ev->type == ClientMessage)
+ {
+ if (ev->xclient.window == my_win)
+ return True;
+ }
+ else if (ev->type == DestroyNotify)
+ {
+ if (ev->xdestroywindow.window == comms_win)
+ return True;
+ }
return False;
}
@@ -151,13 +157,20 @@ CommsWaitForMessage(void)
XEvent ev;
char *msg = NULL;
- while ((!msg) && (comms_win))
+ for (;;)
{
XIfEvent(disp, &ev, ev_check, NULL);
if (ev.type == DestroyNotify)
+ {
comms_win = 0;
+ break;
+ }
else
+ {
msg = CommsHandleClientMessage(&ev);
+ if (msg)
+ break;
+ }
}
return msg;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.