chansrv: fix for event processing
This commit is contained in:
parent
8b802191ce
commit
45bcd67fb6
@ -132,10 +132,8 @@ xcommon_get_wait_objs(tbus *objs, int *count, int *timeout)
|
|||||||
|
|
||||||
if (((!g_clip_up) && (!g_rail_up)) || (objs == 0) || (count == 0))
|
if (((!g_clip_up) && (!g_rail_up)) || (objs == 0) || (count == 0))
|
||||||
{
|
{
|
||||||
//LOG(10, ("xcommon_get_wait_objs: nothing to do"));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
lcount = *count;
|
lcount = *count;
|
||||||
objs[lcount] = g_x_wait_obj;
|
objs[lcount] = g_x_wait_obj;
|
||||||
lcount++;
|
lcount++;
|
||||||
@ -148,38 +146,24 @@ int APP_CC
|
|||||||
xcommon_check_wait_objs(void)
|
xcommon_check_wait_objs(void)
|
||||||
{
|
{
|
||||||
XEvent xevent;
|
XEvent xevent;
|
||||||
//int time_diff;
|
|
||||||
int clip_rv;
|
int clip_rv;
|
||||||
int rail_rv;
|
int rail_rv;
|
||||||
|
|
||||||
if ((!g_clip_up) && (!g_rail_up))
|
if ((!g_clip_up) && (!g_rail_up))
|
||||||
{
|
{
|
||||||
//LOG(10, ("xcommon_check_wait_objs: nothing to do"));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
while (XPending(g_display) > 0)
|
||||||
if (g_is_wait_obj_set(g_x_wait_obj))
|
|
||||||
{
|
{
|
||||||
if (XPending(g_display) < 1)
|
g_memset(&xevent, 0, sizeof(xevent));
|
||||||
|
XNextEvent(g_display, &xevent);
|
||||||
|
clip_rv = clipboard_xevent(&xevent);
|
||||||
|
rail_rv = rail_xevent(&xevent);
|
||||||
|
if ((clip_rv == 1) && (rail_rv == 1))
|
||||||
{
|
{
|
||||||
/* something is wrong, should not get here */
|
LOG(10, ("xcommon_check_wait_objs unknown xevent type %d",
|
||||||
LOGM((LOG_LEVEL_ERROR, "xcommon_check_wait_objs: sck closed"));
|
xevent.type));
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
while (XPending(g_display) > 0)
|
|
||||||
{
|
|
||||||
g_memset(&xevent, 0, sizeof(xevent));
|
|
||||||
XNextEvent(g_display, &xevent);
|
|
||||||
|
|
||||||
clip_rv = clipboard_xevent(&xevent);
|
|
||||||
rail_rv = rail_xevent(&xevent);
|
|
||||||
|
|
||||||
if ((clip_rv == 1) && (rail_rv == 1))
|
|
||||||
{
|
|
||||||
LOG(10, ("xcommon_check_wait_objs unknown xevent type %d", xevent.type));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user