mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
action: add "Close" to close top-most view
This commit is contained in:
parent
9fa783e7b4
commit
eaed1a3cab
4 changed files with 9 additions and 2 deletions
|
|
@ -23,7 +23,10 @@ action(struct server *server, const char *action, const char *command)
|
|||
{
|
||||
if (!action)
|
||||
return;
|
||||
if (!strcasecmp(action, "Debug")) {
|
||||
if (!strcasecmp(action, "Close")) {
|
||||
struct view *view = topmost_mapped_view(server);
|
||||
view->impl->close(view);
|
||||
} else if (!strcasecmp(action, "Debug")) {
|
||||
/* nothing */
|
||||
} else if (!strcasecmp(action, "Execute")) {
|
||||
struct buf cmd;
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ has_mapped_view(struct wl_list *wl_list)
|
|||
return false;
|
||||
}
|
||||
|
||||
static struct view *
|
||||
struct view *
|
||||
topmost_mapped_view(struct server *server)
|
||||
{
|
||||
if (!has_mapped_view(&server->views)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue