-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一个页面带有gif控件,关闭这个页面时,有时在屏幕留下残影 #857
Comments
为什么打开之后马上就关闭? |
为了篇幅,我把中间部分程序省掉了,你可以在中间加一个usleep 500ms,但当你连续点击多次按钮,短时间多次触发该事件,就有可能在屏幕上留下残影。我发现这种情况下ret = window_close(busying_win)的ret为0,说明界面是关闭成功了。那么这个残影是怎么导致的?
|
PC上能重现不,如果能重现,发给我看看。如果不能,你在微信群里问下。 |
你指的是发个短视频给你看看? |
160ff9d42d43ce4b199abc8317a16f58.online-video-cutter.com.1.mp4 |
你帖子上面的 popup 的背景被设置为 #00000000,这个就是透明的意思啊,你这个白色窗口又是什么意思呢?你把上面的 popup 的背景色设为 #FFFFFFFF 吗? |
你好,可不可以通过先销毁子控件(比如GIF),再关闭界面的方式消除残影问题?如果是,我发现widget destroy这方面的函数好像都是异步销毁(idle add函数),请问有没有同步销毁控件的函数 |
重点不在控件上面,是机制上面: |
我在一个项目上应用gif控件,一个xml文件
然后设计一个按钮,点击它触发一个事件, 就是先打开这个界面,然后又关闭, 如下图程序所示
busying_win = window_open("ui_busying_page"); window_close(busying_win);
但这样会产生一个现象,快速点击会在屏幕留下残影,如下图所示》转圈圈
经分析源码发现可能是异步导致,推测是,关闭界面时没有及时销毁GIF控件,留下残影,然后修改代码如下图所示就没有出现上述情况
busying_win = window_open("ui_busying_page");
widget_destroy(gif),
usleep(20000),
window_close(busying_win);
现在我的问题是如果不用这个延迟usleep(20000),有什么办法解决
谢谢
The text was updated successfully, but these errors were encountered: