diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-09-12 16:21:37 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-09-12 16:24:02 -0400 |
commit | 4b52fed6a829aafb673aff1291bda98c74fd037f (patch) | |
tree | 405d3fd72a9488f1a2d7d22607702a3c9acc2d29 | |
parent | dff52adc8b29e60674e83d67fea524db3eff9df8 (diff) |
Fix connect call when authorization info is not passed in.
-rw-r--r-- | src/module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/module.c b/src/module.c index 4f822b1..f97fc80 100644 --- a/src/module.c +++ b/src/module.c @@ -92,10 +92,12 @@ xpyb_connect(PyObject *self, PyObject *args, PyObject *kw) } /* Connect to display */ - if (fd < 0) + if (fd >= 0) + conn->conn = xcb_connect_to_fd(fd, authptr); + else if (authptr) conn->conn = xcb_connect_to_display_with_auth_info(displayname, authptr, &conn->pref_screen); else - conn->conn = xcb_connect_to_fd(fd, authptr); + conn->conn = xcb_connect(displayname, &conn->pref_screen); if (xcb_connection_has_error(conn->conn)) { PyErr_SetString(xpybExcept_conn, "Failed to connect to X server."); |