mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
Improve wayland backend pointer error logging
This commit is contained in:
parent
dbde1f7340
commit
4ca872c914
1 changed files with 8 additions and 2 deletions
|
@ -30,7 +30,9 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
|
|||
|
||||
static void pointer_handle_leave(void *data, struct wl_pointer *wl_pointer,
|
||||
uint32_t serial, struct wl_surface *surface) {
|
||||
|
||||
struct wlr_input_device *dev = data;
|
||||
assert(dev && dev->pointer && dev->pointer->state);
|
||||
dev->pointer->state->current_output = NULL;
|
||||
}
|
||||
|
||||
static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
||||
|
@ -38,7 +40,11 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
|
|||
struct wlr_input_device *dev = data;
|
||||
assert(dev && dev->pointer && dev->pointer->state);
|
||||
struct wlr_pointer_state *state = dev->pointer->state;
|
||||
assert(state->current_output);
|
||||
|
||||
if(!state->current_output) {
|
||||
wlr_log(L_ERROR, "pointer motion event without current output");
|
||||
return;
|
||||
}
|
||||
|
||||
int width, height;
|
||||
wl_egl_window_get_attached_size(state->current_output->state->egl_window,
|
||||
|
|
Loading…
Reference in a new issue