summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2020-07-21 16:08:12 +0100
committerFrediano Ziglio <freddy77@gmail.com>2020-07-22 11:58:29 +0100
commitffba3a0e2dd06d091e8a0d015d63f80941844a85 (patch)
tree9b116b28dac356834908867aad275b413d758f75
parenta5932875c220690edb3ae3764a7e3bb71f2bf77c (diff)
x11: Remove "fd" field
No much reason to cache it, used only in initialization Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Jakub Janků <jjanku@redhat.com>
-rw-r--r--src/vdagent/x11-priv.h1
-rw-r--r--src/vdagent/x11.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/src/vdagent/x11-priv.h b/src/vdagent/x11-priv.h
index b2a8370..a3245f6 100644
--- a/src/vdagent/x11-priv.h
+++ b/src/vdagent/x11-priv.h
@@ -120,7 +120,6 @@ struct vdagent_x11 {
Window root_window[MAX_SCREENS];
UdscsConnection *vdagentd;
int debug;
- int fd;
int screen_count;
int width[MAX_SCREENS];
int height[MAX_SCREENS];
diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c
index 76d9afc..f1f2b2c 100644
--- a/src/vdagent/x11.c
+++ b/src/vdagent/x11.c
@@ -234,7 +234,6 @@ struct vdagent_x11 *vdagent_x11_create(UdscsConnection *vdagentd,
for (i = 0; i < x11->screen_count; i++)
x11->root_window[i] = RootWindow(x11->display, i);
- x11->fd = ConnectionNumber(x11->display);
#ifndef WITH_GTK
x11->clipboard_atom = XInternAtom(x11->display, "CLIPBOARD", False);
x11->clipboard_primary_atom = XInternAtom(x11->display, "PRIMARY", False);
@@ -336,7 +335,7 @@ void vdagent_x11_destroy(struct vdagent_x11 *x11, int vdagentd_disconnected)
int vdagent_x11_get_fd(struct vdagent_x11 *x11)
{
- return x11->fd;
+ return ConnectionNumber(x11->display);
}
#ifndef WITH_GTK