mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
src/menu: Attach view to menu and use it when executing actions
This fixes #380
This commit is contained in:
parent
ca9226a7a6
commit
5a4c5de332
5 changed files with 63 additions and 30 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <xcb/xcb_icccm.h>
|
||||
#include "labwc.h"
|
||||
#include "ssd.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
|
|
@ -756,6 +757,12 @@ view_destroy(struct view *view)
|
|||
wlr_scene_node_set_enabled(&output->layer_tree[top]->node, true);
|
||||
}
|
||||
|
||||
/* If we spawned a window menu, close it */
|
||||
if (server->menu_current
|
||||
&& server->menu_current->triggered_by_view == view) {
|
||||
menu_close_root(server);
|
||||
}
|
||||
|
||||
/* Remove view from server->views */
|
||||
wl_list_remove(&view->link);
|
||||
free(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue