Open dstric-aqueduct opened 4 months ago
I have an issue that may or may not be related. I hadn't posted my issue yet since I was trying to determine if it was something I was doing wrong first (since I'm manually creating the "title bar").
In Tomotroid on my frameless window with manually recreated title bar. When clicking on the Title bar (say to move the window) the active timer pauses. As soon as you release the title bar it starts again.
I only observe this issue on Windows, in both Win 10 and Win 11, release and debug builds. This issue does not occur on Linux (under X11 or Wayland)
Thanks for filling a bug
I can provide a movie of the issue if that's helpful.
Yes please, that'd be helpfull
Hi Olivier -
Here's a link to a video of the issue: https://youtu.be/C1vquIm46DA
I couldn't capture the title bar in the video; the displays stop updating immediately after the right click on the title bar (this is Windows 10). Double clicking to make the window full screen restarts the updates.
After doing a quick look back at my issue I'm not sure it's related. As already mentioned I'm manually recreating a "title bar", but also after checking again the timer does not stop when I click on the title bar but only when I start moving the window.
If you feel it could be relevant I've captured some videos, if not I can keep digging into the issue on my end and perhaps open another issue. In the Linux video you can see the timer never stops. In Windows I've included a mouse capture overlay you can see when I click the title bar the timer keeps running, but as soon as I start moving the window the timer pauses.
https://github.com/user-attachments/assets/e65b7c98-9ad8-454d-8805-ad9f05cac55d
https://github.com/user-attachments/assets/291b31ec-d7f1-428b-a2aa-394ffd189426
So I don't want to upload while tethering so I'll have to come back and upload the code to Github and some videos later. But I now have a small sample app that demonstrates both the right click on the tool bar as well as left click and dragging the window using a normally framed window. So it would appear that perhaps these issues are related and not something I'm doing to move my frameless window around.
I haven't had a chance to take a video yet. I've only had a chance to test this on Windows 11, not 10 yet, but this repo is a minimum example that demonstrates the issue @dstric-aqueduct and I are both having.
If I get a chance I can try and dig into it more later, and upload some videos. in the mean time here is the repo: https://github.com/Vadoola/win_slint_event_loop_issue
I have a similar problem, and from what I can see the event loop hangs from moving the window, drag resizing or right clicking the title bar, just anything that has to do with the Windows window manager in general.
This seems to be a bug in winit: https://github.com/rust-windowing/winit/issues/3272
<-- Please mention your platform and the programming language you are using Slint with -->
Windows x86-64 with Rust
<-- For bugs, please give steps on how to reproduce. What is the expected behavior and what do you see instead. -->
Right clicking on the Window title bar seems to pause the event loop. Maximizing the window by making it full screen restarts the loop and updates resume.
We followed the bridge pattern from an example app to handle updating a global parameter:
Relevant part of worker.rs update logic.
I can provide a movie of the issue if that's helpful.
Finally, thank you for this wonderful framework!