X window

Type of XEvent

Keyboard events                | KeyPress, KeyRelease
Pointer events                 | ButtonPress, ButtonRelease, MotionNotify
Window crossing events         | EnterNotify, LeaveNotify
Input focus events             | FocusIn, FocusOut

参考资料:(X Window学习xlib—-X Event)[http://blog.csdn.net/unailbobo/article/details/3036618]

问题

如果仅仅是调整x window的位置,是不是没有数据发送出去?! ——添加DEBUG,只是调整位置,看是否有数据包发送

怎么给X window发送event????
关键点:xwin_process_events函数调用XNextEvent来从g_display中获取event事件,所以问题变为如何在g_display中加入我们想要的事件???
这种方式现在还没思路,改用直接调用rdp_send_input()函数来处理
现在需要保证前后发送的两个数据包依赖性要保证好,比如第一个操作是打开word,那么第二个操作必须等服务器那边发送回响应后才发送过去
关键问题:怎么设置响应时间?

如果单纯的从rdp_send_input发送数据(比如移动鼠标),那么返回数据后,客户端是否能显示正常?这点要验证!

Standard KeySym names are obtained from by removing the XK_ prefix from each name.

coding log

bool RECORD is define in rdesktop.c line:460

因为想读取的是二进制文件,所以要规定一个文件格式

xwin.c:2283: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘time_t’
xwin.c: In function ‘xwin_process_events’:
xwin.c:2379: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘KeySym’
xwin.c:2382: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘KeySym’
%x, (unsigned int) keysym
xwin.c:2432: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘time_t’

注意事项

自己定义的:FILE * record 需要用完后关闭

问题

直接设置timeout判断上一个动作是否完成不行,因为在上一个动作还在进行的时候,也有可能中途图像不变,这样虽然会timeout,但是上一个动作其实并没有完成!

A X Window Demo