mirror of
https://github.com/swaywm/sway.git
synced 2025-11-17 06:59:48 -05:00
Merge remote-tracking branch 'upstream/master' into atomic
This commit is contained in:
commit
a2fbb20a61
16 changed files with 193 additions and 74 deletions
|
|
@ -174,10 +174,13 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
|
|||
seat_set_focus_warp(seat, c, false);
|
||||
}
|
||||
} else if (c->type == C_VIEW) {
|
||||
// Focus c if both of the following are true:
|
||||
// Focus c if the following are true:
|
||||
// - cursor is over a new view, i.e. entered a new window; and
|
||||
// - the new view is visible, i.e. not hidden in a stack or tab.
|
||||
if (c != prev_c && view_is_visible(c->sway_view)) {
|
||||
// - the new view is visible, i.e. not hidden in a stack or tab; and
|
||||
// - the seat does not have a keyboard grab
|
||||
if (!wlr_seat_keyboard_has_grab(cursor->seat->wlr_seat) &&
|
||||
c != prev_c &&
|
||||
view_is_visible(c->sway_view)) {
|
||||
seat_set_focus_warp(seat, c, false);
|
||||
} else {
|
||||
struct sway_container *next_focus =
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@ static void update_shortcut_state(struct sway_shortcut_state *state,
|
|||
bool last_key_was_a_modifier = raw_modifiers != state->last_raw_modifiers;
|
||||
state->last_raw_modifiers = raw_modifiers;
|
||||
|
||||
if (event->state == WLR_KEY_PRESSED) {
|
||||
if (last_key_was_a_modifier && state->last_keycode) {
|
||||
// Last pressed key before this one was a modifier
|
||||
state_erase_key(state, state->last_keycode);
|
||||
}
|
||||
if (last_key_was_a_modifier && state->last_keycode) {
|
||||
// Last pressed key before this one was a modifier
|
||||
state_erase_key(state, state->last_keycode);
|
||||
}
|
||||
|
||||
if (event->state == WLR_KEY_PRESSED) {
|
||||
// Add current key to set; there may be duplicates
|
||||
state_add_key(state, event->keycode, new_key);
|
||||
state->last_keycode = event->keycode;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ static void seat_send_focus(struct sway_container *con,
|
|||
if (con->type == C_VIEW
|
||||
&& seat_is_input_allowed(seat, con->sway_view->surface)) {
|
||||
if (con->sway_view->type == SWAY_VIEW_XWAYLAND) {
|
||||
struct wlr_xwayland *xwayland = seat->input->server->xwayland;
|
||||
struct wlr_xwayland *xwayland =
|
||||
seat->input->server->xwayland.wlr_xwayland;
|
||||
wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
|
||||
}
|
||||
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue