-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add basic wlr-output-management support #263
Add basic wlr-output-management support #263
Conversation
This is now handled through wlr_output_management
d091a94
to
c6da86e
Compare
When disabling an output, we must avoid to set other parameters (scale, mode, etc.) as it will cause the error described in my first comment. Now, with a Wayland backend, we still observe an error but a kind of expected one: I have also tried with DRM backend. Disabling output is OK but re-enabling next is not yet very stable. |
c6da86e
to
208d830
Compare
Simply because I forgot Cage terminates when no more output is available. |
208d830
to
d137e8e
Compare
Right. With wlroots 0.16, only the DRM backend supports disabling outputs. With wlroots 0.17, all backends support disabling outputs. |
I have added commits (to be squashed if OK) to answer @emersion comments. |
Yeah, the changes you made LGTM. |
I'm still not super sure about "output: do not terminate when last output is destroyed". It sounds like this is useful mainly when running nested under the X11 and Wayland backends, to stop running when the last cage window is closed. |
04962af
to
ffe09e9
Compare
Squashed some commits and removed extra parentheses. |
I don't have done any tests with X11 backend for now. Below a short description of the issue I observed with terminate when last output available is destroyed:
|
It's fine, it should behave exactly just like the Wayland backend.
Closing windows should destroy the output, regardless of wlroots version.
Yeah. Maybe it would make sense to special-case Wayland and X11. |
As I understand it (and according to tests), in such a case, whatever the selected backend, Cage receives |
No, I'm talking about closing the wlroots Wayland/X11 backend window. The nested child process is not involved here. I don't think Cage ever sends a |
Come to think of it, maybe it would be better to not force-terminate when the wlroots Wayland/X11 backend window is closed by the user. Instead we could just relay the close request to the nested Wayland client. That way "do you want to save your work before closing?" kind of dialogs would work properly. But this requires some wlroots changes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3589 |
Ok, now I get it. I have just given it a try with Wayland backend and indeed, Cage is now running without any output available. Kind of weird 😅 . |
If you want to get this PR merged, maybe we can leave out that commit for now and fix it in a separate PR? |
Co-authored-by: Dima Krasner <[email protected]>
Check output list length before accessing previous or next item to avoid segfault.
ffe09e9
to
faccc2a
Compare
Just dropped the commit from this PR. |
Thanks! |
I have tried to resume work from @dimkr in PR #213.
wlr-randr --dryrun
)For the moment, I have only played with Wayland as backend.
I am still unsure about
current_mode
test, see discussion.Furthermore, trying to disable an output returns an error. I don't know if it specific to Wayland backend. Here are the logs from wlroots (0.16.2):