Merge pull request #508 from emersion/fix-rootston-seat-button-count

Fix rootston seat button count
This commit is contained in:
Drew DeVault 2017-12-23 11:30:30 -08:00 committed by GitHub
commit eb410e0b6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -166,6 +166,13 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
}
return;
}
if (state == WLR_BUTTON_RELEASED &&
cursor->mode != ROOTS_CURSOR_PASSTHROUGH) {
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
if (seat->seat->pointer_state.button_count == 0) {
return;
}
}
uint32_t serial;
if (is_touch) {
@ -178,7 +185,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
int i;
switch (state) {
case WLR_BUTTON_RELEASED:
seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
if (!is_touch) {
roots_cursor_update_position(cursor, time);
}