简体   繁体   English

XCloseDisplay挂起

[英]XCloseDisplay hangs

I'm working on a small self-written window manager, the project is at the very beginning and there are just a few lines of code communicating with the X server. 我正在使用一个小型的自行编写的窗口管理器,该项目处于初期,只有几行代码与X服务器通信。 The problem comes at exit: the program hangs when XCloseDisplay is called. 问题出在出口:调用XCloseDisplay时程序挂起。

There is no window manager running while testing, the program just initializes some features, gets the screens and the available windows, call XSelectEvent on the default root and prints out the number of windows retrieved. 测试期间没有运行窗口管理器,该程序只是初始化一些功能,获取屏幕和可用窗口,在默认根目录上调用XSelectEvent并打印出检索到的窗口数。 Then it cleans it's internal data and tries to close the connection with the X server. 然后,它清除内部数据并尝试关闭与X服务器的连接。

At that point it hangs until killed. 那时,它一直挂着直到被杀死。

Solved. 解决了。 The problem was not with X11 but with the compilation process. 问题不在于X11,而在于编译过程。 Some headers were updated but the source file were not. 一些标题已更新,但源文件未更新。 If you have problem like this, remember to delete your object files and build the whole application again. 如果遇到这样的问题,请记住删除目标文件,然后重新构建整个应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM