share/cairo-util: Use wl_pointer_button_state enum directly
This silences two warnings:
clients/window.c:2450:20: warning: implicit conversion from enumeration
type 'enum wl_pointer_button_state' to different enumeration type 'enum
frame_button_state' [-Wenum-conversion]
button, state);
^~~~~
clients/window.c:2453:15: warning: implicit conversion from enumeration
type 'enum wl_pointer_button_state' to different enumeration type 'enum
frame_button_state' [-Wenum-conversion]
button, state);
^~~~~
Warning produced by Clang 3.8.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
This commit is contained in:
@@ -1363,22 +1363,17 @@ input_handle_motion(void *data, struct wl_pointer *pointer,
|
||||
static void
|
||||
input_handle_button(void *data, struct wl_pointer *pointer,
|
||||
uint32_t serial, uint32_t time, uint32_t button,
|
||||
uint32_t state_w)
|
||||
enum wl_pointer_button_state state)
|
||||
{
|
||||
struct wayland_input *input = data;
|
||||
enum wl_pointer_button_state state = state_w;
|
||||
enum frame_button_state fstate;
|
||||
enum theme_location location;
|
||||
|
||||
if (!input->output)
|
||||
return;
|
||||
|
||||
if (input->output->frame) {
|
||||
fstate = state == WL_POINTER_BUTTON_STATE_PRESSED ?
|
||||
FRAME_BUTTON_PRESSED : FRAME_BUTTON_RELEASED;
|
||||
|
||||
location = frame_pointer_button(input->output->frame, input,
|
||||
button, fstate);
|
||||
button, state);
|
||||
|
||||
if (frame_status(input->output->frame) & FRAME_STATUS_MOVE) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user