diff options
| author | taiyu <[email protected]> | 2015-08-22 21:16:46 -0700 | 
|---|---|---|
| committer | taiyu <[email protected]> | 2015-08-22 21:16:46 -0700 | 
| commit | f1e38be09f00688b90751a45e9365cfd906f8d39 (patch) | |
| tree | db89ee32c13d1770ae872b8a2189c5f3ac122519 | |
| parent | 42d5d9a17779710e83f4ebb2d7e8c893ad91dfe6 (diff) | |
no mode for fullscreen
| -rw-r--r-- | sway/handlers.c | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/sway/handlers.c b/sway/handlers.c index 896caa10..d26ce5f3 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -407,6 +407,14 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w  		break;  	} +	// get focused window and check if to change focus on mouse click +	swayc_t *focused = get_focused_container(&root_container); + +	// dont change focus or mode if fullscreen +	if (swayc_is_fullscreen(focused)) { +		return SEND_CLICK; +	} +  	// set pointer mode  	pointer_mode_set(button,  		(modifiers->mods & config->floating_mod) == config->floating_mod); @@ -421,9 +429,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w  		return SEND_CLICK;  	} -	// get focused window and check if to change focus on mouse click -	swayc_t *focused = get_focused_container(&root_container); -  	// Check whether to change focus  	swayc_t *pointer = pointer_state.view;  	if (pointer && focused != pointer) { @@ -442,11 +447,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w  		}  	} -	// dont change focus if fullscreen -	if (swayc_is_fullscreen(focused)) { -		return SEND_CLICK; -	} -  	// Finally send click  	return SEND_CLICK;  } | 
