Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
		
						commit
						ab47ec9636
					
				| 
						 | 
					@ -661,6 +661,8 @@ void
 | 
				
			||||||
DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to,
 | 
					DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to,
 | 
				
			||||||
                      DeviceChangedEvent *dce)
 | 
					                      DeviceChangedEvent *dce)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    OsBlockSIGIO();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* generic feedback classes, not tied to pointer and/or keyboard */
 | 
					    /* generic feedback classes, not tied to pointer and/or keyboard */
 | 
				
			||||||
    DeepCopyFeedbackClasses(from, to);
 | 
					    DeepCopyFeedbackClasses(from, to);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -668,6 +670,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to,
 | 
				
			||||||
        DeepCopyKeyboardClasses(from, to);
 | 
					        DeepCopyKeyboardClasses(from, to);
 | 
				
			||||||
    if ((dce->flags & DEVCHANGE_POINTER_EVENT))
 | 
					    if ((dce->flags & DEVCHANGE_POINTER_EVENT))
 | 
				
			||||||
        DeepCopyPointerClasses(from, to);
 | 
					        DeepCopyPointerClasses(from, to);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    OsReleaseSIGIO();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,22 +19,6 @@ Section "InputClass"
 | 
				
			||||||
        Option "IgnoreRelativeAxes" "off"
 | 
					        Option "IgnoreRelativeAxes" "off"
 | 
				
			||||||
EndSection
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=612140
 | 
					 | 
				
			||||||
# please make Evoluent VerticalMouse 3 work out of the box
 | 
					 | 
				
			||||||
# Button mapping on this mouse is quirky
 | 
					 | 
				
			||||||
Section "InputClass"
 | 
					 | 
				
			||||||
	Identifier "Evoluent VerticalMouse 3"
 | 
					 | 
				
			||||||
        MatchProduct "Evoluent VerticalMouse 3"
 | 
					 | 
				
			||||||
        # Sets following configuration:
 | 
					 | 
				
			||||||
        # top button:    left
 | 
					 | 
				
			||||||
        # middle button: middle
 | 
					 | 
				
			||||||
        # bottom button: right
 | 
					 | 
				
			||||||
        # wheel click:   middle
 | 
					 | 
				
			||||||
        # thumb button:  8 (back)
 | 
					 | 
				
			||||||
	Option "ButtonMapping" "1 2 2 4 5 6 7 3 8"
 | 
					 | 
				
			||||||
EndSection
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=55867
 | 
					# https://bugs.freedesktop.org/show_bug.cgi?id=55867
 | 
				
			||||||
# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
 | 
					# Bug 55867 - Doesn't know how to tag XI_TRACKBALL
 | 
				
			||||||
Section "InputClass"
 | 
					Section "InputClass"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,7 +97,7 @@ Section "ServerFlags"
 | 
				
			||||||
# Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence
 | 
					# Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence
 | 
				
			||||||
# This allows clients to receive this key event.
 | 
					# This allows clients to receive this key event.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#    Option	"DontZap"	"false"
 | 
					#    Option	"DontZap"	"true"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching
 | 
					# Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching
 | 
				
			||||||
# sequences.  This allows clients to receive these key events.
 | 
					# sequences.  This allows clients to receive these key events.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -223,9 +223,8 @@ turns on auto-repeat.
 | 
				
			||||||
.B -retro
 | 
					.B -retro
 | 
				
			||||||
starts the stipple with the classic stipple and cursor visible.  The default
 | 
					starts the stipple with the classic stipple and cursor visible.  The default
 | 
				
			||||||
is to start with a black root window, and to suppress display of the cursor
 | 
					is to start with a black root window, and to suppress display of the cursor
 | 
				
			||||||
until the first time an application calls XDefineCursor().  For the Xorg
 | 
					until the first time an application calls XDefineCursor(). For kdrive
 | 
				
			||||||
server, this also sets the default for the DontZap option to FALSE.  For
 | 
					servers, this implies -zap.
 | 
				
			||||||
kdrive servers, this implies -zap.
 | 
					 | 
				
			||||||
.TP 8
 | 
					.TP 8
 | 
				
			||||||
.B \-s \fIminutes\fP
 | 
					.B \-s \fIminutes\fP
 | 
				
			||||||
