Merge remote-tracking branch 'upstream/master' into output-damage

This commit is contained in:
emersion 2018-02-09 14:50:26 +01:00
commit cdd55b5d19
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
8 changed files with 86 additions and 43 deletions

View file

@ -249,38 +249,33 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
roots_seat_begin_rotate(seat, view);
break;
}
return;
}
} else {
if (view && !surface) {
if (cursor->pointer_view) {
seat_view_deco_button(cursor->pointer_view, sx, sy, button, state);
if (view && !surface) {
if (cursor->pointer_view) {
seat_view_deco_button(cursor->pointer_view, sx, sy, button, state);
}
}
if (state == WLR_BUTTON_RELEASED &&
cursor->mode != ROOTS_CURSOR_PASSTHROUGH) {
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
}
switch (state) {
case WLR_BUTTON_RELEASED:
if (!is_touch) {
roots_cursor_update_position(cursor, time);
}
break;
case WLR_BUTTON_PRESSED:
roots_seat_set_focus(seat, view);
break;
}
}
if (state == WLR_BUTTON_RELEASED &&
cursor->mode != ROOTS_CURSOR_PASSTHROUGH) {
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
if (seat->seat->pointer_state.button_count == 0) {
return;
}
}
if (view && surface) {
if (!is_touch) {
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
}
}
switch (state) {
case WLR_BUTTON_RELEASED:
if (!is_touch) {
roots_cursor_update_position(cursor, time);
}
break;
case WLR_BUTTON_PRESSED:
roots_seat_set_focus(seat, view);
break;
if (!is_touch) {
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
}
}