summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/xcommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'sesman/chansrv/xcommon.c')
-rw-r--r--sesman/chansrv/xcommon.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/sesman/chansrv/xcommon.c b/sesman/chansrv/xcommon.c
index 286b50df..c5a91cae 100644
--- a/sesman/chansrv/xcommon.c
+++ b/sesman/chansrv/xcommon.c
@@ -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))
{
- //LOG(10, ("xcommon_get_wait_objs: nothing to do"));
return 0;
}
-
lcount = *count;
objs[lcount] = g_x_wait_obj;
lcount++;
@@ -148,38 +146,24 @@ int APP_CC
xcommon_check_wait_objs(void)
{
XEvent xevent;
- //int time_diff;
int clip_rv;
int rail_rv;
if ((!g_clip_up) && (!g_rail_up))
{
- //LOG(10, ("xcommon_check_wait_objs: nothing to do"));
return 0;
}
-
- if (g_is_wait_obj_set(g_x_wait_obj))
+ while (XPending(g_display) > 0)
{
- 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 */
- LOGM((LOG_LEVEL_ERROR, "xcommon_check_wait_objs: sck closed"));
- 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));
- }
+ LOG(10, ("xcommon_check_wait_objs unknown xevent type %d",
+ xevent.type));
}
}
-
return 0;
}