"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "misc.c" between
xterm-363.tgz and xterm-364.tgz

About: xterm is a terminal emulator for X with ISO/ANSI color and vt220 enhancements.

misc.c  (xterm-363.tgz):misc.c  (xterm-364.tgz)
/* $XTermId: misc.c,v 1.965 2020/12/23 00:21:44 tom Exp $ */ /* $XTermId: misc.c,v 1.966 2021/01/22 00:49:09 tom Exp $ */
/* /*
* Copyright 1999-2019,2020 by Thomas E. Dickey * Copyright 1999-2020,2021 by Thomas E. Dickey
* *
* All Rights Reserved * All Rights Reserved
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the * copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including * "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, * without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to * distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to * permit persons to whom the Software is furnished to do so, subject to
* the following conditions: * the following conditions:
skipping to change at line 487 skipping to change at line 487
if (!merge_this) { if (!merge_this) {
TRACE(("pending Configure...skipped\n")); TRACE(("pending Configure...skipped\n"));
XtDispatchEvent(target); XtDispatchEvent(target);
} }
*target = next_event; *target = next_event;
} }
XtDispatchEvent(target); XtDispatchEvent(target);
return XtAppPending(app_con); return XtAppPending(app_con);
} }
#define SAME(a,b,name) ((a)->xbutton.name == (b)->xbutton.name)
#define SameButtonEvent(a,b) ( \
SAME(a,b,type) && \
SAME(a,b,serial) && \
SAME(a,b,send_event) && \
SAME(a,b,display) && \
SAME(a,b,window) && \
SAME(a,b,root) && \
SAME(a,b,subwindow) && \
SAME(a,b,time) && \
SAME(a,b,x) && \
SAME(a,b,y) && \
SAME(a,b,x_root) && \
SAME(a,b,y_root) && \
SAME(a,b,state) && \
SAME(a,b,button) && \
SAME(a,b,same_screen))
/* /*
* Work around a bug in the X mouse code, which delivers duplicate events. * Work around a bug in the X mouse code, which delivers duplicate events.
*/ */
static XtInputMask static XtInputMask
mergeButtonEvents(XEvent *target) mergeButtonEvents(XEvent *target)
{ {
XEvent next_event; XEvent next_event;
XButtonEvent *p; XButtonEvent *p;
XtAppNextEvent(app_con, target); XtAppNextEvent(app_con, target);
p = (XButtonEvent *) target; p = (XButtonEvent *) target;
if (XtAppPending(app_con) if (XtAppPending(app_con)
&& XtAppPeekEvent(app_con, &next_event) && XtAppPeekEvent(app_con, &next_event)
&& !memcmp(target, &next_event, sizeof(XButtonEvent))) { && SameButtonEvent(target, &next_event)) {
Boolean merge_this = False; Boolean merge_this = False;
XButtonEvent *q = (XButtonEvent *) (&next_event); XButtonEvent *q = (XButtonEvent *) (&next_event);
XtAppNextEvent(app_con, &next_event); XtAppNextEvent(app_con, &next_event);
TRACE_EVENT("pending", &next_event, (String *) 0, 0); TRACE_EVENT("pending", &next_event, (String *) 0, 0);
if (p->window == q->window) { if (p->window == q->window) {
TRACE(("pending ButtonEvent...merged\n")); TRACE(("pending ButtonEvent...merged\n"));
merge_this = True; merge_this = True;
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)