Skip to content
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

Support for swaybg as a shell surface #450

Closed
wants to merge 2 commits into from
Closed

Conversation

ddevault
Copy link
Contributor

This is a lot of work for a small payoff - the mouse cursor is now
correctly rendered over the background.

Containers can now specify a custom arrange function which will be
called during arrange_windows instead of the usual path for that
container type. For backgrounds, the function sends it to the back and
sets its geometry to the size of the screen.

This requires some changes I'm not too happy with in arrange_windows
with respect to how containers figure out the arrangemnet of their
children (special cases are undesirable).

Also, if anyone runs a debug build as their actual WM, you should know
that I've made it so swaybg is invoked as ./bin/swaybg in debug builds
now.

This PR also includes a bunch of unrelated refactoring. This is a pretty
significant change and I can only test it under the x backend, so I'd
appreciate it if you kind folks would review+test it yourselves and
leave some +1s if you like it.

Also, first pull request, be nice 😉

This is a lot of work for a small payoff - the mouse cursor is now
correctly rendered over the background.

Containers can now specify a custom arrange function which will be
called during arrange_windows instead of the usual path for that
container type. For backgrounds, the function sends it to the back and
sets its geometry to the size of the screen.

This requires some changes I'm not too happy with in arrange_windows
with respect to how containers figure out the arrangemnet of their
children (special cases are undesirable).

Also, if anyone runs a debug build as their actual WM, you should know
that I've made it so swaybg is invoked as `./bin/swaybg` in debug builds
now.

This PR also includes a bunch of unrelated refactoring. This is a pretty
significant change and I can only test it under the x backend, so I'd
appreciate it if you kind folks would review+test it yourselves and
leave some 👍 if you like it.
@ddevault
Copy link
Contributor Author

After this is merged, I'm going to implement something similar for swaybar so we can get the pointer (and pointer events) over it as well.

@ddevault
Copy link
Contributor Author

Known issue - fullscreening a view now renders swaybar on top of it. I leave this as an exercise for another contributor to fix.

@mikkeloscar
Copy link
Collaborator

You can close the background with the kill command if no other windows are open.

@mikkeloscar
Copy link
Collaborator

Background also only seem to appear on the first workspace.

  • Open sway, and see background
  • Switch to workspace 2, no background.

@ddevault
Copy link
Contributor Author

Hmm, that makes sense. I was considering a different strategy for this feature that I think I'm going to end up going with to fix that.

@Cloudef
Copy link

Cloudef commented Jan 23, 2016

The recent commits in wlc allow you to now turn any surface into wlc_view https://github.com/Cloudef/wlc/blob/master/include/wlc/wlc-wayland.h#L41
So you don't have to give the background "desktop-like" role such as xdg-shell-surface or wl_shell_surface.

@ddevault ddevault mentioned this pull request Feb 11, 2016
19 tasks
@mikkeloscar
Copy link
Collaborator

@SirCmpwn what's your ideas for this? I wouldn't mind having a crack at fixing this, but if you have some different strategy in mind, then I won't mess with this.

@ddevault
Copy link
Contributor Author

We need to support unmanaged views that live on outputs rather than workspaces. I'd start from scratch here tbh.

@ddevault
Copy link
Contributor Author

And it would also be better to use a custom role and use wlc_convert_to_view or whatever it's called instead of using a shell surface.

@mikkeloscar mikkeloscar mentioned this pull request Apr 2, 2016
81 tasks
@ddevault ddevault closed this Jun 10, 2016
@ddevault
Copy link
Contributor Author

Will reattempt this from scratch when the time comes.

@ddevault ddevault deleted the bg-as-shell-surface branch June 10, 2016 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants