summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/xcommon.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-10-31 10:04:33 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-10-31 10:04:33 -0700
commit45bcd67fb61de38b8c69514fe8c3bba91b990701 (patch)
tree5c4cced4a3caf3286931a7b152aa322d07507653 /sesman/chansrv/xcommon.c
parent8b802191ceedd85957d2650c2d2397d9b3e85f6c (diff)
downloadxrdp-proprietary-45bcd67fb61de38b8c69514fe8c3bba91b990701.tar.gz
xrdp-proprietary-45bcd67fb61de38b8c69514fe8c3bba91b990701.zip
chansrv: fix for event processing
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;
}