mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 11:28:31 +00:00
red-qxl: Unify red_qxl_use_client_monitors_config and red_qxl_client_monitors_config
These 2 functions were doing the same stuff, calling client_monitors_config callback in QXLInterface. The only difference was that red_qxl_use_client_monitors_config used a NULL value. Added the check for proper version, QXLInstance before 3.3 did not have this callback. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
92f1edf714
commit
3a47f4e289
@ -195,17 +195,11 @@ static void red_qxl_update_area(QXLState *qxl_state, uint32_t surface_id,
|
||||
&payload);
|
||||
}
|
||||
|
||||
gboolean red_qxl_use_client_monitors_config(QXLInstance *qxl)
|
||||
{
|
||||
return (red_qxl_check_qxl_version(qxl, 3, 3) &&
|
||||
qxl_get_interface(qxl)->client_monitors_config &&
|
||||
qxl_get_interface(qxl)->client_monitors_config(qxl, NULL));
|
||||
}
|
||||
|
||||
gboolean red_qxl_client_monitors_config(QXLInstance *qxl,
|
||||
VDAgentMonitorsConfig *monitors_config)
|
||||
{
|
||||
return (qxl_get_interface(qxl)->client_monitors_config &&
|
||||
return (red_qxl_check_qxl_version(qxl, 3, 3) &&
|
||||
qxl_get_interface(qxl)->client_monitors_config &&
|
||||
qxl_get_interface(qxl)->client_monitors_config(qxl, monitors_config));
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ void red_qxl_start(QXLInstance *qxl);
|
||||
uint32_t red_qxl_get_ram_size(QXLInstance *qxl);
|
||||
void red_qxl_async_complete(QXLInstance *qxl, AsyncCommand *async_command);
|
||||
struct Dispatcher *red_qxl_get_dispatcher(QXLInstance *qxl);
|
||||
gboolean red_qxl_use_client_monitors_config(QXLInstance *qxl);
|
||||
gboolean red_qxl_client_monitors_config(QXLInstance *qxl, VDAgentMonitorsConfig *monitors_config);
|
||||
gboolean red_qxl_get_primary_active(QXLInstance *qxl);
|
||||
gboolean red_qxl_get_allow_client_mouse(QXLInstance *qxl, gint *x_res, gint *y_res);
|
||||
|
||||
@ -4401,7 +4401,7 @@ static gboolean reds_use_client_monitors_config(RedsState *reds)
|
||||
}
|
||||
|
||||
FOREACH_QXL_INSTANCE(reds, qxl) {
|
||||
if (!red_qxl_use_client_monitors_config(qxl))
|
||||
if (!red_qxl_client_monitors_config(qxl, NULL))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user