sets screen-saver timeout time in minutes.
 | 
					sets screen-saver timeout time in minutes.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										65
									
								
								os/log.c
								
								
								
								
							
							
						
						
									
										65
									
								
								os/log.c
								
								
								
								
							| 
						 | 
					@ -342,7 +342,7 @@ out:
 | 
				
			||||||
 * which directives you use.
 | 
					 * which directives you use.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
pnprintf(char *string, size_t size, const char *f, va_list args)
 | 
					vpnprintf(char *string, int size_in, const char *f, va_list args)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int f_idx = 0;
 | 
					    int f_idx = 0;
 | 
				
			||||||
    int s_idx = 0;
 | 
					    int s_idx = 0;
 | 
				
			||||||
| 
						 | 
					@ -353,6 +353,7 @@ pnprintf(char *string, size_t size, const char *f, va_list args)
 | 
				
			||||||
    int i;
 | 
					    int i;
 | 
				
			||||||
    uint64_t ui;
 | 
					    uint64_t ui;
 | 
				
			||||||
    int64_t si;
 | 
					    int64_t si;
 | 
				
			||||||
 | 
					    size_t size = size_in;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (; f_idx < f_len && s_idx < size - 1; f_idx++) {
 | 
					    for (; f_idx < f_len && s_idx < size - 1; f_idx++) {
 | 
				
			||||||
        int length_modifier = 0;
 | 
					        int length_modifier = 0;
 | 
				
			||||||
| 
						 | 
					@ -484,6 +485,19 @@ pnprintf(char *string, size_t size, const char *f, va_list args)
 | 
				
			||||||
    return s_idx;
 | 
					    return s_idx;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int
 | 
				
			||||||
 | 
					pnprintf(char *string, int size, const char *f, ...)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    int rc;
 | 
				
			||||||
 | 
					    va_list args;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    va_start(args, f);
 | 
				
			||||||
 | 
					    rc = vpnprintf(string, size, f, args);
 | 
				
			||||||
 | 
					    va_end(args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return rc;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* This function does the actual log message writes. It must be signal safe.
 | 
					/* This function does the actual log message writes. It must be signal safe.
 | 
				
			||||||
 * When attempting to call non-signal-safe functions, guard them with a check
 | 
					 * When attempting to call non-signal-safe functions, guard them with a check
 | 
				
			||||||
 * of the inSignalContext global variable. */
 | 
					 * of the inSignalContext global variable. */
 | 
				
			||||||
| 
						 | 
					@ -597,7 +611,6 @@ LogMessageTypeVerbString(MessageType type, int verb)
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
 | 
					LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static unsigned int warned;
 | 
					 | 
				
			||||||
    const char *type_str;
 | 
					    const char *type_str;
 | 
				
			||||||
    char buf[1024];
 | 
					    char buf[1024];
 | 
				
			||||||
    const size_t size = sizeof(buf);
 | 
					    const size_t size = sizeof(buf);
 | 
				
			||||||
| 
						 | 
					@ -605,17 +618,8 @@ LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
 | 
				
			||||||
    size_t len = 0;
 | 
					    size_t len = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (inSignalContext) {
 | 
					    if (inSignalContext) {
 | 
				
			||||||
        if (warned < 3) {
 | 
					        LogVMessageVerbSigSafe(type, verb, format, args);
 | 
				
			||||||
            BUG_WARN_MSG(inSignalContext,
 | 
					        return;
 | 
				
			||||||
                         "Warning: attempting to log data in a signal unsafe "
 | 
					 | 
				
			||||||
                         "manner while in signal context.\nPlease update to check "
 | 
					 | 
				
			||||||
                         "inSignalContext and/or use LogMessageVerbSigSafe() or "
 | 
					 | 
				
			||||||
                         "ErrorFSigSafe().\nThe offending log format message is:\n"
 | 
					 | 
				
			||||||
                         "%s\n", format);
 | 
					 | 
				
			||||||
            warned++;
 | 
					 | 
				
			||||||
            if (warned == 3)
 | 
					 | 
				
			||||||
                LogMessageVerbSigSafe(X_WARNING, -1, "Warned %u times about sigsafe logging. Will be quiet now.\n", warned);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    type_str = LogMessageTypeVerbString(type, verb);
 | 
					    type_str = LogMessageTypeVerbString(type, verb);
 | 
				
			||||||
| 
						 | 
					@ -687,7 +691,7 @@ LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list a
 | 
				
			||||||
        LogSWrite(verb, " ", 1, FALSE);
 | 
					        LogSWrite(verb, " ", 1, FALSE);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    len = pnprintf(buf, sizeof(buf), format, args);
 | 
					    len = vpnprintf(buf, sizeof(buf), format, args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Force '\n' at end of truncated line */
 | 
					    /* Force '\n' at end of truncated line */
 | 
				
			||||||
    if (sizeof(buf) - len == 1)
 | 
					    if (sizeof(buf) - len == 1)
 | 
				
			||||||
| 
						 | 
					@ -701,40 +705,37 @@ void
 | 
				
			||||||
LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format,
 | 
					LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format,
 | 
				
			||||||
                   va_list msg_args, const char *hdr_format, va_list hdr_args)
 | 
					                   va_list msg_args, const char *hdr_format, va_list hdr_args)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    static unsigned int warned;
 | 
					 | 
				
			||||||
    const char *type_str;
 | 
					    const char *type_str;
 | 
				
			||||||
    char buf[1024];
 | 
					    char buf[1024];
 | 
				
			||||||
    const size_t size = sizeof(buf);
 | 
					    const size_t size = sizeof(buf);
 | 
				
			||||||
    Bool newline;
 | 
					    Bool newline;
 | 
				
			||||||
    size_t len = 0;
 | 
					    size_t len = 0;
 | 
				
			||||||
 | 
					    int (*vprintf_func)(char *, int, const char* _X_RESTRICT_KYWD f, va_list args)
 | 
				
			||||||
    if (inSignalContext) {
 | 
					            _X_ATTRIBUTE_PRINTF(3, 0);
 | 
				
			||||||
        if (warned < 3) {
 | 
					    int (*printf_func)(char *, int, const char* _X_RESTRICT_KYWD f, ...)
 | 
				
			||||||
            BUG_WARN_MSG(inSignalContext,
 | 
					            _X_ATTRIBUTE_PRINTF(3, 4);
 | 
				
			||||||
                         "Warning: attempting to log data in a signal unsafe "
 | 
					 | 
				
			||||||
                         "manner while in signal context.\nPlease update to check "
 | 
					 | 
				
			||||||
                         "inSignalContext and/or use LogMessageVerbSigSafe().\nThe "
 | 
					 | 
				
			||||||
                         "offending header and log message formats are:\n%s %s\n",
 | 
					 | 
				
			||||||
                         hdr_format, msg_format);
 | 
					 | 
				
			||||||
            warned++;
 | 
					 | 
				
			||||||
            if (warned == 3)
 | 
					 | 
				
			||||||
                LogMessageVerbSigSafe(X_WARNING, -1, "Warned %u times about sigsafe logging. Will be quiet now.\n", warned);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    type_str = LogMessageTypeVerbString(type, verb);
 | 
					    type_str = LogMessageTypeVerbString(type, verb);
 | 
				
			||||||
    if (!type_str)
 | 
					    if (!type_str)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (inSignalContext) {
 | 
				
			||||||
 | 
					        vprintf_func = vpnprintf;
 | 
				
			||||||
 | 
					        printf_func = pnprintf;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        vprintf_func = Xvscnprintf;
 | 
				
			||||||
 | 
					        printf_func = Xscnprintf;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* if type_str is not "", prepend it and ' ', to message */
 | 
					    /* if type_str is not "", prepend it and ' ', to message */
 | 
				
			||||||
    if (type_str[0] != '\0')
 | 
					    if (type_str[0] != '\0')
 | 
				
			||||||
        len += Xscnprintf(&buf[len], size - len, "%s ", type_str);
 | 
					        len += printf_func(&buf[len], size - len, "%s ", type_str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (hdr_format && size - len > 1)
 | 
					    if (hdr_format && size - len > 1)
 | 
				
			||||||
        len += Xvscnprintf(&buf[len], size - len, hdr_format, hdr_args);
 | 
					        len += vprintf_func(&buf[len], size - len, hdr_format, hdr_args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (msg_format && size - len > 1)
 | 
					    if (msg_format && size - len > 1)
 | 
				
			||||||
        len += Xvscnprintf(&buf[len], size - len, msg_format, msg_args);
 | 
					        len += vprintf_func(&buf[len], size - len, msg_format, msg_args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Force '\n' at end of truncated line */
 | 
					    /* Force '\n' at end of truncated line */
 | 
				
			||||||
    if (size - len == 1)
 | 
					    if (size - len == 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue