desktop-shell: make client_initiated a bool
Make it a bool in both surface_move() and struct weston_move_grab
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index d97e92d..a3f017c 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -199,7 +199,7 @@
struct weston_move_grab {
struct shell_grab base;
wl_fixed_t dx, dy;
- int client_initiated;
+ bool client_initiated;
};
struct weston_touch_move_grab {
@@ -1749,7 +1749,7 @@
static int
surface_move(struct shell_surface *shsurf, struct weston_seat *seat,
- int client_initiated)
+ bool client_initiated)
{
struct weston_move_grab *move;
@@ -1790,7 +1790,7 @@
seat->pointer->grab_serial == serial) {
surface = weston_surface_get_main_surface(seat->pointer->focus->surface);
if ((surface == shsurf->surface) &&
- (surface_move(shsurf, seat, 1) < 0))
+ (surface_move(shsurf, seat, true) < 0))
wl_resource_post_no_memory(resource);
} else if (seat->touch &&
seat->touch->focus &&
@@ -2045,7 +2045,7 @@
if (shsurf && button == BTN_LEFT && state) {
activate(shsurf->shell, shsurf->surface, seat, true);
- surface_move(shsurf, seat, 0);
+ surface_move(shsurf, seat, false);
} else if (shsurf && button == BTN_RIGHT && state) {
activate(shsurf->shell, shsurf->surface, seat, true);
surface_rotate(shsurf, seat);
@@ -3059,7 +3059,7 @@
static int
shell_interface_move(struct shell_surface *shsurf, struct weston_seat *ws)
{
- return surface_move(shsurf, ws, 1);
+ return surface_move(shsurf, ws, true);
}
static const struct weston_pointer_grab_interface popup_grab_interface;
@@ -4608,7 +4608,7 @@
shsurf->state.maximized)
return;
- surface_move(shsurf, seat, 0);
+ surface_move(shsurf, seat, false);
}
static void