Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add move_to_top and top_most_layer #1242

Merged
merged 5 commits into from
Feb 15, 2022
Merged

Add move_to_top and top_most_layer #1242

merged 5 commits into from
Feb 15, 2022

Conversation

Friz64
Copy link
Contributor

@Friz64 Friz64 commented Feb 12, 2022

In my application, i want to be able to get and set which window is on the top. This adds a public API for that. Is this the right approach?

@@ -889,6 +889,16 @@ impl Context {
self.memory().layer_id_at(pos, resize_grab_radius_side)
}

/// Top-most layer.
Copy link
Contributor

@Mingun Mingun Feb 12, 2022

Choose a reason for hiding this comment

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

I would like to see an explanation, what is the top-most layer instead of this useless doc. The doc should answer to question when I should use it? What is its features? What this layer is contain?

Copy link
Contributor Author

@Friz64 Friz64 Feb 12, 2022

Choose a reason for hiding this comment

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

What about this?

Returns the id of the top-most area. When an area is clicked on or interacted with, it will be moved above all other areas.

My personal use case is synchronizing the selected item in a list of open windows with the window that last got focus. This is a very specific use case, but it wasn't possible to do before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pushed a commit changing it to

The overall top-most layer. When an area is clicked on or interacted with, it is moved above all other areas.

@@ -329,6 +329,11 @@ impl Memory {
self.areas.layer_id_at(pos, resize_interact_radius_side)
}

/// Top-most layer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@emilk emilk merged commit c8c871f into emilk:master Feb 15, 2022
@Friz64 Friz64 deleted the layer-top branch February 15, 2022 17:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants