diff options
| author | Drew DeVault <sir@cmpwn.com> | 2017-12-23 11:30:30 -0800 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-23 11:30:30 -0800 | 
| commit | eb410e0b6e8d117c12138d30542ef2f0fba5201a (patch) | |
| tree | a5280ddde1ae5a853f7296b8ce5714364726579a /rootston/cursor.c | |
| parent | e8a35a84ba2118936e6a4b5dbcd7872d320216e4 (diff) | |
| parent | 9e2d936b4adb4936d86ae6c2420d7248787043d1 (diff) | |
| download | wlroots-eb410e0b6e8d117c12138d30542ef2f0fba5201a.tar.xz | |
Merge pull request #508 from emersion/fix-rootston-seat-button-count
Fix rootston seat button count
Diffstat (limited to 'rootston/cursor.c')
| -rw-r--r-- | rootston/cursor.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index 95e8ce2a..ad15989d 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -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);  		}  | 
