Merge branch 'master' into reduce-redundant-containers

This commit is contained in:
bonsaiiV 2024-03-02 10:14:23 +00:00 committed by GitHub
commit 91f60f2268
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 17 deletions

View file

@ -769,15 +769,6 @@ static struct cmd_results *cmd_move_in_direction(
ipc_event_window(container, "move"); ipc_event_window(container, "move");
} }
// Hack to re-focus container
seat_set_raw_focus(config->handler_context.seat, &new_ws->node);
seat_set_focus_container(config->handler_context.seat, container);
if (old_ws != new_ws) {
ipc_event_workspace(old_ws, new_ws, "focus");
workspace_detect_urgent(old_ws);
workspace_detect_urgent(new_ws);
}
container_end_mouse_operation(container); container_end_mouse_operation(container);
return cmd_results_new(CMD_SUCCESS, NULL); return cmd_results_new(CMD_SUCCESS, NULL);

View file

@ -243,7 +243,7 @@ static enum sway_input_idle_source idle_source_from_device(
return IDLE_SOURCE_POINTER; return IDLE_SOURCE_POINTER;
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
return IDLE_SOURCE_TOUCH; return IDLE_SOURCE_TOUCH;
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
return IDLE_SOURCE_TABLET_TOOL; return IDLE_SOURCE_TABLET_TOOL;
case WLR_INPUT_DEVICE_TABLET_PAD: case WLR_INPUT_DEVICE_TABLET_PAD:
return IDLE_SOURCE_TABLET_PAD; return IDLE_SOURCE_TABLET_PAD;
@ -518,7 +518,7 @@ static void apply_mapping_from_region(struct wlr_input_device *device,
double x1 = region->x1, x2 = region->x2; double x1 = region->x1, x2 = region->x2;
double y1 = region->y1, y2 = region->y2; double y1 = region->y1, y2 = region->y2;
if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET_TOOL) { if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET) {
struct wlr_tablet *tablet = wlr_tablet_from_input_device(device); struct wlr_tablet *tablet = wlr_tablet_from_input_device(device);
if (tablet->width_mm == 0 || tablet->height_mm == 0) { if (tablet->width_mm == 0 || tablet->height_mm == 0) {
return; return;

View file

@ -111,7 +111,7 @@ const char *input_device_get_type(struct sway_input_device *device) {
return "keyboard"; return "keyboard";
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
return "touch"; return "touch";
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
return "tablet_tool"; return "tablet_tool";
case WLR_INPUT_DEVICE_TABLET_PAD: case WLR_INPUT_DEVICE_TABLET_PAD:
return "tablet_pad"; return "tablet_pad";

View file

@ -607,7 +607,7 @@ static void seat_update_capabilities(struct sway_seat *seat) {
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
caps |= WL_SEAT_CAPABILITY_TOUCH; caps |= WL_SEAT_CAPABILITY_TOUCH;
break; break;
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
caps |= WL_SEAT_CAPABILITY_POINTER; caps |= WL_SEAT_CAPABILITY_POINTER;
break; break;
case WLR_INPUT_DEVICE_SWITCH: case WLR_INPUT_DEVICE_SWITCH:
@ -665,7 +665,7 @@ static const char *get_builtin_output_name(void) {
static bool is_touch_or_tablet_tool(struct sway_seat_device *seat_device) { static bool is_touch_or_tablet_tool(struct sway_seat_device *seat_device) {
switch (seat_device->input_device->wlr_device->type) { switch (seat_device->input_device->wlr_device->type) {
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
return true; return true;
default: default:
return false; return false;
@ -680,7 +680,7 @@ static void seat_apply_input_mapping(struct sway_seat *seat,
switch (sway_device->input_device->wlr_device->type) { switch (sway_device->input_device->wlr_device->type) {
case WLR_INPUT_DEVICE_POINTER: case WLR_INPUT_DEVICE_POINTER:
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
break; break;
default: default:
return; // these devices don't support mappings return; // these devices don't support mappings
@ -873,7 +873,7 @@ void seat_configure_device(struct sway_seat *seat,
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
seat_configure_touch(seat, seat_device); seat_configure_touch(seat, seat_device);
break; break;
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
seat_configure_tablet_tool(seat, seat_device); seat_configure_tablet_tool(seat, seat_device);
break; break;
case WLR_INPUT_DEVICE_TABLET_PAD: case WLR_INPUT_DEVICE_TABLET_PAD:
@ -912,7 +912,7 @@ void seat_reset_device(struct sway_seat *seat,
case WLR_INPUT_DEVICE_TOUCH: case WLR_INPUT_DEVICE_TOUCH:
seat_reset_input_config(seat, seat_device); seat_reset_input_config(seat, seat_device);
break; break;
case WLR_INPUT_DEVICE_TABLET_TOOL: case WLR_INPUT_DEVICE_TABLET:
seat_reset_input_config(seat, seat_device); seat_reset_input_config(seat, seat_device);
break; break;
case WLR_INPUT_DEVICE_TABLET_PAD: case WLR_INPUT_DEVICE_TABLET_PAD: