mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 03:11:27 +00:00
Return false from pointer events
This commit is contained in:
parent
4a5828370c
commit
981db16a8e
|
@ -199,20 +199,19 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
|
||||||
static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) {
|
static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) {
|
||||||
mouse_origin = *origin;
|
mouse_origin = *origin;
|
||||||
if (!config->focus_follows_mouse) {
|
if (!config->focus_follows_mouse) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
focus_pointer();
|
focus_pointer();
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
|
static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
|
||||||
uint32_t button, enum wlc_button_state state) {
|
uint32_t button, enum wlc_button_state state) {
|
||||||
swayc_t *focused = get_focused_container(&root_container);
|
get_focused_container(&root_container);
|
||||||
if (state == WLC_BUTTON_STATE_PRESSED) {
|
if (state == WLC_BUTTON_STATE_PRESSED) {
|
||||||
swayc_t *pointer = focus_pointer();
|
focus_pointer();
|
||||||
return !(pointer && pointer != focused);
|
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_wlc_ready(void) {
|
static void handle_wlc_ready(void) {
|
||||||
|
|
Loading…
Reference in a new issue