[Spice-devel] [PATCH spice-server 05/22] reds: use bool for RedsState::dispatcher_allows_client_mouse
Frediano Ziglio
fziglio at redhat.com
Fri Jun 16 09:13:17 UTC 2017
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds-private.h | 2 +-
server/reds.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/reds-private.h b/server/reds-private.h
index 227827d..5aebd5c 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -103,7 +103,7 @@ struct RedsState {
GList *channels;
int mouse_mode;
int is_client_mouse_allowed;
- int dispatcher_allows_client_mouse;
+ bool dispatcher_allows_client_mouse;
MonitorMode monitor_mode;
SpiceTimer *mig_timer;
diff --git a/server/reds.c b/server/reds.c
index 5b6bb1a..e1bac2d 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -4318,7 +4318,7 @@ void reds_core_timer_remove(RedsState *reds,
void reds_update_client_mouse_allowed(RedsState *reds)
{
- int allow_now = FALSE;
+ bool allow_now = false;
int x_res = 0;
int y_res = 0;
int num_active_workers = g_list_length(reds->qxl_instances);
@@ -4327,10 +4327,10 @@ void reds_update_client_mouse_allowed(RedsState *reds)
GListIter it;
QXLInstance *qxl;
- allow_now = TRUE;
+ allow_now = true;
FOREACH_QXL_INSTANCE(reds, it, qxl) {
if (red_qxl_get_primary_active(qxl)) {
- allow_now = red_qxl_get_allow_client_mouse(qxl, &x_res, &y_res);
+ allow_now = !!red_qxl_get_allow_client_mouse(qxl, &x_res, &y_res);
break;
}
}
--
2.9.4
More information about the Spice-devel
mailing list