This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 5152d5c9e93aeedb1b114de10e6e11392bc17bbc (commit) from d05bcd076fd9c8539d48030a2153444fb7602cb5 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/5152d5c9e93aeedb1b114de10e6e11392bc17...
commit 5152d5c9e93aeedb1b114de10e6e11392bc17bbc Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 8 20:39:43 2013 +0100
backends: X11: Don't use SHM for remote X11.
Disable SHM if the DISPLAY points to remote machine.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index b938db4..bda3bac 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -612,9 +612,11 @@ GP_Backend *GP_BackendX11Init(const char *display, int x, int y,
backend->context = NULL;
- if ((flags & GP_X11_DISABLE_SHM) || create_shm_ximage(backend, w, h)) + if ((flags & GP_X11_DISABLE_SHM || !x11_conn.local) + || create_shm_ximage(backend, w, h)) { if (create_ximage(backend, w, h)) goto err1; + }
XFlush(win->dpy);
diff --git a/libs/backends/GP_X11_Conn.h b/libs/backends/GP_X11_Conn.h index 4c5d732..e9e3773 100644 --- a/libs/backends/GP_X11_Conn.h +++ b/libs/backends/GP_X11_Conn.h @@ -37,6 +37,9 @@ struct x11_conn { int S__NET_WM_STATE:1; int S__NET_WM_STATE_FULLSCREEN:1;
+ /* Is set to 1 if connection is local -> we can use SHM */ + int local:1; + /* reference counter, incremented on window creation */ unsigned int ref_cnt; }; @@ -98,11 +101,23 @@ static void x11_input_init(void);
static unsigned int x11_open(const char *display) { + const char *disp; + if (x11_conn.ref_cnt != 0) return ++x11_conn.ref_cnt;
GP_DEBUG(1, "Opening X11 display '%s'", display);
+ disp = XDisplayName(display); + + if (disp && disp[0] == ':') + x11_conn.local = 1; + else + x11_conn.local = 0; + + GP_DEBUG(1, "Connection is %s (%s)", + x11_conn.local ? "local" : "remote", disp); + if (!XInitThreads()) { GP_DEBUG(2, "XInitThreads failed"); return 0;
-----------------------------------------------------------------------
Summary of changes: libs/backends/GP_X11.c | 4 +++- libs/backends/GP_X11_Conn.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.