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

Theme integration jammy #198

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Conversation

wash2
Copy link
Contributor

@wash2 wash2 commented Oct 16, 2023

No description provided.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

I am much more happy with this draft, that looks really good. :)

Would you mind to rebase this on top of #194? That should actually simplify the code in shell/workspace.rs a bit, since you don't need the theme any more for maximizing/fullscreening (I think) and I hope I can merge that PR soon anyway. (If not we can still merge this into the branch and have me maintain it.)

src/shell/layout/tiling/mod.rs Outdated Show resolved Hide resolved
src/utils/iced.rs Outdated Show resolved Hide resolved
@wash2
Copy link
Contributor Author

wash2 commented Oct 17, 2023

Ok, I'll rebase on #194 today

refactor: only apply updates if there is a change in the theme

refactor: include theme in state

cleanup: theme integration
@wash2 wash2 force-pushed the theme-integration-2_jammy branch from fb5382a to ca8bdb3 Compare October 17, 2023 18:16
renderer,
age,
&elements,
crate::theme::clear_color(state.theme.cosmic()),
Copy link
Member

Choose a reason for hiding this comment

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

Testing an implementation of ext-session-lock, I noticed if I passed a different color to damage_tracker.render_output when the session lock was enabled, it ended up flickering between that and the previous color. The damage tracker I guess doesn't automatically recognize a change to the clear color as damage.

So I think to change clear_color dynamically without possible damage tracking issues, Smithay or cosmic-comp may need some change here to mark everything as damaged when this changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I can make the clear color static for now.

}
}

pub fn watch_theme(handle: LoopHandle<'_, State>) -> Result<(), cosmic_config::Error> {
Copy link
Member

Choose a reason for hiding this comment

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

Hm. We could use ConfigWatchSource from libcosmic here, but I guess that would mean 3 channels and calloop sources instead of 1...

I guess we end up spawning a thread here for each watch call? Probably the overhead doesn't matter that much.

So that should be fine for now, though it would be nice to figure out how to use epoll+inotify and kqueue to monitor for changes without threads and channels.

@Drakulix Drakulix changed the base branch from master_jammy to ws-refactor_jammy October 18, 2023 09:17
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

LGTM!

@wash2 wash2 marked this pull request as ready for review October 18, 2023 13:45
@Drakulix Drakulix merged commit cff4340 into ws-refactor_jammy Oct 18, 2023
1 check passed
@jackpot51 jackpot51 deleted the theme-integration-2_jammy branch October 19, 2023 13:54
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.

3 participants