|
|
@ -1092,7 +1092,7 @@ get_shell_surface_type(struct weston_surface *surface) |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
move_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
move_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_surface *surface = |
|
|
|
struct weston_surface *surface = |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
@ -1115,7 +1115,7 @@ move_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
resize_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
resize_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_surface *surface = |
|
|
|
struct weston_surface *surface = |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
@ -1163,7 +1163,7 @@ resize_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
zoom_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
zoom_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
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; |
|
|
@ -1194,7 +1194,7 @@ zoom_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
terminate_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
terminate_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
|
|
|
|
|
|
|
@ -1278,7 +1278,7 @@ static const struct wl_pointer_grab_interface rotate_grab_interface = { |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
rotate_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
rotate_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_surface *base_surface = |
|
|
|
struct weston_surface *base_surface = |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
|
(struct weston_surface *) device->pointer_focus; |
|
|
@ -1389,7 +1389,7 @@ activate(struct weston_shell *base, struct weston_surface *es, |
|
|
|
static void |
|
|
|
static void |
|
|
|
click_to_activate_binding(struct wl_input_device *device, |
|
|
|
click_to_activate_binding(struct wl_input_device *device, |
|
|
|
uint32_t time, uint32_t key, |
|
|
|
uint32_t time, uint32_t key, |
|
|
|
uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *wd = (struct weston_input_device *) device; |
|
|
|
struct weston_input_device *wd = (struct weston_input_device *) device; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
@ -1916,8 +1916,8 @@ static const struct wl_keyboard_grab_interface switcher_grab = { |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
switcher_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
switcher_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, |
|
|
|
uint32_t state, void *data) |
|
|
|
int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct switcher *switcher; |
|
|
|
struct switcher *switcher; |
|
|
@ -1937,7 +1937,7 @@ switcher_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
backlight_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
backlight_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_output *output; |
|
|
|
struct weston_output *output; |
|
|
@ -1970,7 +1970,7 @@ backlight_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
debug_repaint_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
debug_repaint_binding(struct wl_input_device *device, uint32_t time, |
|
|
|
uint32_t key, uint32_t button, uint32_t state, void *data) |
|
|
|
uint32_t key, uint32_t button, uint32_t axis, int32_t state, void *data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct weston_compositor *compositor = data; |
|
|
|
struct wl_shell *shell = |
|
|
|
struct wl_shell *shell = |
|
|
@ -2065,36 +2065,36 @@ shell_init(struct weston_compositor *ec) |
|
|
|
if (launch_desktop_shell_process(shell) != 0) |
|
|
|
if (launch_desktop_shell_process(shell) != 0) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, 0, MODIFIER_SUPER, |
|
|
|
move_binding, shell); |
|
|
|
move_binding, shell); |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_MIDDLE, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_MIDDLE, 0, MODIFIER_SUPER, |
|
|
|
resize_binding, shell); |
|
|
|
resize_binding, shell); |
|
|
|
weston_compositor_add_binding(ec, KEY_BACKSPACE, 0, |
|
|
|
weston_compositor_add_binding(ec, KEY_BACKSPACE, 0, 0, |
|
|
|
MODIFIER_CTRL | MODIFIER_ALT, |
|
|
|
MODIFIER_CTRL | MODIFIER_ALT, |
|
|
|
terminate_binding, ec); |
|
|
|
terminate_binding, ec); |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, 0, |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, 0, 0, |
|
|
|
click_to_activate_binding, ec); |
|
|
|
click_to_activate_binding, ec); |
|
|
|
weston_compositor_add_binding(ec, KEY_UP, 0, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, KEY_UP, 0, 0, MODIFIER_SUPER, |
|
|
|
zoom_binding, shell); |
|
|
|
zoom_binding, shell); |
|
|
|
weston_compositor_add_binding(ec, KEY_DOWN, 0, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, KEY_DOWN, 0, 0, MODIFIER_SUPER, |
|
|
|
zoom_binding, shell); |
|
|
|
zoom_binding, shell); |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, |
|
|
|
weston_compositor_add_binding(ec, 0, BTN_LEFT, 0, |
|
|
|
MODIFIER_SUPER | MODIFIER_ALT, |
|
|
|
MODIFIER_SUPER | MODIFIER_ALT, |
|
|
|
rotate_binding, NULL); |
|
|
|
rotate_binding, NULL); |
|
|
|
weston_compositor_add_binding(ec, KEY_TAB, 0, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, KEY_TAB, 0, 0, MODIFIER_SUPER, |
|
|
|
switcher_binding, ec); |
|
|
|
switcher_binding, ec); |
|
|
|
|
|
|
|
|
|
|
|
/* brightness */ |
|
|
|
/* brightness */ |
|
|
|
weston_compositor_add_binding(ec, KEY_F9, 0, MODIFIER_CTRL, |
|
|
|
weston_compositor_add_binding(ec, KEY_F9, 0, 0, MODIFIER_CTRL, |
|
|
|
backlight_binding, ec); |
|
|
|
backlight_binding, ec); |
|
|
|
weston_compositor_add_binding(ec, KEY_BRIGHTNESSDOWN, 0, 0, |
|
|
|
weston_compositor_add_binding(ec, KEY_BRIGHTNESSDOWN, 0, 0, 0, |
|
|
|
backlight_binding, ec); |
|
|
|
backlight_binding, ec); |
|
|
|
weston_compositor_add_binding(ec, KEY_F10, 0, MODIFIER_CTRL, |
|
|
|
weston_compositor_add_binding(ec, KEY_F10, 0, 0, MODIFIER_CTRL, |
|
|
|
backlight_binding, ec); |
|
|
|
backlight_binding, ec); |
|
|
|
weston_compositor_add_binding(ec, KEY_BRIGHTNESSUP, 0, 0, |
|
|
|
weston_compositor_add_binding(ec, KEY_BRIGHTNESSUP, 0, 0, 0, |
|
|
|
backlight_binding, ec); |
|
|
|
backlight_binding, ec); |
|
|
|
|
|
|
|
|
|
|
|
weston_compositor_add_binding(ec, KEY_SPACE, 0, MODIFIER_SUPER, |
|
|
|
weston_compositor_add_binding(ec, KEY_SPACE, 0, 0, MODIFIER_SUPER, |
|
|
|
debug_repaint_binding, ec); |
|
|
|
debug_repaint_binding, ec); |
|
|
|
|
|
|
|
|
|
|
|
ec->shell = &shell->shell; |
|
|
|
ec->shell = &shell->shell; |
|
|
|