mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
Rewrite action handling to allow multiple actions at once
This commit is contained in:
parent
a54ce40e1c
commit
0b45cce648
12 changed files with 276 additions and 140 deletions
13
include/action.h
Normal file
13
include/action.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_ACTION_H
|
||||
#define __LABWC_ACTION_H
|
||||
|
||||
struct action {
|
||||
uint32_t type;
|
||||
char *arg;
|
||||
struct wl_list link;
|
||||
};
|
||||
|
||||
struct action *action_create(const char *action_str);
|
||||
|
||||
#endif
|
||||
|
|
@ -11,8 +11,7 @@ struct keybind {
|
|||
uint32_t modifiers;
|
||||
xkb_keysym_t *keysyms;
|
||||
size_t keysyms_len;
|
||||
char *action;
|
||||
char *command;
|
||||
struct wl_list actions;
|
||||
struct wl_list link;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ struct mousebind {
|
|||
|
||||
/* ex: doubleclick, press, drag */
|
||||
enum mouse_event mouse_event;
|
||||
const char *action;
|
||||
const char *command;
|
||||
struct wl_list actions;
|
||||
|
||||
struct wl_list link; /* rcxml::mousebinds */
|
||||
bool pressed_in_context; /* used in click events */
|
||||
|
|
@ -34,6 +33,5 @@ struct mousebind {
|
|||
enum mouse_event mousebind_event_from_str(const char *str);
|
||||
uint32_t mousebind_button_from_str(const char *str, uint32_t *modifiers);
|
||||
struct mousebind *mousebind_create(const char *context);
|
||||
struct mousebind *mousebind_create_from(struct mousebind *from, const char *context);
|
||||
|
||||
#endif /* __LABWC_MOUSEBIND_H */
|
||||
|
|
|
|||
|
|
@ -500,8 +500,8 @@ void server_init(struct server *server);
|
|||
void server_start(struct server *server);
|
||||
void server_finish(struct server *server);
|
||||
|
||||
void action(struct view *activator, struct server *server, const char *action,
|
||||
const char *command, uint32_t resize_edges);
|
||||
void action(struct view *activator, struct server *server,
|
||||
struct wl_list *actions, uint32_t resize_edges);
|
||||
|
||||
/* update onscreen display 'alt-tab' texture */
|
||||
void osd_update(struct server *server);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@
|
|||
#include <wlr/render/wlr_renderer.h>
|
||||
|
||||
struct menuitem {
|
||||
char *action;
|
||||
char *command;
|
||||
struct wl_list actions;
|
||||
struct menu *submenu;
|
||||
struct wlr_box box;
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue