mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 07:18:06 +02:00
Change key/button grab bindings to take unsigned state
'state' here meaning 'is it up or down?', obviously. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
7ceeb7dd43
commit
da5b93c8d7
16 changed files with 24 additions and 23 deletions
|
|
@ -110,7 +110,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget,
|
button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct clickdot *clickdot = data;
|
struct clickdot *clickdot = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ panel_launcher_leave_handler(struct widget *widget,
|
||||||
static void
|
static void
|
||||||
panel_launcher_button_handler(struct widget *widget,
|
panel_launcher_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct panel_launcher *launcher;
|
struct panel_launcher *launcher;
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ panel_launcher_button_handler(struct widget *widget,
|
||||||
static void
|
static void
|
||||||
panel_button_handler(struct widget *widget,
|
panel_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct panel *panel = data;
|
struct panel *panel = data;
|
||||||
|
|
||||||
|
|
@ -481,7 +481,7 @@ unlock_dialog_redraw_handler(struct widget *widget, void *data)
|
||||||
static void
|
static void
|
||||||
unlock_dialog_button_handler(struct widget *widget,
|
unlock_dialog_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct unlock_dialog *dialog = data;
|
struct unlock_dialog *dialog = data;
|
||||||
struct desktop *desktop = dialog->desktop;
|
struct desktop *desktop = dialog->desktop;
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag,
|
||||||
static void
|
static void
|
||||||
dnd_button_handler(struct widget *widget,
|
dnd_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct dnd *dnd = data;
|
struct dnd *dnd = data;
|
||||||
int32_t x, y;
|
int32_t x, y;
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget, struct input *input, uint32_t time,
|
button_handler(struct widget *widget, struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
int32_t x, y;
|
int32_t x, y;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ motion_handler(struct widget *widget, struct input *input,
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget,
|
button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct flower *flower = data;
|
struct flower *flower = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ motion_handler(struct widget *widget, struct input *input,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget, struct input *input,
|
button_handler(struct widget *widget, struct input *input,
|
||||||
uint32_t time, int button, int state, void *data)
|
uint32_t time, int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct gears *gears = data;
|
struct gears *gears = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ show_menu(struct resizor *resizor, struct input *input, uint32_t time)
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget,
|
button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct resizor *resizor = data;
|
struct resizor *resizor = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ lockscreen_draw(struct widget *widget, void *data)
|
||||||
static void
|
static void
|
||||||
lockscreen_button_handler(struct widget *widget,
|
lockscreen_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct lockscreen *lockscreen = data;
|
struct lockscreen *lockscreen = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2213,7 +2213,7 @@ keyboard_focus_handler(struct window *window,
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget,
|
button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct terminal *terminal = data;
|
struct terminal *terminal = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ view_page_down(struct view *view)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
button_handler(struct widget *widget, struct input *input, uint32_t time,
|
button_handler(struct widget *widget, struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
{
|
{
|
||||||
struct view *view = data;
|
struct view *view = data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1220,7 +1220,7 @@ frame_motion_handler(struct widget *widget,
|
||||||
static void
|
static void
|
||||||
frame_button_handler(struct widget *widget,
|
frame_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct frame *frame = data;
|
struct frame *frame = data;
|
||||||
|
|
@ -2363,7 +2363,7 @@ menu_leave_handler(struct widget *widget, struct input *input, void *data)
|
||||||
static void
|
static void
|
||||||
menu_button_handler(struct widget *widget,
|
menu_button_handler(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data)
|
int button, uint32_t state, void *data)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct menu *menu = data;
|
struct menu *menu = data;
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,8 @@ typedef int (*widget_motion_handler_t)(struct widget *widget,
|
||||||
int32_t x, int32_t y, void *data);
|
int32_t x, int32_t y, void *data);
|
||||||
typedef void (*widget_button_handler_t)(struct widget *widget,
|
typedef void (*widget_button_handler_t)(struct widget *widget,
|
||||||
struct input *input, uint32_t time,
|
struct input *input, uint32_t time,
|
||||||
int button, int state, void *data);
|
int button, uint32_t state,
|
||||||
|
void *data);
|
||||||
|
|
||||||
struct window *
|
struct window *
|
||||||
window_create(struct display *display);
|
window_create(struct display *display);
|
||||||
|
|
|
||||||
|
|
@ -1604,7 +1604,7 @@ weston_surface_activate(struct weston_surface *surface,
|
||||||
|
|
||||||
WL_EXPORT void
|
WL_EXPORT void
|
||||||
notify_button(struct wl_input_device *device,
|
notify_button(struct wl_input_device *device,
|
||||||
uint32_t time, int32_t button, int32_t state)
|
uint32_t time, int32_t button, uint32_t state)
|
||||||
{
|
{
|
||||||
struct weston_input_device *wd = (struct weston_input_device *) device;
|
struct weston_input_device *wd = (struct weston_input_device *) device;
|
||||||
struct weston_compositor *compositor = wd->compositor;
|
struct weston_compositor *compositor = wd->compositor;
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ notify_motion(struct wl_input_device *device,
|
||||||
uint32_t time, int x, int y);
|
uint32_t time, int x, int y);
|
||||||
void
|
void
|
||||||
notify_button(struct wl_input_device *device,
|
notify_button(struct wl_input_device *device,
|
||||||
uint32_t time, int32_t button, int32_t state);
|
uint32_t time, int32_t button, uint32_t state);
|
||||||
void
|
void
|
||||||
notify_axis(struct wl_input_device *device,
|
notify_axis(struct wl_input_device *device,
|
||||||
uint32_t time, uint32_t axis, int32_t value);
|
uint32_t time, uint32_t axis, int32_t value);
|
||||||
|
|
|
||||||
10
src/shell.c
10
src/shell.c
|
|
@ -327,7 +327,7 @@ move_grab_motion(struct wl_pointer_grab *grab,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
move_grab_button(struct wl_pointer_grab *grab,
|
move_grab_button(struct wl_pointer_grab *grab,
|
||||||
uint32_t time, uint32_t button, int32_t state)
|
uint32_t time, uint32_t button, uint32_t state)
|
||||||
{
|
{
|
||||||
struct shell_grab *shell_grab = container_of(grab, struct shell_grab,
|
struct shell_grab *shell_grab = container_of(grab, struct shell_grab,
|
||||||
grab);
|
grab);
|
||||||
|
|
@ -587,7 +587,7 @@ resize_grab_motion(struct wl_pointer_grab *grab,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
resize_grab_button(struct wl_pointer_grab *grab,
|
resize_grab_button(struct wl_pointer_grab *grab,
|
||||||
uint32_t time, uint32_t button, int32_t state)
|
uint32_t time, uint32_t button, uint32_t state)
|
||||||
{
|
{
|
||||||
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
|
struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
|
||||||
struct wl_input_device *device = grab->input_device;
|
struct wl_input_device *device = grab->input_device;
|
||||||
|
|
@ -1062,7 +1062,7 @@ popup_grab_motion(struct wl_pointer_grab *grab,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
popup_grab_button(struct wl_pointer_grab *grab,
|
popup_grab_button(struct wl_pointer_grab *grab,
|
||||||
uint32_t time, uint32_t button, int32_t state)
|
uint32_t time, uint32_t button, uint32_t state)
|
||||||
{
|
{
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
struct shell_surface *shsurf =
|
struct shell_surface *shsurf =
|
||||||
|
|
@ -1711,7 +1711,7 @@ rotate_grab_motion(struct wl_pointer_grab *grab,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rotate_grab_button(struct wl_pointer_grab *grab,
|
rotate_grab_button(struct wl_pointer_grab *grab,
|
||||||
uint32_t time, uint32_t button, int32_t state)
|
uint32_t time, uint32_t button, uint32_t state)
|
||||||
{
|
{
|
||||||
struct rotate_grab *rotate =
|
struct rotate_grab *rotate =
|
||||||
container_of(grab, struct rotate_grab, base.grab);
|
container_of(grab, struct rotate_grab, base.grab);
|
||||||
|
|
@ -2403,7 +2403,7 @@ switcher_destroy(struct switcher *switcher, uint32_t time)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
switcher_key(struct wl_keyboard_grab *grab,
|
switcher_key(struct wl_keyboard_grab *grab,
|
||||||
uint32_t time, uint32_t key, int32_t state)
|
uint32_t time, uint32_t key, uint32_t state)
|
||||||
{
|
{
|
||||||
struct switcher *switcher = container_of(grab, struct switcher, grab);
|
struct switcher *switcher = container_of(grab, struct switcher, grab);
|
||||||
struct weston_input_device *device =
|
struct weston_input_device *device =
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ struct binding_keyboard_grab {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
binding_key(struct wl_keyboard_grab *grab,
|
binding_key(struct wl_keyboard_grab *grab,
|
||||||
uint32_t time, uint32_t key, int32_t state)
|
uint32_t time, uint32_t key, uint32_t state)
|
||||||
{
|
{
|
||||||
struct binding_keyboard_grab *b =
|
struct binding_keyboard_grab *b =
|
||||||
container_of(grab, struct binding_keyboard_grab, grab);
|
container_of(grab, struct binding_keyboard_grab, grab);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue