Change key/button grab bindings to take unsigned state

'state' here meaning 'is it up or down?', obviously.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Daniel Stone
2012-05-04 11:21:54 +01:00
committed by Kristian Høgsberg
parent 7ceeb7dd43
commit da5b93c8d7
16 changed files with 24 additions and 23 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
static void
button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct clickdot *clickdot = data;
+3 -3
View File
@@ -256,7 +256,7 @@ panel_launcher_leave_handler(struct widget *widget,
static void
panel_launcher_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct panel_launcher *launcher;
@@ -269,7 +269,7 @@ panel_launcher_button_handler(struct widget *widget,
static void
panel_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct panel *panel = data;
@@ -481,7 +481,7 @@ unlock_dialog_redraw_handler(struct widget *widget, void *data)
static void
unlock_dialog_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct unlock_dialog *dialog = data;
struct desktop *desktop = dialog->desktop;
+1 -1
View File
@@ -361,7 +361,7 @@ create_drag_cursor(struct dnd_drag *dnd_drag,
static void
dnd_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct dnd *dnd = data;
int32_t x, y;
+1 -1
View File
@@ -211,7 +211,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
*/
static void
button_handler(struct widget *widget, struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
int32_t x, y;
+1 -1
View File
@@ -142,7 +142,7 @@ motion_handler(struct widget *widget, struct input *input,
static void
button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct flower *flower = data;
+1 -1
View File
@@ -251,7 +251,7 @@ motion_handler(struct widget *widget, struct input *input,
static void
button_handler(struct widget *widget, struct input *input,
uint32_t time, int button, int state, void *data)
uint32_t time, int button, uint32_t state, void *data)
{
struct gears *gears = data;
+1 -1
View File
@@ -178,7 +178,7 @@ show_menu(struct resizor *resizor, struct input *input, uint32_t time)
static void
button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct resizor *resizor = data;
+1 -1
View File
@@ -217,7 +217,7 @@ lockscreen_draw(struct widget *widget, void *data)
static void
lockscreen_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct lockscreen *lockscreen = data;
+1 -1
View File
@@ -2213,7 +2213,7 @@ keyboard_focus_handler(struct window *window,
static void
button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct terminal *terminal = data;
+1 -1
View File
@@ -138,7 +138,7 @@ view_page_down(struct view *view)
static void
button_handler(struct widget *widget, struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct view *view = data;
+2 -2
View File
@@ -1220,7 +1220,7 @@ frame_motion_handler(struct widget *widget,
static void
frame_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct frame *frame = data;
@@ -2363,7 +2363,7 @@ menu_leave_handler(struct widget *widget, struct input *input, void *data)
static void
menu_button_handler(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data)
int button, uint32_t state, void *data)
{
struct menu *menu = data;
+2 -1
View File
@@ -190,7 +190,8 @@ typedef int (*widget_motion_handler_t)(struct widget *widget,
int32_t x, int32_t y, void *data);
typedef void (*widget_button_handler_t)(struct widget *widget,
struct input *input, uint32_t time,
int button, int state, void *data);
int button, uint32_t state,
void *data);
struct window *
window_create(struct display *display);