summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2011-03-18 20:46:20 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2011-03-23 10:49:45 -0400
commit97ad74c4b6cf52d8e5b026a18a501b1cc8c7b576 (patch)
treec444322b0ac83f8259b5160b0f23baf1ef140516
parent5b5503cba7e077226c22716266396e28558d4d05 (diff)
More changes to the detection of the request-abs-pointer frontend key.
This reverts commit 3d6f977dbe79dceaf931d09a38380937abdd8423, and instead uses the new connected callback from the previous commit. The previous approach did not work when restarting the server because the frontend key does not change in that case and is thus not read.
-rw-r--r--src/xenfb.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/xenfb.c b/src/xenfb.c
index bf1d050..ae097c8 100644
--- a/src/xenfb.c
+++ b/src/xenfb.c
@@ -188,22 +188,20 @@ static int input_initialise(struct XenDevice *xendev)
return xen_linpicker_input_connect(in);
}
-static void input_disconnect(struct XenDevice *xendev)
+static void input_connected(struct XenDevice *xendev)
{
struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
- xen_linpicker_input_disconnect(in);
+ if (xenstore_read_fe_int(xendev, "request-abs-pointer",
+ &in->abs_pointer_wanted) == -1)
+ in->abs_pointer_wanted = 0;
}
-static void input_frontend_changed(struct XenDevice *xendev, const char *node)
+static void input_disconnect(struct XenDevice *xendev)
{
struct XenInput *in = container_of(xendev, struct XenInput, c.xendev);
- if (strcmp(node, "request-abs-pointer") == 0) {
- if (xenstore_read_fe_int(xendev, "request-abs-pointer",
- &in->abs_pointer_wanted) < 0)
- in->abs_pointer_wanted = 0;
- }
+ xen_linpicker_input_disconnect(in);
}
static void input_event(struct XenDevice *xendev)
@@ -759,9 +757,9 @@ struct XenDevOps xen_kbdmouse_ops = {
.size = sizeof(struct XenInput),
.init = input_init,
.initialise = input_initialise,
+ .connected = input_connected,
.disconnect = input_disconnect,
.event = input_event,
- .frontend_changed = input_frontend_changed,
};
struct XenDevOps xen_framebuffer_ops = {