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

Draw shadows or borders around concept frame decorations #162

Closed
kchibisov opened this issue Nov 9, 2020 · 7 comments
Closed

Draw shadows or borders around concept frame decorations #162

kchibisov opened this issue Nov 9, 2020 · 7 comments

Comments

@kchibisov
Copy link
Member

Having 2 sctk windows one over another could become challenging identify the where one window ends and other starts, since there's neither border nor shadows. GTK users shadows for such thing for example.

It's very noticeable with alacritty , which window is just one solid colored rectangle.

picture

@valpackett
Copy link

Looks like subsurfaces with buffers are currently allocated for the border, even though nothing is drawn there. (These helped uncover a fun bug in Wayfire, hehe.)

When shadows/borders are implemented, if the application is able to turn them off: the subsurfaces should not be created if they won't be drawn and only the title bar will be.

Ideally they should be deallocated when fullscreened too?

if self.hidden || inner.fullscreened {

(btw, I hope "fullscreened" here includes "tiled")

@kchibisov
Copy link
Member Author

kchibisov commented Nov 12, 2020

@myfreeweb subsurfaces are not presented when you do set_hidden(true) on the window

fn set_hidden(&mut self, hidden: bool) {

@valpackett
Copy link

No, I mean, not when everything is hidden, but when the title bar is drawn but not the borders.

@kchibisov
Copy link
Member Author

Yeah, I think they should be removed entire for fullscreen and other states properly as well, will require some refactoring.

@kchibisov
Copy link
Member Author

@myfreeweb the issue you're talking about is #105

@elinorbgr
Copy link
Member

@myfreeweb these transparent subsurfaces are necessary and need to exist, as they serve to receive pointer input to allow the user to start an interactive resize of the window, so we need to draw them even if their content is empty (unless the window is tiled, as @kchibisov noted).

@elinorbgr
Copy link
Member

Following #183, the decorations provided in SCTK are explicitly FallbackFrame, a minimalist set of decorations that ensure usability of the window but makes no attempt at particular visual quality. Users of SCTK are invited to create their own implementation of the Frame trait fitting their needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants