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

Allow overriding horizontal margins in criteria #74

Merged
merged 7 commits into from
Oct 14, 2018

Conversation

vilhalmer
Copy link
Collaborator

Fixes #48. As we had discussed at some point in the distant past, I had to remove the margin from around the layer surface for this.

I also unified the calls to zwlr_layer_surface_v1_set_size during send_frame. I couldn't find any situations where the early return when unconfigured actually happened, but if you had one in mind when you added it originally I can put it back.

@emersion
Copy link
Owner

I couldn't find any situations where the early return when unconfigured actually happened

This happens each time the height changes, ie. each time a notification is added or removed (except the first one).

render.c Outdated
if (state->config.anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT) {
offset_x = state->width - notif_width - style->margin.right;
}
else {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: } and else { on the same line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one style thing I can never adjust to :)

Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@emersion emersion merged commit ebd64de into emersion:master Oct 14, 2018
@emersion
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants