[PATCH:libXft 2/2] XftGlyphFontSpecCore: check to make sure glyphs are in range
From: Derek Wang This fixes a crash reported when selecting "View Page Source" in Mozilla on Solaris 10, due to invalid parameters being given to XPutImage. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6261221 Signed-off-by: Alan Coopersmith --- I can't claim to understand this patch, but it's been shipping in Solaris libXft for 5 years, so it's a bit overdue to attempt pushing it upstream. (Unfortunately, that's also almost how long it's been since the original author left Sun.) Given the timeframe & hardware on which it was reported, I suspect it affects the libXft fallback path to use libX11 when the Render extension is not available, but have not confirmed that. src/xftcore.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/xftcore.c b/src/xftcore.c index 3f87109..a0103cf 100644 --- a/src/xftcore.c +++ b/src/xftcore.c @@ -1253,7 +1253,17 @@ XftGlyphFontSpecCore (XftDraw*draw, if (i) { if (g_x1 < x1) + { + if (g_x1 < 0) + { + /* do nothing if the given glyphs are out of range */ + short t = glyphs[i-1].font->max_advance_width + + glyphs[i-1].x; + if (t < 0 && glyphs[i-1].x > 0) + goto bail1; + } x1 = g_x1; + } if (g_y1 < y1) y1 = g_y1; if (g_x2 > x2) -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libXft 1/2] XftDrawSrcPicture: fail if info->solidFormat is NULL
From: Jay Cotton Fixed a core dump in x11perf render tests when a driver was returning incorrect information due to a bug in the driver. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6872780 Signed-off-by: Alan Coopersmith --- src/xftdraw.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/xftdraw.c b/src/xftdraw.c index ab51749..21f8538 100644 --- a/src/xftdraw.c +++ b/src/xftdraw.c @@ -301,7 +301,7 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color) inti; XftColor bitmapColor; -if (!info) +if (!info || !info->solidFormat) return 0; /* -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: Xorg code style guide?
> Do we have an Xorg code style guide? Just after I sent that email Google found this link: http://www.x.org/wiki/CodingStyle sorry for the noise. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Xorg code style guide?
Do we have an Xorg code style guide? [1] I'm trying to improve the XShape man pages and would like to include a small example program, so I'd like to format it correctly (dot all the T's and cross all the I's :-) Pat --- [1] By default I'll just look at some of the latest GIT change sets ... ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 2/2 - libXi] Move Xinput server API documentation from libXi to xserver
Signed-off-by: Alan Coopersmith --- Makefile.am |2 +- configure.ac|1 - doc/Makefile.am | 63 --- doc/porting.xml | 1209 --- 4 files changed, 1 insertions(+), 1274 deletions(-) delete mode 100644 doc/Makefile.am delete mode 100644 doc/porting.xml diff --git a/Makefile.am b/Makefile.am index 14bfb26..825861e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src man doc specs +SUBDIRS = src man specs pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xi.pc diff --git a/configure.ac b/configure.ac index 19e6bc5..30d7901 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ XORG_CHECK_MALLOC_ZERO AC_OUTPUT([Makefile src/Makefile man/Makefile - doc/Makefile specs/Makefile xi.pc]) diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index f22aefd..000 --- a/doc/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# - -if ENABLE_SPECS - -specdir = $(docdir)/$(subdir) -doc_sources = porting.xml -dist_spec_DATA = $(doc_sources) - -if HAVE_XMLTO -spec_DATA = $(doc_sources:.xml=.html) - -if HAVE_FOP -spec_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf) -endif - -if HAVE_XMLTO_TEXT -spec_DATA += $(doc_sources:.xml=.txt) -endif - -if HAVE_STYLESHEETS -XMLTO_FLAGS = -m $(XSL_STYLESHEET) \ - --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css -endif - -CLEANFILES = $(spec_DATA) - -SUFFIXES = .xml .ps .pdf .txt .html - -%.txt: %.xml $(dist_spec_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< - -%.html: %.xml $(dist_spec_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< - -%.pdf: %.xml $(dist_spec_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< - -%.ps: %.xml $(dist_spec_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $< - -endif HAVE_XMLTO -endif ENABLE_SPECS diff --git a/doc/porting.xml b/doc/porting.xml deleted file mode 100644 index 1ae7afe..000 --- a/doc/porting.xml +++ /dev/null @@ -1,1209 +0,0 @@ - -http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";> - - - - - - - X11 Input Extension Porting Document - X Version 11, Release 6.7 - - - GeorgeSachs - Hewlett-Packard - - - X Consortium Standard - 1989Hewlett-Packard Company - 1990Hewlett-Packard Company - 1991Hewlett-Packard Company - - 1989X Consortium - 1990X Consortium - 1991X Consortium - X Consortium - X Version 11, Release 6.7 - - - - - -Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is -hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -Hewlett-Packard makes no representations about the suitability for any purpose of the information in this -document. It is provided "as is" without express or implied warranty. This document is only a draft stan- -dard of the X Consortium and is therefore subject to change. - - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
[PATCH 1/2 - xserver] Move Xinput server API documentation from libXi to doc/xml
Signed-off-by: Alan Coopersmith --- doc/xml/Makefile.am |2 +- doc/xml/Xinput.xml | 1209 +++ 2 files changed, 1210 insertions(+), 1 deletions(-) create mode 100644 doc/xml/Xinput.xml diff --git a/doc/xml/Makefile.am b/doc/xml/Makefile.am index 6c8178a..b793e7b 100644 --- a/doc/xml/Makefile.am +++ b/doc/xml/Makefile.am @@ -22,7 +22,7 @@ # SUBDIRS = dtrace -doc_sources = Xserver-spec.xml +doc_sources = Xserver-spec.xml Xinput.xml # Developer's documentation is not installed if ENABLE_DEVEL_DOCS diff --git a/doc/xml/Xinput.xml b/doc/xml/Xinput.xml new file mode 100644 index 000..1ae7afe --- /dev/null +++ b/doc/xml/Xinput.xml @@ -0,0 +1,1209 @@ + +http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";> + + + + + + + X11 Input Extension Porting Document + X Version 11, Release 6.7 + + + GeorgeSachs + Hewlett-Packard + + + X Consortium Standard + 1989Hewlett-Packard Company + 1990Hewlett-Packard Company + 1991Hewlett-Packard Company + + 1989X Consortium + 1990X Consortium + 1991X Consortium + X Consortium + X Version 11, Release 6.7 + + + + + +Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is +hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +Hewlett-Packard makes no representations about the suitability for any purpose of the information in this +document. It is provided "as is" without express or implied warranty. This document is only a draft stan- +dard of the X Consortium and is therefore subject to change. + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. + +X Window System is a trademark of The Open Group. + + + + + +X11 Input Extension Porting Document + + +This document is intended to aid the process of integrating the +X11 Input Extension into an X server. + + + +Most of the functionality provided by the input extension is +device- and implementation-independent, and should require no changes. +The functionality is implemented by +routines that typically reside in the server source tree directory +extensions/server/xinput. +This extension includes functions to enable and disable input extension devices, +select input, grab and focus those device, query and change key +and button mappings, and others. The only input extension requirements +for the device-dependent part of X are that the input devices be +correctly initialized and input events from those devices be correctly +generated. Device-dependent X is responsible for reading input data from +the input device hardware and if necessary, reformatting it into X events. + + + +The process of initializing input extension devices is similar to that used +for the core devices, and is described in the following sections. When +multiple input devices are attached to X server, the choice of which devices +to initially use as the core X pointer and keyboard is left +implementation-dependent. It is also up to each implementation to decide +whether all input devices will be opened by the server during its +initialization and kept open for the life of the server. The alternative is +to open only the X keyboard and X pointer during server initialization, and +open other input devic
Re: [PATCH libXmu 1/1] config: remove config test for snprintf
On 02/ 2/11 05:02 PM, Gaetan Nadon wrote: > The macro HAS_SNPRINTF is hard coded to always be defined. > If it were not defined, Lower.c would include snprintf.c > which does not exit. Seems to be relics from IMakefile "exist", not "exit", I assume. > > Other modules are using snprintf unconditionally. > > Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH libXmu 1/1] config: remove config test for snprintf
On Wed, Feb 2, 2011 at 20:02:59 -0500, Gaetan Nadon wrote: > The macro HAS_SNPRINTF is hard coded to always be defined. > If it were not defined, Lower.c would include snprintf.c > which does not exit. Seems to be relics from IMakefile > > Other modules are using snprintf unconditionally. > > Signed-off-by: Gaetan Nadon > --- > configure.ac | 17 - > src/Lower.c |7 --- > 2 files changed, 0 insertions(+), 24 deletions(-) > Reviewed-by: Julien Cristau Cheers, Julien ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH libXmu 1/1] config: remove config test for snprintf
The macro HAS_SNPRINTF is hard coded to always be defined. If it were not defined, Lower.c would include snprintf.c which does not exit. Seems to be relics from IMakefile Other modules are using snprintf unconditionally. Signed-off-by: Gaetan Nadon --- configure.ac | 17 - src/Lower.c |7 --- 2 files changed, 0 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 9775463..880fc5a 100644 --- a/configure.ac +++ b/configure.ac @@ -31,23 +31,6 @@ PKG_CHECK_MODULES(XMUU, x11) # conversion routines for XTRANS_CONNECTION_FLAGS -# -# Assume that we have sprintf. If a system shows up -# that doesn't, we will deal with it at that point. -# -# The way to deal with it is: -# -# 1. Add a test for sprintf it here in configure.ac -# that sets or unsets HAS_SNPRINTF as appropriate -# -# 2. add a copy of xc/lib/misc/snprintf.c -# -# The source file in question is Lower.c -# - -AC_DEFINE(HAS_SNPRINTF, [], [Whether we have snprintf()]) -AC_SUBST(HAS_SNPRINTF) - # Allow checking code with lint, sparse, etc. XORG_WITH_LINT XORG_LINT_LIBRARY([Xmu]) diff --git a/src/Lower.c b/src/Lower.c index 4e44be1..7522cc1 100644 --- a/src/Lower.c +++ b/src/Lower.c @@ -33,13 +33,6 @@ in this Software without prior written authorization from The Open Group. #include #include - -#ifndef HAS_SNPRINTF -#undef SCOPE -#define SCOPE static -#include "snprintf.c" -#endif - #include /* -- 1.6.0.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] glx: Refcnt the GLXDrawable to avoid use after free with multiple FreeResource
On Thu, 16 Dec 2010 15:55:42 +0100, Michel Dänzer wrote: > [ Dropping dri-devel list as this seems strictly an xserver issue ] > > On Fre, 2010-12-10 at 14:49 +0100, Michel Dänzer wrote: > > On Fre, 2010-12-10 at 13:38 +, Chris Wilson wrote: > > > Although there may be more than one resource handles pointing to the > > > Drawable, we only want to destroy it once and only reference the > > > resource which may have just been deleted on the first instance. > > > > > > v2: Apply fixes and combine with another bug fix from Michel Dänzer, > > > https://bugs.freedesktop.org/show_bug.cgi?id=28181 > > > > > > Signed-off-by: Chris Wilson > > > Cc: Kristian Høgsberg > > > Cc: Michel Dänzer > > > > Reviewed-by: Michel Dänzer > > > > I'd wait for Kristian's review as well though. > > Any take on this, Kristian? Kristian, poke. This patch gets X working again with GL and modeswitching. If you still want to you can do a code removal patch later and gain hero points... :) -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] DGA fixes, minor ABI bump
On Thu, 3 Feb 2011 09:08:53 +1000, Peter Hutterer wrote: > updated. note that the minor bump to ABI 12.2 doesn't have a reviewed by. I > hope you trust me to commit that unreviewed ;) Merged. 12b0f7d..ea1ffd3 master -> master -- keith.pack...@intel.com pgpr1dxlkvlB0.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xrdb] Properly honor -nocpp
On 02/ 2/11 11:33 AM, Jeremy Huddleston wrote: > > Previously, if the user passed -nocpp and there was a cpp present, > cpp would be used. This patch fixes that case. > > Signed-off-by: Jeremy Huddleston > --- > xrdb.c | 30 +- > 1 files changed, 17 insertions(+), 13 deletions(-) Oops, sorry about that. Reviewed-by: Alan Coopersmith -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] DGA fixes, minor ABI bump
On Wed, Feb 02, 2011 at 03:02:01PM -0800, Keith Packard wrote: > On Thu, 3 Feb 2011 08:59:50 +1000, Peter Hutterer > wrote: > > > sorry, I did and forgot to add the tag when merging. want me to > > update? > > Sure, always nice to have things tagged properly. updated. note that the minor bump to ABI 12.2 doesn't have a reviewed by. I hope you trust me to commit that unreviewed ;) Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] DGA fixes, minor ABI bump
On Thu, 3 Feb 2011 08:59:50 +1000, Peter Hutterer wrote: > sorry, I did and forgot to add the tag when merging. want me to > update? Sure, always nice to have things tagged properly. -- keith.pack...@intel.com pgpQEyBAEq2bL.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] DGA fixes, minor ABI bump
On Wed, Feb 02, 2011 at 02:49:59PM -0800, Keith Packard wrote: > On Thu, 27 Jan 2011 14:43:48 +1000, Peter Hutterer > wrote: > > > Ville Syrjala (11): > > include: Fix a copy/paste error in a comment > > xfree86/input: Restore DGAStealKeyEvent() > > xfree86/dga: Install the DGA event handler when DGA2 is used > > xfree86/dga: Remove the ET_DGAEvent handler only if it was installed > > xfree86/dga: Make mieq_install Bool > > xfree86/dga: DGA2 events are missing the dx/dy information > > xfree86/dga: Remove DGAMouseX and DGAMouseY > > xfree86/dga: DGAProcessKeyboardEvent() forgot ET_Internal > > xfree86/dga: Remove useless ifdefs > > xfree86/dga: Only send DGA events for master devices > > xfree86/dga: Remove DGAIsDgaEvent() > > None of these patches have a 'reviewed-by' line. Were they reviewed? sorry, I did and forgot to add the tag when merging. want me to update? Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] xserver: enable TLS even if AIGLX is not enabled
On Mon, 31 Jan 2011 23:41:47 +0100, Samuel Thibault wrote: > Samuel Thibault (1): > xserver: enable TLS even if AIGLX is not enabled Merged. 541b250..0b15033 master -> master For such a small patch, it might be better to just post to the list; it's easier to review that way. -- keith.pack...@intel.com pgpIhU3wFh6Xf.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL xserver] XQuartz updates
On Fri, 28 Jan 2011 21:17:32 -0800, Jeremy Huddleston wrote: > Jeremy Huddleston (5): > XQuartz: Update copyright dates in bundle's plist > XQuartz: Bump version string to 2.6.1 > XQuartz: Call RRScreenSizeNotify after handling externally-generated > XP_EVENT_DISPLAY_CHANGED > XQuartz: Use the default signal handler > XQuartz: Localization Updates Merged. 70f2d39..246d40b master -> master -- keith.pack...@intel.com pgp2fZCVfPw8E.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] DGA fixes, minor ABI bump
On Thu, 27 Jan 2011 14:43:48 +1000, Peter Hutterer wrote: > Ville Syrjala (11): > include: Fix a copy/paste error in a comment > xfree86/input: Restore DGAStealKeyEvent() > xfree86/dga: Install the DGA event handler when DGA2 is used > xfree86/dga: Remove the ET_DGAEvent handler only if it was installed > xfree86/dga: Make mieq_install Bool > xfree86/dga: DGA2 events are missing the dx/dy information > xfree86/dga: Remove DGAMouseX and DGAMouseY > xfree86/dga: DGAProcessKeyboardEvent() forgot ET_Internal > xfree86/dga: Remove useless ifdefs > xfree86/dga: Only send DGA events for master devices > xfree86/dga: Remove DGAIsDgaEvent() None of these patches have a 'reviewed-by' line. Were they reviewed? -- keith.pack...@intel.com pgpqQSCDRY41k.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] Fix compilation of xf86bigfont.c
On Tue, 25 Jan 2011 15:00:45 +, Jon TURNEY wrote: > Jon TURNEY (1): > Fix compilation of xf86bigfont.c Merged. 3a91c2d..70f2d39 master -> master I wouldn't mind someone just deleting this extension though; I don't think it's useful anymore. -- keith.pack...@intel.com pgpe3VVVBgodg.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] Various build fixes
On Sat, 8 Jan 2011 09:22:02 -0800, Dan Nicholson wrote: > Dan Nicholson (1): > xfree86: Convert libxf86config to static libtool library > > Tom Fogal (2): > Add macro for detecting thread local storage support. > Autodetect TLS support instead of defaulting to disabled. Merged. ac0a00a..3a91c2d master -> master -- keith.pack...@intel.com pgprTwU04VRBT.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH evdev] Export device node as property.
On Wed, Feb 2, 2011 at 1:21 PM, Peter Hutterer wrote: > On Wed, Feb 02, 2011 at 06:17:22AM -0800, Dan Nicholson wrote: >> On Tue, Feb 1, 2011 at 9:32 PM, Peter Hutterer >> wrote: >> > There is currently no mapping between XI devices and physical devices other >> > than what can be extracted by parsing the Xorg logfile. Add new property >> > "Device Node" to the driver to export the open device file. >> > >> > The client is responsible for detecting if the device is on the same host >> > and converting the data into a more useful format (e.g. sysfs path). >> > >> > Signed-off-by: Peter Hutterer >> > --- >> > Got poked again for this at LCA. turns out what I asked Peter to do ages >> > ago isn't actually feasable. I wanted this to be in the server so the >> > drivers can share this property without re-implementation everywhere. Now, >> > this doesn't work as the server can read the 'Option "Device"' value but >> > there's no guarantee that the content of that is actually the device patch. >> > e.g. synaptics may use "auto-dev". >> > >> > So here's a re-implementation that simply sets the property to the device >> > path the driver opened. Everything else is up to the client, it's quite >> > simple to get the sysfs path from the device node (about 5 lines with >> > libudev). >> > >> > The bit that goes in the server is the property name so we can at least >> > "standardise" on that. >> >> Do you see it being an issue that the property name is being defined >> in evdev.h but it's intended to be generic? It seems like something >> you'd want to export from a server header if you wanted all the >> drivers to standardize. > > it's defined in evdev.h so we can ship evdev (and build it :) without the > server having the define yet. I sent the matching two-line server patch out > as part of this thread. So it will be defined in the server. Gah. Now I see it. And it's guarded here by #ifndef, so that's good. >> Thinking about an in-server solution, the device node is available in >> InputAttributes for hotplugged devices. I'm not sure those are still >> available by the time you want to set the property, though (you >> probably looked into this). > > it comes down to the same argument. In the end the driver decides whether > the device is really the value of the device option. For a while, we had > synaptics search the nodes for event devices if the device option was > invalid (i.e. not a synaptics device). this was a bug, but it still > illustrates the point quite well. Yeah, I guess you're right about that. It's probably rare that the driver would do something different than using the device it was told, but ultimately that's in the driver's court. It would be cool if the server set the property by default, though. Acked-by: Dan Nicholson ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xselinux: Fix GetDrawableContext
On Thu, 20 Jan 2011 23:01:03 -0500, Adam Jackson wrote: > M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the > type value in the drawable itself. Merged. be3be75..ac0a00a master -> master -- keith.pack...@intel.com pgpp8x4Cqjw22.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH libFS] config: splitting FS and XTRANS compiler option no longer required
On 02/ 2/11 01:34 PM, Gaetan Nadon wrote: > This was done for the wrong reasons and fixed in commit: > 87c96993d17812a55d92ef32a91083614e258f02 > where the libfs.pc.in was fixed. > > Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH libFS] config: splitting FS and XTRANS compiler option no longer required
This was done for the wrong reasons and fixed in commit: 87c96993d17812a55d92ef32a91083614e258f02 where the libfs.pc.in was fixed. Signed-off-by: Gaetan Nadon --- configure.ac|7 +-- src/Makefile.am | 11 --- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 10140dc..20f8069 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,7 @@ XORG_DEFAULT_OPTIONS XORG_CHECK_MALLOC_ZERO # Obtain compiler/linker options for depedencies -PKG_CHECK_MODULES(FS, xproto fontsproto) - -# -# Split out so we don't include xtrans C flags in fs.pc -# -PKG_CHECK_MODULES(XTRANS, xtrans) +PKG_CHECK_MODULES(FS, xproto fontsproto xtrans) # Find needed libraries for TCP sockets (pre-pended in $LIBS) XTRANS_CONNECTION_FLAGS diff --git a/src/Makefile.am b/src/Makefile.am index ed70165..06e958f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,9 +29,14 @@ libFS_la_SOURCES = \ FSSynchro.c \ fs_transport.c -AM_CFLAGS = $(CWARNFLAGS) $(FS_CFLAGS) $(XTRANS_CFLAGS) $(MALLOC_ZERO_CFLAGS) \ - -DFS_t -DTRANS_CLIENT -libFS_la_LIBADD = $(FS_LIBS) $(XTRANS_LIBS) +AM_CFLAGS =\ + $(CWARNFLAGS) \ + $(FS_CFLAGS)\ + $(MALLOC_ZERO_CFLAGS) \ + -DFS_t \ + -DTRANS_CLIENT + +libFS_la_LIBADD = $(FS_LIBS) INCLUDES = -I$(top_srcdir)/include/X11/fonts -- 1.6.0.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH evdev] Export device node as property.
On Wed, Feb 02, 2011 at 06:17:22AM -0800, Dan Nicholson wrote: > On Tue, Feb 1, 2011 at 9:32 PM, Peter Hutterer > wrote: > > There is currently no mapping between XI devices and physical devices other > > than what can be extracted by parsing the Xorg logfile. Add new property > > "Device Node" to the driver to export the open device file. > > > > The client is responsible for detecting if the device is on the same host > > and converting the data into a more useful format (e.g. sysfs path). > > > > Signed-off-by: Peter Hutterer > > --- > > Got poked again for this at LCA. turns out what I asked Peter to do ages > > ago isn't actually feasable. I wanted this to be in the server so the > > drivers can share this property without re-implementation everywhere. Now, > > this doesn't work as the server can read the 'Option "Device"' value but > > there's no guarantee that the content of that is actually the device patch. > > e.g. synaptics may use "auto-dev". > > > > So here's a re-implementation that simply sets the property to the device > > path the driver opened. Everything else is up to the client, it's quite > > simple to get the sysfs path from the device node (about 5 lines with > > libudev). > > > > The bit that goes in the server is the property name so we can at least > > "standardise" on that. > > Do you see it being an issue that the property name is being defined > in evdev.h but it's intended to be generic? It seems like something > you'd want to export from a server header if you wanted all the > drivers to standardize. it's defined in evdev.h so we can ship evdev (and build it :) without the server having the define yet. I sent the matching two-line server patch out as part of this thread. So it will be defined in the server. > Thinking about an in-server solution, the device node is available in > InputAttributes for hotplugged devices. I'm not sure those are still > available by the time you want to set the property, though (you > probably looked into this). it comes down to the same argument. In the end the driver decides whether the device is really the value of the device option. For a while, we had synaptics search the nodes for event devices if the device option was invalid (i.e. not a synaptics device). this was a bug, but it still illustrates the point quite well. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xrdb] Properly honor -nocpp
Previously, if the user passed -nocpp and there was a cpp present, cpp would be used. This patch fixes that case. Signed-off-by: Jeremy Huddleston --- xrdb.c | 30 +- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/xrdb.c b/xrdb.c index 2e5882a..c3ef0fd 100644 --- a/xrdb.c +++ b/xrdb.c @@ -798,6 +798,23 @@ main(int argc, char *argv[]) /* initialize the includes String struct */ addstring(&includes, ""); +/* Pick the default cpp to use. This needs to be done before + * we parse the command line in order to honor -nocpp which sets + * it back to NULL. + */ +if (cpp_program == NULL) { + int number_of_elements + = (sizeof cpp_locations) / (sizeof cpp_locations[0]); + int j; + + for (j = 0; j < number_of_elements; j++) { + if (access(cpp_locations[j], X_OK) == 0) { + cpp_program = cpp_locations[j]; + break; + } + } +} + /* needs to be replaced with XrmParseCommand */ for (i = 1; i < argc; i++) { @@ -892,19 +909,6 @@ main(int argc, char *argv[]) filename = arg; } /* end for */ -/* If cpp to use was not specified, check for ones in default locations */ -if (cpp_program == NULL) { - int number_of_elements - = (sizeof cpp_locations) / (sizeof cpp_locations[0]); - int j; - - for (j = 0; j < number_of_elements; j++) { - if (access(cpp_locations[j], X_OK) == 0) { - cpp_program = cpp_locations[j]; - break; - } - } -} #ifndef WIN32 while ((i = open("/dev/null", O_RDONLY)) < 3) ; /* make sure later freopen won't clobber things */ -- 1.7.3.5 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:libX11 1/2] Expand GetSizeOfFile() macro at the one place it's called
On Wed, Feb 2, 2011 at 10:18:43 -0800, Alan Coopersmith wrote: > Removes XrmI.h header that only contained this single macro > > Signed-off-by: Alan Coopersmith > --- > src/Makefile.am |1 - > src/Xrm.c |9 +++-- > src/XrmI.h | 46 -- > 3 files changed, 7 insertions(+), 49 deletions(-) > delete mode 100644 src/XrmI.h > On Wed, Feb 2, 2011 at 10:18:44 -0800, Alan Coopersmith wrote: > We can simplify the fstat failure case now that the GetFileSize macro > has been expanded inline. > > Signed-off-by: Alan Coopersmith > --- > src/Xrm.c | 13 - > 1 files changed, 4 insertions(+), 9 deletions(-) > For both: Reviewed-by: Julien Cristau Cheers, Julien ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libX11 2/2] Xrm.c: ReadInFile: refactor fstat error handling
We can simplify the fstat failure case now that the GetFileSize macro has been expanded inline. Signed-off-by: Alan Coopersmith --- src/Xrm.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Xrm.c b/src/Xrm.c index 4337534..49fc258 100644 --- a/src/Xrm.c +++ b/src/Xrm.c @@ -1595,18 +1595,13 @@ ReadInFile(_Xconst char *filename) */ { struct stat status_buffer; - if ( (fstat((fd), &status_buffer)) == -1 ) - size = -1; - else + if ( (fstat((fd), &status_buffer)) == -1 ) { + close (fd); + return (char *)NULL; + } else size = status_buffer.st_size; } -/* There might have been a problem trying to stat a file */ -if (size == -1) { - close (fd); - return (char *)NULL; -} - if (!(filebuf = Xmalloc(size + 1))) { /* leave room for '\0' */ close(fd); return (char *)NULL; -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libX11 1/2] Expand GetSizeOfFile() macro at the one place it's called
Removes XrmI.h header that only contained this single macro Signed-off-by: Alan Coopersmith --- src/Makefile.am |1 - src/Xrm.c |9 +++-- src/XrmI.h | 46 -- 3 files changed, 7 insertions(+), 49 deletions(-) delete mode 100644 src/XrmI.h diff --git a/src/Makefile.am b/src/Makefile.am index 8b0953c..71e02e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -321,7 +321,6 @@ libX11_la_SOURCES = \ XomGeneric.h \ Xresinternal.h \ Xrm.c \ - XrmI.h \ Xxcbint.h # diff --git a/src/Xrm.c b/src/Xrm.c index fbc8ad2..4337534 100644 --- a/src/Xrm.c +++ b/src/Xrm.c @@ -60,7 +60,6 @@ from The Open Group. #ifdef XTHREADS #include "locking.h" #endif -#include "XrmI.h" #include #include "Xresinternal.h" #include "Xresource.h" @@ -1594,7 +1593,13 @@ ReadInFile(_Xconst char *filename) * result that the number of bytes actually read with be <= * to the size returned by fstat. */ -GetSizeOfFile(fd, size); +{ + struct stat status_buffer; + if ( (fstat((fd), &status_buffer)) == -1 ) + size = -1; + else + size = status_buffer.st_size; +} /* There might have been a problem trying to stat a file */ if (size == -1) { diff --git a/src/XrmI.h b/src/XrmI.h deleted file mode 100644 index 7e25607..000 --- a/src/XrmI.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - -Copyright 1990, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - - -/* - * Macros to abstract out reading the file, and getting its size. - * - * You may need to redefine these for various other operating systems. - */ - -#include -#include - -#define GetSizeOfFile(fd,size) \ -{ \ -struct stat status_buffer; \ -if ( (fstat((fd), &status_buffer)) == -1 ) \ - size = -1; \ -else\ - size = status_buffer.st_size; \ -} -- 1.7.3.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: Pull request for reviewed static analysis fixes, second batch
On 02/ 1/11 11:33 PM, Erkki Seppala wrote: > The following changes since commit e994ab227ed28655565c3193e63733630105e7f9: > Erkki Seppälä (1): > Comparing array against NULL is not useful "&xkb->server->vmods != > NULL" > > are available in the git repository at: > > g...@gitorious.org:erkkise/libx11-fixes.git fixes-reviewed-2011-02-01 > > Alan Coopersmith (1): > XDefaultOMIF.c: Fix memory leaks in get_font_name > > Ander Conselvan de Oliveira (4): > xcms/LRGB: Fix potential resource leak. > xcms/LRGB: Add a label for freeing property_return. > XlibInt: info_list->watch_data was reallocated, but result was discarded > lc/def/lcDefConv: Use Xcalloc to avoid use of uninitialized memory > > Erkki Seppälä (13): > xcmx/cmxColNm: Removed unused assignments to pBuf (in two functions) > xlibi18n/lcGeneric: Initialize uninitialized local variable > ximcp/imRmAttr: Handle leaking colormap_ret > ximcp/imRmAttr: Handle leaking missing_list > ximcp/imRm: Handle leaking colormap_ret > ImUtil: Handle a memory leak in one early return branch > Xrm: NEWTABLE had a memory leak after a memory allocation error > Xrm: Handle the extremely unlikely situation of fstat failing > GetProp: Zero-initialized error so its resourceID field is initialized > ximcp/imTrX: Handle failing XGetWindowProperty > ximcp/imLckup: Handle negative return value from _Xlcwctomb > xlibi18n/lcFile: Removed superfluous check for NULL target_dir > XlibInt: Use strncpy+zero termination instead of strcpy to enforce > buffer > size > > modules/im/ximcp/imLcLkup.c |4 > modules/im/ximcp/imRm.c |4 > modules/im/ximcp/imRmAttr.c |7 +-- > modules/im/ximcp/imTrX.c| 33 + > modules/lc/def/lcDefConv.c |2 +- > modules/lc/gen/lcGenConv.c |2 +- > src/GetProp.c |2 +- > src/ImUtil.c|1 + > src/XlibInt.c |8 +--- > src/Xrm.c | 10 +- > src/xcms/LRGB.c | 22 ++ > src/xcms/cmsColNm.c |4 ++-- > src/xlibi18n/XDefaultOMIF.c | 10 ++ > src/xlibi18n/lcFile.c |6 ++ > src/xlibi18n/lcGeneric.c|2 +- > 15 files changed, 69 insertions(+), 48 deletions(-) Thanks for the many fixes. Pushed to ssh://git.freedesktop.org/git/xorg/lib/libX11 9579635..450e174 master -> master -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xman 4/4] Use snprintf to PATH_MAX sized buffers to construct filenames
On 02/ 1/11 10:41 PM, Guillem Jover wrote: > Hi! > > On Fri, 2011-01-28 at 23:14:00 -0800, Alan Coopersmith wrote: >> diff --git a/misc.c b/misc.c >> index 0921307..8818aa8 100644 >> --- a/misc.c >> +++ b/misc.c >> @@ -693,7 +693,7 @@ ConstructCommand(cmdbuf, path, filename, tempfile) >> FILE *file; >> char fmtbuf[128]; >> int gotfmt = 0; /* set to 1 if we got a directive from >> source */ >> - char *fname = NULL; >> + char fname[PATH_MAX]; >> #ifdef __UNIXOS2__ >> int i; >> #endif > > POSIX does not mandate for a system w/o such limit to define PATH_MAX, > so this will make the build fail there (an example of such a system > could be GNU/Hurd). Of course you point this out after the patch is pushed... If any actual system runs into this theoretical problem, I'll happily accept a patch to add #ifndef PATH_MAX # define PATH_MAX 1024 /* Any man page path longer than this deserves not to load */ #endif -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: PendingBegin flag on XI_TouchMotionUnowned events?
On 01/25/2011 12:11 PM, Chase Douglas wrote: > On 01/25/2011 04:58 AM, Daniel Stone wrote: >> On Tue, Jan 25, 2011 at 11:35:37AM +1000, Peter Hutterer wrote: >>> On Mon, Jan 24, 2011 at 12:25:25PM -0500, Chase Douglas wrote: We currently have a mechanism for clients selecting for unowned events to receive motion and finish events (through the PendingFinish flag). However, how does a non-owner know that a TouchBegin event isn't owned yet? Should we mutate TouchBegin events to TouchMotionUnowned and set a PendingBegin flag? >>> >>> why not set the owner flag on the TouchBegin event? >> >> Actually, I was just going to send a TouchOwnership event straight after >> TouchBegin, to make life simpler for clients. So, TouchBegin means >> 'you will get events for this touch at some stage', and TouchOwnership >> means 'you're now the owner, go nuts', always. > > Ok, it was this part that I didn't understand when I made my changes to > the server. > > However, I'm not sure I like where this is going. It means that clients > will receive TouchBegin and TouchEnd events for touches they never > became owners of, even if they didn't want to receive unowned events. I > would prefer a protocol where most clients, who will not want unowned > events, do not receive any events until they are the owner. This will > prevent unnecessary wakeups of processes during gesture recognition, for > example. > > I have some ideas on how to accomplish this, but I've run out of time > before my next flight... Just to finish this thread, I realized that we could just say that clients who do not request unowned events will assume to have ownership upon receiving a TouchBegin event. This would fall in line with what Daniel proposed. Is this the direction we're going? Thanks, -- Chase ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Xi: constify XIChangeDeviceProperty()
On 01/30/2011 10:54 PM, Peter Hutterer wrote: > We don't modify "value", make it official. > > Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas > --- > Xi/xiproperty.c|2 +- > include/exevents.h |2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c > index b9f53f7..17835e2 100644 > --- a/Xi/xiproperty.c > +++ b/Xi/xiproperty.c > @@ -701,7 +701,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom > property, Bool fromClient) > int > XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, > int format, int mode, unsigned long len, > -pointer value, Bool sendevent) > +const pointer value, Bool sendevent) > { > XIPropertyPtr prop; > int size_in_bytes; > diff --git a/include/exevents.h b/include/exevents.h > index dc59430..2b22698 100644 > --- a/include/exevents.h > +++ b/include/exevents.h > @@ -69,7 +69,7 @@ extern _X_EXPORT int XIChangeDeviceProperty( > int /* format*/, > int /* mode*/, > unsigned long /* len*/, > -pointer /* value*/, > +const pointer /* value*/, > Bool/* sendevent*/ > ); > ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH evdev] Export device node as property.
On Tue, Feb 1, 2011 at 9:32 PM, Peter Hutterer wrote: > There is currently no mapping between XI devices and physical devices other > than what can be extracted by parsing the Xorg logfile. Add new property > "Device Node" to the driver to export the open device file. > > The client is responsible for detecting if the device is on the same host > and converting the data into a more useful format (e.g. sysfs path). > > Signed-off-by: Peter Hutterer > --- > Got poked again for this at LCA. turns out what I asked Peter to do ages > ago isn't actually feasable. I wanted this to be in the server so the > drivers can share this property without re-implementation everywhere. Now, > this doesn't work as the server can read the 'Option "Device"' value but > there's no guarantee that the content of that is actually the device patch. > e.g. synaptics may use "auto-dev". > > So here's a re-implementation that simply sets the property to the device > path the driver opened. Everything else is up to the client, it's quite > simple to get the sysfs path from the device node (about 5 lines with > libudev). > > The bit that goes in the server is the property name so we can at least > "standardise" on that. Do you see it being an issue that the property name is being defined in evdev.h but it's intended to be generic? It seems like something you'd want to export from a server header if you wanted all the drivers to standardize. Thinking about an in-server solution, the device node is available in InputAttributes for hotplugged devices. I'm not sure those are still available by the time you want to set the property, though (you probably looked into this). -- Dan ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH evdev v2] Add third button emulation.
Hi Peter, well, I still have troubles (again, based on the backport to 2.6.0). ;) On 02/02/2011 07:35 AM, Peter Hutterer wrote: New properties: "Evdev Third Button Emulation" → switch on/off "Evdev Third Button Emulation Timeout" → timeout until event is delivered "Evdev Third Button Emulation Button" → phys button to be emulated "Evdev Third Button Emulation Threshold" → move threshold before emulation is cancelled Signed-off-by: Peter Hutterer --- Changes since v1: - filter button event before it is posted, not before it is queued to avoid race with coordinate updates I did not manage to make it work (see comments below) - reset timer to NULL to avoid double-free great, the freezes stopped. - when cancelling, post the abs button event for the start position. I did not manage to make it work too (in relative mode). This may be introduce by the backport, so please just tell if you have trouble when setting the 3rd emulation with a generic mouse. Benjamin, the first two were the two issues you pointed out, should be fixed now. The last one I came up with all by myself :) again, applies to my people.fdo master branch Cheers, Peter include/evdev-properties.h |9 + man/evdev.man | 25 +++ src/Makefile.am|1 + src/emuThird.c | 387 src/evdev.c| 19 +++ src/evdev.h| 23 +++ 6 files changed, 464 insertions(+), 0 deletions(-) create mode 100644 src/emuThird.c diff --git a/include/evdev-properties.h b/include/evdev-properties.h index 7df2876..16f2af7 100644 --- a/include/evdev-properties.h +++ b/include/evdev-properties.h @@ -66,4 +66,13 @@ /* BOOL */ #define EVDEV_PROP_SWAP_AXES "Evdev Axes Swap" +/* BOOL */ +#define EVDEV_PROP_THIRDBUTTON "Evdev Third Button Emulation" +/* CARD32 */ +#define EVDEV_PROP_THIRDBUTTON_TIMEOUT "Evdev Third Button Emulation Timeout" +/* CARD8 */ +#define EVDEV_PROP_THIRDBUTTON_BUTTON "Evdev Third Button Emulation Button" +/* CARD32 */ +#define EVDEV_PROP_THIRDBUTTON_THRESHOLD "Evdev Third Button Emulation Threshold" + #endif diff --git a/man/evdev.man b/man/evdev.man index a202ae8..2709d7a 100644 --- a/man/evdev.man +++ b/man/evdev.man @@ -134,6 +134,31 @@ must be pressed before wheel emulation is started. If the is released before this timeout, the original button press/release event is sent. Default: 200. Property: "Evdev Wheel Emulation Timeout". .TP 7 +.BI "Option \*qEmulateThirdButton\*q \*q" boolean \*q +Enable third button emulation. Third button emulation emits a right button +event (by default) by pressing and holding the first button. The first +button must be held down for the configured timeout and must not move more +than the configured threshold for the emulation to activate. Otherwise, the +first button event is posted as normal. Default: off. Property: "Evdev +Third Button Emulation". +.TP 7 +.BI "Option \*qEmulateThirdButtonTimeout\*q \*q" integer \*q +Specifies the timeout in milliseconds between the initial button press and +the generation of the emulated button event. +Default: 1000. Property: "Evdev Third Button Emulation Timeout". +.TP 7 +.BI "Option \*qEmulateThirdButtonButton\*q \*q" integer \*q +Specifies the physical button number to be emitted if third button emulation +is triggered. +Default: 3. Property: "Evdev Third Button Button". +.TP 7 +.BI "Option \*qEmulateThirdButtonMoveThreshold\*q \*q" integer \*q +Specifies the maximum move fuzz in device coordinates for third button +emulation. If the device moves by more than this threshold before the third +button emulation is triggered, the emulation is cancelled and a first button +event is generated as normal. +Default: 20. Property: "Evdev Third Button Emulation Threshold". +.TP 7 .BI "Option \*qGrabDevice\*q \*q" boolean \*q Force a grab on the event device. Doing so will ensure that no other driver can initialise the same device and it will also stop the device from sending diff --git a/src/Makefile.am b/src/Makefile.am index a5c89ac..d1efe53 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,6 +35,7 @@ AM_CPPFLAGS =-I$(top_srcdir)/include @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \ @DRIVER_NAME@.h \ emuMB.c \ + emuThird.c \ emuWheel.c \ draglock.c diff --git a/src/emuThird.c b/src/emuThird.c new file mode 100644 index 000..139b7df --- /dev/null +++ b/src/emuThird.c @@ -0,0 +1,387 @@ +/* + * Copyright © 2011 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation,
Re: [PATCH evdev] Export device node as property.
> "Peter" == Peter Hutterer writes: Hi Peter, Thanks for picking this up again, I unfortunately have been busy with other things .. Peter> There is currently no mapping between XI devices and physical Peter> devices other than what can be extracted by parsing the Xorg Peter> logfile. Add new property "Device Node" to the driver to export Peter> the open device file. Peter> The client is responsible for detecting if the device is on the Peter> same host and converting the data into a more useful format Peter> (e.g. sysfs path). Peter> Signed-off-by: Peter Hutterer Peter> --- Peter> Got poked again for this at LCA. turns out what I asked Peter to Peter> do ages ago isn't actually feasable. I wanted this to be in the Peter> server so the drivers can share this property without Peter> re-implementation everywhere. Now, this doesn't work as the Peter> server can read the 'Option "Device"' value but there's no Peter> guarantee that the content of that is actually the device patch. Peter> e.g. synaptics may use "auto-dev". Peter> So here's a re-implementation that simply sets the property to Peter> the device path the driver opened. Everything else is up to the Peter> client, it's quite simple to get the sysfs path from the device Peter> node (about 5 lines with libudev). I obviously like the concept, but this assumption basically breaks remote X. What I think we really need is a unique identifier for XI devices (to be able to reapply properties at next login), and with hotplugging, the device node isn't really a good choice. For evdev I still think our best bet for a unique identifier is EVIOCGPHYS, like I did back then: http://peter.korsgaard.com/patches/xorg/evdev-add-phys-property-EVIOCGPHYS-as-stable-identifer-v2.patch E.G. use something like usb-:00:1d.1-1/input0 rather than /dev/input/event14. -- Bye, Peter Korsgaard ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel