commit 5ef6e78174f34fc730647509e6d3f55376d45bb5
parent acdd6869316bd9d00320ae4f9222d9551057b5cf
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 17 Feb 2014 01:38:24 -0800
Style
Diffstat:
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libswc/keyboard.c b/libswc/keyboard.c
@@ -204,8 +204,8 @@ void keyboard_handle_key(struct keyboard * keyboard, uint32_t time,
{
if (handler->key && handler->key(keyboard, time, key, state))
{
- if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
- *((uint32_t *) wl_array_add(&handler->keys, sizeof key)) = key;
+ pressed_key = wl_array_add(&handler->keys, sizeof *pressed_key);
+ *pressed_key = key;
break;
}
}
diff --git a/libswc/seat.c b/libswc/seat.c
@@ -372,7 +372,7 @@ bool swc_seat_initialize(const char * seat_name)
}
seat.global = wl_global_create(swc.display, &wl_seat_interface, 2,
- NULL, &bind_seat);
+ NULL, &bind_seat);
if (!seat.global)
goto error1;
diff --git a/libswc/window.c b/libswc/window.c
@@ -71,7 +71,7 @@ EXPORT
void swc_window_focus(struct swc_window * base)
{
struct window * window = INTERNAL(base);
- struct swc_surface * new_focus = window ? INTERNAL(window)->surface : NULL,
+ struct swc_surface * new_focus = window ? window->surface : NULL,
* old_focus = swc.seat->keyboard->focus.surface;
/* If the keyboard already has a focused window, and we are changing the
@@ -79,9 +79,9 @@ void swc_window_focus(struct swc_window * base)
* the focus of the previous focus window's implementation to NULL. */
if (old_focus && old_focus->window
&& !(window && window->impl == INTERNAL(old_focus->window)->impl)
- && INTERNAL(old_focus->window)->impl->focus)
+ && old_focus->window->impl->focus)
{
- INTERNAL(old_focus->window)->impl->focus(NULL);
+ old_focus->window->impl->focus(NULL);
}
if (window && window->impl->focus)