desktop-shell: Pass a flag bitmask instead of bool to activate()

Although it currently only has one available flag, but that'll change.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index e81ecdd..4a44f96 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -842,7 +842,8 @@
 	shell = state->seat->compositor->shell_interface.shell;
 	if (next) {
 		state->keyboard_focus = NULL;
-		activate(shell, next, state->seat, true);
+		activate(shell, next, state->seat,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 	} else {
 		if (shell->focus_animation_type == ANIMATION_DIM_LAYER) {
 			if (state->ws->focus_animation)
@@ -2015,10 +2016,12 @@
 	struct weston_seat *seat = pointer->seat;
 
 	if (shsurf && button == BTN_LEFT && state) {
-		activate(shsurf->shell, shsurf->view, seat, true);
+		activate(shsurf->shell, shsurf->view, seat,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 		surface_move(shsurf, pointer, false);
 	} else if (shsurf && button == BTN_RIGHT && state) {
-		activate(shsurf->shell, shsurf->view, seat, true);
+		activate(shsurf->shell, shsurf->view, seat,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 		surface_rotate(shsurf, pointer);
 	}
 }
@@ -5163,7 +5166,7 @@
 
 void
 activate(struct desktop_shell *shell, struct weston_view *view,
-	 struct weston_seat *seat, bool configure)
+	 struct weston_seat *seat, uint32_t flags)
 {
 	struct weston_surface *es = view->surface;
 	struct weston_surface *main_surface;
@@ -5189,7 +5192,7 @@
 	old_es = state->keyboard_focus;
 	focus_state_set_focus(state, es);
 
-	if (shsurf->state.fullscreen && configure)
+	if (shsurf->state.fullscreen && flags & WESTON_ACTIVATE_FLAG_CONFIGURE)
 		shell_configure_fullscreen(shsurf);
 	else
 		restore_output_mode(shsurf->output);
@@ -5226,7 +5229,8 @@
 static void
 activate_binding(struct weston_seat *seat,
 		 struct desktop_shell *shell,
-		 struct weston_view *focus_view)
+		 struct weston_view *focus_view,
+		 uint32_t flags)
 {
 	struct weston_view *main_view;
 	struct weston_surface *main_surface;
@@ -5241,7 +5245,7 @@
 	if (get_shell_surface_type(main_surface) == SHELL_SURFACE_NONE)
 		return;
 
-	activate(shell, focus_view, seat, true);
+	activate(shell, focus_view, seat, flags);
 }
 
 static void
@@ -5253,7 +5257,8 @@
 	if (pointer->focus == NULL)
 		return;
 
-	activate_binding(pointer->seat, data, pointer->focus);
+	activate_binding(pointer->seat, data, pointer->focus,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 }
 
 static void
@@ -5265,7 +5270,8 @@
 	if (touch->focus == NULL)
 		return;
 
-	activate_binding(touch->seat, data, touch->focus);
+	activate_binding(touch->seat, data, touch->focus,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 }
 
 static void
@@ -5715,7 +5721,8 @@
 		if (shell->locked)
 			break;
 		wl_list_for_each(seat, &compositor->seat_list, link)
-			activate(shell, shsurf->view, seat, true);
+			activate(shell, shsurf->view, seat,
+				 WESTON_ACTIVATE_FLAG_CONFIGURE);
 		break;
 	case SHELL_SURFACE_POPUP:
 	case SHELL_SURFACE_NONE:
@@ -6130,9 +6137,12 @@
 		weston_surface_damage(view->surface);
 	}
 
-	if (switcher->current)
+	if (switcher->current) {
 		activate(switcher->shell, switcher->current,
-			 keyboard->seat, true);
+			 keyboard->seat,
+			 WESTON_ACTIVATE_FLAG_CONFIGURE);
+	}
+
 	wl_list_remove(&switcher->listener.link);
 	weston_keyboard_end_grab(keyboard);
 	if (keyboard->input_method_resource)