-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
core: improve dynamic output handling #386
Conversation
This is needed, because when a new monitor is added via `onGlobal` the order of the events is not guaranteed. Meaning that render for a particular monitor might get called before a `CSessionLockSurface` for that monitor exists.
prolly.
hl quirk.
hl bug. |
Idk how dynamic dma frames can work. I think it might be better to just not support dynamic dma frames at all. But if one for a stringPort already exists, check if the dimensions match the ones of the new output. Otherwise fall back to the background color. But maybe you have an idea how to make it work properly? |
right, you're right. Would need an extension or something. Fair. Let's not. |
… of in onGlobalRemoved" This reverts commit 405aa42. Because of destruction order, it is safer to do it in `onGlobalRemoved`.
…d:path=screenshot
Alright done. What we don't support yet is dynamically updating widgets, when mode/scale of a monitor changes for some reason. I guess we could destroy the widgets in that case and let them be recreated. But thats for another mr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
I reproduced some crashes with the lid switching the internal monitor on and off.
That is because the session lock surface is getting created via
handleDone
for a new output.Even if a full display roundtrip is done, some events might arrive earlier than the output
done
event causing a crash because thesessionLockSurface
pointer is null. Checking for thesessionLockSurface
pointer fixes that. Other option would be to only add dynamic outputs to them_vOutputs
vector when the sessionLockSurface already existsThen I noticed that the widgets for a surface are not removed, when it is destroyed (I think that caused #337). Sometimes the new
sessionLockSurface
happens to be the same pointer as the original one. And because the widgets map is keyed by those pointers it will reuse the widgets leading to some weird stuff.Stuff that is still to be investigated:
Closes #337
Probably Closes #117