Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
84f977467b
13
configure.ac
13
configure.ac
|
@ -624,8 +624,8 @@ AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg
|
|||
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
|
||||
AC_ARG_ENABLE(linux_acpi, AS_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
|
||||
AC_ARG_ENABLE(linux_apm, AS_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
|
||||
AC_ARG_ENABLE(systemd-logind, AC_HELP_STRING([--enable-systemd-logind], [Build systemd-logind support (default: auto)]), [SYSTEMD_LOGIND=$enableval], [SYSTEMD_LOGIND=auto])
|
||||
AC_ARG_ENABLE(suid-wrapper, AC_HELP_STRING([--enable-suid-wrapper], [Build suid-root wrapper for legacy driver support on rootless xserver systems (default: no)]), [SUID_WRAPPER=$enableval], [SUID_WRAPPER=no])
|
||||
AC_ARG_ENABLE(systemd-logind, AS_HELP_STRING([--enable-systemd-logind], [Build systemd-logind support (default: auto)]), [SYSTEMD_LOGIND=$enableval], [SYSTEMD_LOGIND=auto])
|
||||
AC_ARG_ENABLE(suid-wrapper, AS_HELP_STRING([--enable-suid-wrapper], [Build suid-root wrapper for legacy driver support on rootless xserver systems (default: no)]), [SUID_WRAPPER=$enableval], [SUID_WRAPPER=no])
|
||||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
|
@ -2042,7 +2042,9 @@ if test "x$XORG" = xyes; then
|
|||
XF86CONFIGDIR="xorg.conf.d"
|
||||
AC_SUBST(XF86CONFIGDIR)
|
||||
CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
|
||||
LOGPREFIX="$logdir/Xorg."
|
||||
LOGPREFIX="Xorg."
|
||||
XDG_DATA_HOME=".local/share"
|
||||
XDG_DATA_HOME_LOGDIR="xorg"
|
||||
AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
|
||||
AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
|
||||
AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
|
||||
|
@ -2055,7 +2057,10 @@ if test "x$XORG" = xyes; then
|
|||
AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory])
|
||||
AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
|
||||
AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path])
|
||||
AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location])
|
||||
AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location])
|
||||
AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default logfile prefix])
|
||||
AC_DEFINE_DIR(DEFAULT_XDG_DATA_HOME, XDG_DATA_HOME, [Default XDG_DATA dir under HOME])
|
||||
AC_DEFINE_DIR(DEFAULT_XDG_DATA_HOME_LOGDIR, XDG_DATA_HOME_LOGDIR, [Default log dir under XDG_DATA_HOME])
|
||||
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
|
||||
if test "x$VGAHW" = xyes; then
|
||||
AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module])
|
||||
|
|
1
hw/xfree86/.gitignore
vendored
1
hw/xfree86/.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
Xorg
|
||||
Xorg.sh
|
||||
xorg.conf.example
|
||||
sdksyms.c
|
||||
sdksyms.dep
|
||||
|
|
|
@ -89,7 +89,7 @@ endif
|
|||
|
||||
BUILT_SOURCES = xorg.conf.example
|
||||
DISTCLEANFILES = xorg.conf.example
|
||||
EXTRA_DIST = xorgconf.cpp Xorg.sh.in
|
||||
EXTRA_DIST = xorgconf.cpp
|
||||
|
||||
# Without logdir, X will post an error on the terminal and will not start
|
||||
install-data-local:
|
||||
|
@ -105,6 +105,7 @@ if INSTALL_SETUID
|
|||
chmod u+s $(DESTDIR)$(bindir)/Xorg
|
||||
endif
|
||||
if SUID_WRAPPER
|
||||
$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
|
||||
mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.bin
|
||||
${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
|
||||
-chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
|
||||
|
|
|
@ -143,7 +143,7 @@ const char *xf86ConfigFile = NULL;
|
|||
const char *xf86ConfigDir = NULL;
|
||||
const char *xf86ModulePath = DEFAULT_MODULE_PATH;
|
||||
MessageType xf86ModPathFrom = X_DEFAULT;
|
||||
const char *xf86LogFile = DEFAULT_LOGPREFIX;
|
||||
const char *xf86LogFile = DEFAULT_LOGDIR "/" DEFAULT_LOGPREFIX;
|
||||
MessageType xf86LogFileFrom = X_DEFAULT;
|
||||
Bool xf86LogFileWasOpened = FALSE;
|
||||
serverLayoutRec xf86ConfigLayout = { NULL, };
|
||||
|
|
|
@ -1217,16 +1217,45 @@ xf86ErrorF(const char *format, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
/* Note temporarily modifies the passed in buffer! */
|
||||
static void xf86_mkdir_p(char *path)
|
||||
{
|
||||
char *sep = path;
|
||||
|
||||
while ((sep = strchr(sep + 1, '/'))) {
|
||||
*sep = 0;
|
||||
(void)mkdir(path, 0777);
|
||||
*sep = '/';
|
||||
}
|
||||
(void)mkdir(path, 0777);
|
||||
}
|
||||
|
||||
void
|
||||
xf86LogInit(void)
|
||||
{
|
||||
char *lf = NULL;
|
||||
char *env, *lf = NULL;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
#define LOGSUFFIX ".log"
|
||||
#define LOGOLDSUFFIX ".old"
|
||||
|
||||
/* Get the log file name */
|
||||
if (xf86LogFileFrom == X_DEFAULT) {
|
||||
/* When not running as root, we won't be able to write to /var/log */
|
||||
if (geteuid() != 0) {
|
||||
if ((env = getenv("XDG_DATA_HOME")))
|
||||
snprintf(buf, sizeof(buf), "%s/%s", env,
|
||||
DEFAULT_XDG_DATA_HOME_LOGDIR);
|
||||
else if ((env = getenv("HOME")))
|
||||
snprintf(buf, sizeof(buf), "%s/%s/%s", env,
|
||||
DEFAULT_XDG_DATA_HOME, DEFAULT_XDG_DATA_HOME_LOGDIR);
|
||||
|
||||
if (env) {
|
||||
xf86_mkdir_p(buf);
|
||||
strlcat(buf, "/" DEFAULT_LOGPREFIX, sizeof(buf));
|
||||
xf86LogFile = buf;
|
||||
}
|
||||
}
|
||||
/* Append the display number and ".log" */
|
||||
if (asprintf(&lf, "%s%%s" LOGSUFFIX, xf86LogFile) == -1)
|
||||
FatalError("Cannot allocate space for the log file name\n");
|
||||
|
|
|
@ -301,9 +301,11 @@ Use the file called
|
|||
.I filename
|
||||
as the
|
||||
.B Xorg
|
||||
server log file. The default log file is
|
||||
server log file. The default log file when running as root is
|
||||
.BI __logdir__/Xorg. n .log
|
||||
on most platforms, where
|
||||
and for non root it is
|
||||
.BI $XDG_DATA_HOME/xorg/Xorg. n .log
|
||||
where
|
||||
.I n
|
||||
is the display number of the
|
||||
.B Xorg
|
||||
|
|
|
@ -442,11 +442,15 @@ __modulepath__
|
|||
.TP 7
|
||||
.BI "LogFile \*q" path \*q
|
||||
sets the name of the Xorg server log file.
|
||||
The default log file name is
|
||||
The default log file name when running as root is
|
||||
.PP
|
||||
.RS 11
|
||||
.RI __logdir__/Xorg. <n> .log
|
||||
.RE
|
||||
and for non root it is
|
||||
.RS 11
|
||||
.RI $XDG_DATA_HOME/xorg/Xorg. <n> .log
|
||||
.RE
|
||||
.PP
|
||||
.RS 7
|
||||
where
|
||||
|
|
|
@ -310,11 +310,32 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
|
|||
dbus_int32_t major, minor;
|
||||
char *pause_str;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (dbus_message_is_signal(message,
|
||||
"org.freedesktop.DBus", "NameOwnerChanged")) {
|
||||
char *name, *old_owner, *new_owner;
|
||||
|
||||
dbus_message_get_args(message, &error,
|
||||
DBUS_TYPE_STRING, &name,
|
||||
DBUS_TYPE_STRING, &old_owner,
|
||||
DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID);
|
||||
if (dbus_error_is_set(&error)) {
|
||||
LogMessage(X_ERROR, "systemd-logind: NameOwnerChanged: %s\n",
|
||||
error.message);
|
||||
dbus_error_free(&error);
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
}
|
||||
|
||||
if (name && strcmp(name, "org.freedesktop.login1") == 0)
|
||||
FatalError("systemd-logind disappeared (stopped/restarted?)\n");
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
}
|
||||
|
||||
if (strcmp(dbus_message_get_path(message), info->session) != 0)
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (dbus_message_is_signal(message, "org.freedesktop.login1.Session",
|
||||
"PauseDevice")) {
|
||||
if (!dbus_message_get_args(message, &error,
|
||||
|
@ -472,6 +493,15 @@ connect_hook(DBusConnection *connection, void *data)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
dbus_bus_add_match(connection,
|
||||
"type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus'",
|
||||
&error);
|
||||
if (dbus_error_is_set(&error)) {
|
||||
LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n",
|
||||
error.message);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* HdG: This is not useful with systemd <= 208 since the signal only
|
||||
* contains invalidated property names there, rather than property, val
|
||||
|
|
|
@ -45,9 +45,18 @@
|
|||
/* Path to installed libraries. */
|
||||
#undef DEFAULT_LIBRARY_PATH
|
||||
|
||||
/* Path to server log file. */
|
||||
/* Default log location */
|
||||
#undef DEFAULT_LOGDIR
|
||||
|
||||
/* Default logfile prefix */
|
||||
#undef DEFAULT_LOGPREFIX
|
||||
|
||||
/* Default XDG_DATA dir under HOME */
|
||||
#undef DEFAULT_XDG_DATA_HOME
|
||||
|
||||
/* Default log dir under XDG_DATA_HOME */
|
||||
#undef DEFAULT_XDG_DATA_HOME_LOGDIR
|
||||
|
||||
/* Building DRI-capable DDX. */
|
||||
#undef XF86DRI
|
||||
|
||||
|
|
|
@ -26,8 +26,5 @@
|
|||
/* Vendor web address for support */
|
||||
#undef __VENDORDWEBSUPPORT__
|
||||
|
||||
/* Default log location */
|
||||
#undef DEFAULT_LOGDIR
|
||||
|
||||
/* Whether we should re-locate the root to where the executable lives */
|
||||
#undef RELOCATE_PROJECTROOT
|
||||
|
|
|
@ -711,7 +711,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse)
|
|||
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
|
||||
DeviceEvent *event = &ev->device_event;
|
||||
|
||||
dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
|
||||
dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
|
||||
|
||||
if (dev && dev->key) {
|
||||
xkbi = dev->key->xkbInfo;
|
||||
|
|
Loading…
Reference in New Issue
Block a user