[x11spice,08/10] Do not provide a stub client_monitors_config in the QXLInterface.

Submitted by Jeremy White on Sept. 16, 2019, 7:13 p.m.

Details

Message ID 20190916191333.27139-9-jwhite@codeweavers.com
State New
Headers show
Series "Provide a simulated set of outputs and crtcs" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jeremy White Sept. 16, 2019, 7:13 p.m.
Using NULL causes the server to relay the message on to the agent,
which does a superior job to anything we currently want to do.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
---
 src/spice.c | 27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/spice.c b/src/spice.c
index 08a5d09a..e9beec01 100644
--- a/src/spice.c
+++ b/src/spice.c
@@ -334,29 +334,6 @@  static void update_area_complete(QXLInstance *qin G_GNUC_UNUSED,
     g_debug("TODO: %s UNIMPLEMENTED!", __func__);
 }
 
-static int client_monitors_config(QXLInstance *qin G_GNUC_UNUSED,
-                                  VDAgentMonitorsConfig *monitors_config)
-{
-    uint i;
-    if (!monitors_config) {
-        /* a NULL is used as a test to see if we support this function */
-        g_debug("%s: NULL monitors_config", __func__);
-        return TRUE;
-    }
-
-    g_debug("%s: [num %d|flags 0x%x]", __func__, monitors_config->num_of_monitors,
-            monitors_config->flags);
-    for (i = 0; i < monitors_config->num_of_monitors; i++)
-        g_debug("  %d:[height %d|width %d|depth %d|x %d|y %d]", i,
-                monitors_config->monitors[i].height,
-                monitors_config->monitors[i].width,
-                monitors_config->monitors[i].depth,
-                monitors_config->monitors[i].x, monitors_config->monitors[i].y);
-
-    g_debug("TODO: %s UNIMPLEMENTED", __func__);
-    return FALSE;
-}
-
 /* spice sends AT scancodes (with a strange escape).
  * But xf86PostKeyboardEvent expects scancodes. Apparently most of the time
  * you just need to add MIN_KEYCODE, see xf86-input-keyboard/src/atKeynames
@@ -545,7 +522,9 @@  void initialize_spice_instance(spice_t *s)
         .flush_resources = flush_resources,
         .async_complete = async_complete,
         .update_area_complete = update_area_complete,
-        .client_monitors_config = client_monitors_config,
+        .client_monitors_config = NULL,     /* Specifying NULL here causes
+                                               the better logic in the agent
+                                               to operate */
         .set_client_capabilities = NULL,    /* Allowed to be unset */
     };