XCloseDisplay 挂起
我正在开发一个小型的自写窗口管理器,该项目刚刚开始,只有几行代码与X服务器通信。问题出现在退出时:调用 XCloseDisplay 时程序挂起。
测试时没有运行窗口管理器,程序只是初始化一些功能,获取屏幕和可用窗口,在默认根上调用 XSelectEvent 并打印出检索到的窗口数。然后它清理其内部数据并尝试关闭与 X 服务器的连接。
那时它会挂起直到被杀死。
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. The problem comes at exit: the program hangs when XCloseDisplay is called.
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. Then it cleans it's internal data and tries to close the connection with the X server.
At that point it hangs until killed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了。问题不在于 X11,而在于编译过程。一些标头已更新,但源文件未更新。如果您遇到这样的问题,请记住删除目标文件并重新构建整个应用程序。
Solved. The problem was not with X11 but with the compilation process. 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.