mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
[wip] close layer popups
This commit is contained in:
parent
216a83c1f9
commit
83da9672bd
1 changed files with 19 additions and 0 deletions
|
|
@ -55,6 +55,24 @@ desktop_arrange_all_views(struct server *server)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
close_all_layer_popups(struct server *server)
|
||||||
|
{
|
||||||
|
struct output *output;
|
||||||
|
wl_list_for_each(output, &server->outputs, link) {
|
||||||
|
struct wlr_scene_node *node;
|
||||||
|
wl_list_for_each(node, &output->layer_popup_tree->children, link) {
|
||||||
|
struct node_descriptor *desc = node->data;
|
||||||
|
if (desc->type != LAB_NODE_DESC_LAYER_POPUP) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
struct lab_layer_popup *popup;
|
||||||
|
popup = node_layer_popup_from_node(node);
|
||||||
|
// popup_handle_destroy(&popup->destroy, popup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
close_all_popups(struct server *server)
|
close_all_popups(struct server *server)
|
||||||
{
|
{
|
||||||
|
|
@ -67,6 +85,7 @@ close_all_popups(struct server *server)
|
||||||
void
|
void
|
||||||
desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
desktop_focus_and_activate_view(struct seat *seat, struct view *view)
|
||||||
{
|
{
|
||||||
|
close_all_layer_popups(seat->server);
|
||||||
if (!view) {
|
if (!view) {
|
||||||
close_all_popups(seat->server);
|
close_all_popups(seat->server);
|
||||||
seat_focus_surface(seat, NULL);
|
seat_focus_surface(seat, NULL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue