1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Do not try to use gpm in X11.

X11 is detected by checking DISPLAY variable.
Without this ELinks stopped on reading from /dev/gpmctl.
This commit is contained in:
witekfl 2011-07-06 13:19:09 +02:00
parent 03c698e926
commit 8183aecd90
2 changed files with 6 additions and 1 deletions

View File

@ -81,7 +81,7 @@ struct socket_weak_ref {
static INIT_LIST_OF(struct socket_weak_ref, socket_weak_refs);
/* To enable logging of tranfers, for debugging purposes. */
#if 0
#if 1
#define DEBUG_TRANSFER_LOGFILE "/tmp/log"

View File

@ -10,6 +10,8 @@
#include <gpm.h>
#endif
#include <stdlib.h>
#include "elinks.h"
#include "main/select.h"
@ -80,6 +82,9 @@ static int
init_mouse(int cons, int suspend)
{
Gpm_Connect conn;
unsigned char *display = getenv("DISPLAY");
if (display && *display) return -1;
/* We want to get even move events because of the wheels. */
conn.eventMask = suspend ? 0 : ~0;