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

Rebase cursor on layer rearrange #3567

Closed
wants to merge 1 commit into from

Conversation

cedws
Copy link
Contributor

@cedws cedws commented Feb 4, 2019

Closes #3080.

I'm not sure if this is the correct way of doing it.

@emersion
Copy link
Member

emersion commented Feb 4, 2019

Maybe we should just commit a transaction in this case?

@RyanDwyer Thoughts?

@RyanDwyer
Copy link
Member

While this works, it can be wasteful because there's probably other code somewhere that arranges layers and calls cursor_rebase itself. This commit would cause it to be rebased twice in this case.

I'd prefer it to be rebased from handle_layer_shell_surface.

@emersion
Copy link
Member

emersion commented Feb 4, 2019

What if a layer surface is resized? We need to rebase in this case too.

(I think we want to detect when we need to re-arrange layers, instead of doing it at every single commit.)

@cedws
Copy link
Contributor Author

cedws commented Feb 5, 2019

Could you distil what I need to do? I can move the cursor_rebase code into handle_layer_shell_surface, but if you're asking me to detect when we need to re-arrange layers, I don't know how that would be done.

@emersion
Copy link
Member

emersion commented Feb 8, 2019

detect when we need to re-arrange layers

Right now we re-arrange layer surfaces at each commit, even if they still keep the same size. This is unnecessary.

For this PR we could probably just rebase the cursor in handle_layer_shell_surface, which is necessary anyway. Not re-arranging when a layer surface doesn't resize is a follow-up issue.

@emersion emersion changed the title Rebase cursor on layer rearrange. [WIP] Rebase cursor on layer rearrange Feb 10, 2019
@cedws
Copy link
Contributor Author

cedws commented Feb 10, 2019

I tried moving it into handle_layer_shell_surface, but that doesn't seem to fix the case I'm testing swaywm/swaylock#32 (comment).

@emersion
Copy link
Member

Superseded by #3665

@emersion emersion closed this Feb 12, 2019
@cedws cedws deleted the feature/ArrangeRebaseCursor branch February 12, 2019 22:43
@cedws cedws changed the title [WIP] Rebase cursor on layer rearrange Rebase cursor on layer rearrange Feb 15, 2019
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