xf86-input-mouse 1.7 blocker bug?
Peter, I'd like to nominate https://bugs.freedesktop.org/show_bug.cgi?id=34794 as a blocker bug for the relesase of xf86-input-mouse 1.7. I hope to be able to propose a fix in a few days, but please don't rush to release a new mouse driver (even if xorg 1.10 can't be used with 1.6) before this is fixed. -- Matthieu Herrb ___ 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: touchpad dell latitude d620 buffer overflow after touch
you are using 1.9.3 RC 1. did is work before ? i use a D620 with touchpad but the X11 is much older (7.2) and i have no problems. re, wh Am 26.02.2011 12:08, schrieb Bastiaan Wakkie: 1.9.3 RC 1 ___ 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] Don't clobber input device options from xorg.conf
Since commit b8d9c5ff removed commonOptions, we now need to append the Core{Keyboard,Pointer} options to the existing list. Fixes passing options to devices confirured in xorg.conf on systems where autoaddevices is false. Signed-off-by: Matthieu Herrb matthieu.he...@laas.fr --- hw/xfree86/common/xf86Config.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 382700f..6446668 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -1224,7 +1224,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) devs[count - 1] = xnfalloc(sizeof(InputInfoRec)); *devs[count - 1] = Pointer; devs[count - 1]-options = - xf86addNewOption(NULL, xnfstrdup(CorePointer), NULL); + xf86addNewOption(devs[count -1]-options, + xnfstrdup(CorePointer), NULL); devs[count] = NULL; servlayoutp-inputs = devs; } @@ -1364,7 +1365,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) devs[count - 1] = xnfalloc(sizeof(InputInfoRec)); *devs[count - 1] = Keyboard; devs[count - 1]-options = - xf86addNewOption(NULL, xnfstrdup(CoreKeyboard), NULL); + xf86addNewOption(devs[count - 1]-options, + xnfstrdup(CoreKeyboard), NULL); devs[count] = NULL; servlayoutp-inputs = devs; } -- 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
[PATCH] xf86AutoConfig: Try newport on mips.
As suggested by Bernhard R. Link in Debian bug report #566545 (http://bugs.debian.org/566545), newport is a candidate for autodetection on mips. Signed-off-by: Cyril Brulebois k...@debian.org --- hw/xfree86/common/xf86AutoConfig.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 5c6e721..ef1aab0 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -264,6 +264,8 @@ listPossibleVideoDrivers(char *matches[], int nmatches) matches[i++] = xnfstrdup(vesa); #elif defined(__sparc__) !defined(sun) matches[i++] = xnfstrdup(sunffb); +#elif defined(__mips__) + matches[i++] = xnfstrdup(newport); #endif } -- 1.7.4.1 ___ 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] Server build fixes
On Sun, Feb 27, 2011 at 03:26:32AM +0100, Cyril Brulebois wrote: Hi, Keith Packard kei...@keithp.com (26/02/2011): I read through the automake docs and they suggest placing a dependency on the generated configuration header file. We've got several, but there's the auto-generated do-not-use-config.h which holds all of the cpp defines which sdksyms.c may use. I think this is what we want: […] at least, this fixes the issue I was having. Steps to reproduce: git checkout master git clean -xdf autoreconf -vfi ./configure make dist # elsewhere tar xf $tarball cd $directory ./configure --disable-xv With master → fails, master + your patch → works. Accordingly: Tested-by: Cyril Brulebois k...@debian.org Also, the generated sdksyms.c lands in the build directory, meaning one can happily do stuff like: mkdir build1 build2 (cd build1 ../configure --disable-stuff) (cd build2 ../configure --enable-stuff) make -C build1 make -C build2 And even “make” build1 and build2 in parallel. (FYI, that's what we do in Debian: we build two flavours; one regular, one for the debian-installer; with a configuration phase, then a build phase; hence my issues with --disable-xv and the like. ;)) I rolled Keith's diff in with my own and added the fix of actually making sdksyms.dep be a prerequisite for sdksyms.c. I think that should fix all the cases. -- Dan From 6263490d272a2f15f1a38a8eb452b73e9bcd0ba2 Mon Sep 17 00:00:00 2001 From: Dan Nicholson dbn.li...@gmail.com Date: Sat, 26 Feb 2011 08:34:27 -0800 Subject: [PATCH] xfree86: Ensure sdksyms.c is regenerated when appropriate The contents of sdksyms.c are dependent on configuration, so they should be freshly generated each time and not shipped in the tarball. Prereqs on sdksyms.dep and one of the config.h files will ensure that the sdksyms.c is regenerated whenever config.status is run. Signed-off-by: Dan Nicholson dbn.li...@gmail.com --- hw/xfree86/loader/Makefile.am |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am index 7f386cc..3d864cd 100644 --- a/hw/xfree86/loader/Makefile.am +++ b/hw/xfree86/loader/Makefile.am @@ -17,13 +17,17 @@ libloader_la_SOURCES = \ loaderProcs.h \ loadext.c \ loadmod.c \ - os.c \ + os.c + +nodist_libloader_la_SOURCES = \ sdksyms.c + libloader_la_LIBADD = $(DLOPEN_LIBS) CLEANFILES = sdksyms.c sdksyms.dep -sdksyms.dep sdksyms.c: sdksyms.sh +sdksyms.c: sdksyms.dep +sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) SDKSYMS_DEP = sdksyms.dep -- 1.7.3.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] xf86AutoConfig: Try newport on mips.
From: Cyril Brulebois k...@debian.org Date: Sun, 27 Feb 2011 22:52:18 +0100 As suggested by Bernhard R. Link in Debian bug report #566545 (http://bugs.debian.org/566545), newport is a candidate for autodetection on mips. diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 5c6e721..ef1aab0 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -264,6 +264,8 @@ listPossibleVideoDrivers(char *matches[], int nmatches) matches[i++] = xnfstrdup(vesa); #elif defined(__sparc__) !defined(sun) matches[i++] = xnfstrdup(sunffb); +#elif defined(__mips__) + matches[i++] = xnfstrdup(newport); #endif } Not necessary a good idea. The autoconfig code was broken some time ago by a all-the-world-is-PCI believer some time ago. The breakage is that if you list more than a single possible video driver, things break. That's why we actually have a diff in the OpenBSD tree now that changes the #elif defined(__sparc__) !defined(sun) just above the bit you're adding into #elif defined(__sparc__) defined(__linux__) Since we have some (OpenBSD-specific) SBus/UPA autodetection code that can detect the hardware that needs the sunffb driver. The problems is of course that there are a lot of different MIPS-based platforms around, and most of them aren't an SGI Indy. If the Linux community thinks this is still a good idea, you could do something similar and use: #elif define(__mips__) defined(__linux__) Cheers, Mark ___ 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] xf86AutoConfig: Try newport on mips.
Hi, Mark Kettenis mark.kette...@xs4all.nl (27/02/2011): Not necessary a good idea. The autoconfig code was broken some time ago by a all-the-world-is-PCI believer some time ago. The breakage is that if you list more than a single possible video driver, things break. That's why we actually have a diff in the OpenBSD tree now that changes the #elif defined(__sparc__) !defined(sun) […] that probably should land upstream? If the Linux community thinks this is still a good idea, you could do something similar and use: #elif define(__mips__) defined(__linux__) FWIW, I'm mostly proxying Bernhard's patch, I can't unfortunately perform tests on those systems, being under Linux or other systems. KiBi. signature.asc Description: Digital 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 setxkbmap; 3rd try] Consistent handling of memory allocation errors.
On Sat, Feb 26, 2011 at 02:32:29AM +0300, Van de Bugger wrote: Macro `OOM' (Out of memory) introduced for checking and reporting memory allocation errors. The same macro is used in all the cases. One check was missed in original source; fixed. Changes after patch review: 1. `OOM' macro uses `do ... while (0)'. 2. `exit(-1)', not `abort()'. Signed-off-by: Van de Bugger van.de.bug...@gmail.com --- btw, if you put the changelog after the ---, git will skip it when merging and the commit message will be cleaner. You can also put other comments here that you don't want in the commit. so your commit message would end up being: one line subject multi-line comment Signed-off-by: --- Changes to v2: - blah - foobar setxkbmap.c | 27 +-- 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/setxkbmap.c b/setxkbmap.c index f7dbade..04c3fdf 100644 [...] either way - merged this patch, thank you! Cheers, Peter setxkbmap.c | 27 +-- 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/setxkbmap.c b/setxkbmap.c index f7dbade..04c3fdf 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -170,6 +170,8 @@ static int deviceSpec = XkbUseCoreKbd; #define ERR2(s,a,b) fprintf(stderr,s,a,b) #define ERR3(s,a,b,c) fprintf(stderr,s,a,b,c) +#define OOM(ptr)do { if ((ptr) == NULL) { ERR(Out of memory.\n); exit(-1); } } while (0) + /******/ Bool addToList(list_t *list, char *newVal); @@ -215,19 +217,16 @@ addToList(list_t *list, char *newVal) list-num = 0; list-sz = 4; list-item = (char **) calloc(list-sz, sizeof(char *)); +OOM(list-item); } else if (list-num = list-sz) { list-sz *= 2; list-item = (char **) realloc(list-item, (list-sz) * sizeof(char *)); -} -if (!list-item) -{ -ERR(Internal Error! Allocation failure in add to list!\n); -ERR(Exiting.\n); -exit(-1); +OOM(list-item); } list-item[list-num] = strdup(newVal); +OOM(list-item[list-num]); list-num += 1; return True; } @@ -663,8 +662,8 @@ addStringToOptions(char *opt_str, list_t *opts) char *tmp, *str, *next; Bool ok = True; -if ((str = strdup(opt_str)) == NULL) -return False; +str = strdup(opt_str); +OOM(str); for (tmp = str; (tmp *tmp != '\0') ok; tmp = next) { next = strchr(str, ','); @@ -700,21 +699,13 @@ stringFromOptions(char *orig, list_t *newOpts) if (orig) { orig = (char *) realloc(orig, len); -if (!orig) -{ -ERR(OOM in stringFromOptions\n); -return NULL; -} +OOM(orig); nOut = 1; } else { orig = (char *) calloc(len, 1); -if (!orig) -{ -ERR(OOM in stringFromOptions\n); -return NULL; -} +OOM(orig); nOut = 0; } for (i = 0; i newOpts-num; i++) -- 1.7.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
[PATCH] Xephyr: Mention Xserver's options are also accepted.
Originally reported in the Debian BTS: http://bugs.debian.org/582650 Signed-off-by: Jari Aalto jari.aa...@cante.net Signed-off-by: Cyril Brulebois k...@debian.org --- hw/kdrive/ephyr/man/Xephyr.man |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Apparently already rb'd by Alan, but probably forgotten at some point: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582650#38 Sending again, refreshed against master. diff --git a/hw/kdrive/ephyr/man/Xephyr.man b/hw/kdrive/ephyr/man/Xephyr.man index 8e7bfd5..12c9f58 100644 --- a/hw/kdrive/ephyr/man/Xephyr.man +++ b/hw/kdrive/ephyr/man/Xephyr.man @@ -39,6 +39,8 @@ uses the host X server window as framebuffer via fast SHM XImages. It also has support for visually debugging what the server is painting. .SH OPTIONS +The server accepts all the standard options of Xserver(__appmansuffix__) +and the following additional options: .TP 8 .BI -screen width x height sets the screen size. -- 1.7.4.1 ___ 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] Don't clobber input device options from xorg.conf
On Sun, Feb 27, 2011 at 08:16:03PM +0100, Matthieu Herrb wrote: Since commit b8d9c5ff removed commonOptions, we now need to append the Core{Keyboard,Pointer} options to the existing list. Fixes passing options to devices confirured in xorg.conf on systems where autoaddevices is false. Signed-off-by: Matthieu Herrb matthieu.he...@laas.fr --- hw/xfree86/common/xf86Config.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 382700f..6446668 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -1224,7 +1224,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) devs[count - 1] = xnfalloc(sizeof(InputInfoRec)); *devs[count - 1] = Pointer; devs[count - 1]-options = - xf86addNewOption(NULL, xnfstrdup(CorePointer), NULL); + xf86addNewOption(devs[count -1]-options, + xnfstrdup(CorePointer), NULL); devs[count] = NULL; servlayoutp-inputs = devs; } @@ -1364,7 +1365,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) devs[count - 1] = xnfalloc(sizeof(InputInfoRec)); *devs[count - 1] = Keyboard; devs[count - 1]-options = - xf86addNewOption(NULL, xnfstrdup(CoreKeyboard), NULL); + xf86addNewOption(devs[count - 1]-options, + xnfstrdup(CoreKeyboard), NULL); devs[count] = NULL; servlayoutp-inputs = devs; } -- 1.7.3.5 merged, thanks. 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: [PATCH] Xephyr: Mention Xserver's options are also accepted.
On Mon, Feb 28, 2011 at 12:26:41AM +0100, Cyril Brulebois wrote: Originally reported in the Debian BTS: http://bugs.debian.org/582650 Signed-off-by: Jari Aalto jari.aa...@cante.net Signed-off-by: Cyril Brulebois k...@debian.org --- hw/kdrive/ephyr/man/Xephyr.man |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Apparently already rb'd by Alan, but probably forgotten at some point: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582650#38 Sending again, refreshed against master. diff --git a/hw/kdrive/ephyr/man/Xephyr.man b/hw/kdrive/ephyr/man/Xephyr.man index 8e7bfd5..12c9f58 100644 --- a/hw/kdrive/ephyr/man/Xephyr.man +++ b/hw/kdrive/ephyr/man/Xephyr.man @@ -39,6 +39,8 @@ uses the host X server window as framebuffer via fast SHM XImages. It also has support for visually debugging what the server is painting. .SH OPTIONS +The server accepts all the standard options of Xserver(__appmansuffix__) +and the following additional options: .TP 8 .BI -screen width x height sets the screen size. -- 1.7.4.1 Reviewed-by: Peter Hutterer peter.hutte...@who-t.net 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: xf86-input-mouse 1.7 blocker bug?
On Sun, Feb 27, 2011 at 04:51:39PM +0100, Matthieu Herrb wrote: I'd like to nominate https://bugs.freedesktop.org/show_bug.cgi?id=34794 as a blocker bug for the relesase of xf86-input-mouse 1.7. I hope to be able to propose a fix in a few days, but please don't rush to release a new mouse driver (even if xorg 1.10 can't be used with 1.6) before this is fixed. no worries, please let me know when you've had a chance to test. 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: touchpad dell latitude d620 buffer overflow after touch
Hi, Yes it did work before. I cannot pin point excactly but I would say it still worked in ubunto 9.10. regards, Bastiaan On 02/27/2011 06:20 PM, walter harms wrote: you are using 1.9.3 RC 1. did is work before ? i use a D620 with touchpad but the X11 is much older (7.2) and i have no problems. re, wh Am 26.02.2011 12:08, schrieb Bastiaan Wakkie: 1.9.3 RC 1 ___ 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 setxkbmap] Few messages added for easier troubleshooting.
Will remove semicolon. On Sat, 2011-02-25 at 15:01 -0800, Alan Coopersmith wrote: On 02/25/11 12:38 PM, Van de Bugger wrote: If setxkbmap fails to load rules file, it is not possible to find out where setxkbmap looks for it. Increasing verbosity level does not help: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Couldn't find rules file (evdev) The problem fixed by adding two messages: before loading file and after successful loading. Messages are displayed if verbosity level is 8 or higher: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/local/share/X11/xkb/rules/evdev... Couldn't find rules file (evdev) That certainly seems useful for troubleshooting. +XkbRF_RulesPtr +tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules) +{ +XkbRF_RulesPtr rules = NULL; +VMSG1(7, Trying to load rules file %s...\n, name); +rules = XkbRF_Load(name, locale, wantDesc, wantRules); +if (rules) +{ +VMSG(7, Success.\n); +}; Extra ; after } ___ 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 setxkbmap; 2nd try] Few messages added for easier troubleshooting.
If setxkbmap fails to load rules file, it is not possible to find out where setxkbmap looks for it. Increasing verbosity level does not help: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Couldn't find rules file (evdev) The problem fixed by adding two messages: before loading file and after successful loading. Messages are displayed if verbosity level is 8 or higher: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/local/share/X11/xkb/rules/evdev... Couldn't find rules file (evdev) Signed-off-by: Van de Bugger van.de.bug...@gmail.com --- Changes after review: 1. Extra semicolon removed. setxkbmap.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/setxkbmap.c b/setxkbmap.c index 04c3fdf..88adea7 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -186,6 +186,7 @@ FILE *findFileInPath(char *name); Bool addStringToOptions(char *opt_str, list_t *opts); char *stringFromOptions(char *orig, list_t *newOpts); Bool applyConfig(char *name); +XkbRF_RulesPtr tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules); Bool applyRules(void); Bool applyComponentNames(void); void printKeymap(void); @@ -804,6 +805,19 @@ applyConfig(char *name) return True; } +XkbRF_RulesPtr +tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules) +{ +XkbRF_RulesPtr rules = NULL; +VMSG1(7, Trying to load rules file %s...\n, name); +rules = XkbRF_Load(name, locale, wantDesc, wantRules); +if (rules) +{ +VMSG(7, Success.\n); +} +return rules; +} + /** * If any of model, layout, variant or options is specified, then compile the * options into the @@ -839,7 +853,7 @@ applyRules(void) if (rfName[0] == '/') { -rules = XkbRF_Load(rfName, settings.locale.value, True, True); +rules = tryLoadRules(rfName, settings.locale.value, True, True); } else { @@ -854,7 +868,7 @@ applyRules(void) inclPath.item[i], rfName); continue; } -rules = XkbRF_Load(buf, settings.locale.value, True, True); +rules = tryLoadRules(buf, settings.locale.value, True, True); } } if (!rules) -- 1.7.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 setxkbmap; 2nd try] Few messages added for easier troubleshooting.
On Mon, Feb 28, 2011 at 03:35:25AM +0300, Van de Bugger wrote: If setxkbmap fails to load rules file, it is not possible to find out where setxkbmap looks for it. Increasing verbosity level does not help: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Couldn't find rules file (evdev) The problem fixed by adding two messages: before loading file and after successful loading. Messages are displayed if verbosity level is 8 or higher: $ ./setxkbmap -v 10 Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/local/share/X11/xkb/rules/evdev... Couldn't find rules file (evdev) Signed-off-by: Van de Bugger van.de.bug...@gmail.com --- Changes after review: 1. Extra semicolon removed. applied, thanks. Cheers, Peter setxkbmap.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/setxkbmap.c b/setxkbmap.c index 04c3fdf..88adea7 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -186,6 +186,7 @@ FILE *findFileInPath(char *name); Bool addStringToOptions(char *opt_str, list_t *opts); char *stringFromOptions(char *orig, list_t *newOpts); Bool applyConfig(char *name); +XkbRF_RulesPtr tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules); Bool applyRules(void); Bool applyComponentNames(void); void printKeymap(void); @@ -804,6 +805,19 @@ applyConfig(char *name) return True; } +XkbRF_RulesPtr +tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules) +{ +XkbRF_RulesPtr rules = NULL; +VMSG1(7, Trying to load rules file %s...\n, name); +rules = XkbRF_Load(name, locale, wantDesc, wantRules); +if (rules) +{ +VMSG(7, Success.\n); +} +return rules; +} + /** * If any of model, layout, variant or options is specified, then compile the * options into the @@ -839,7 +853,7 @@ applyRules(void) if (rfName[0] == '/') { -rules = XkbRF_Load(rfName, settings.locale.value, True, True); +rules = tryLoadRules(rfName, settings.locale.value, True, True); } else { @@ -854,7 +868,7 @@ applyRules(void) inclPath.item[i], rfName); continue; } -rules = XkbRF_Load(buf, settings.locale.value, True, True); +rules = tryLoadRules(buf, settings.locale.value, True, True); } } if (!rules) -- 1.7.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 synaptics] Fix build on BSD
On Fri, Feb 25, 2011 at 08:41:12PM +0100, Julien Cristau wrote: local was renamed to pInfo in 81ad2e389d11691d5c2687d83150e8e9033cfe76, but a couple places were missed. Signed-off-by: Julien Cristau jcris...@debian.org --- src/psmcomm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Failed build log at https://buildd.debian.org/fetch.cgi?pkg=xserver-xorg-input-synapticsarch=kfreebsd-i386ver=1.3.99.901-1stamp=1298259815file=logas=raw diff --git a/src/psmcomm.c b/src/psmcomm.c index 66e8d1e..741cd1d 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -147,7 +147,7 @@ PSMQueryHardware(InputInfoPtr pInfo) synhw = (struct SynapticsHwInfo*)priv-proto_data; /* is the synaptics touchpad active? */ -if (!PSMQueryIsSynaptics(local)) +if (!PSMQueryIsSynaptics(pInfo)) return FALSE; xf86Msg(X_PROBED, %s synaptics touchpad found\n, pInfo-name); @@ -167,7 +167,7 @@ PSMReadHwState(InputInfoPtr pInfo, struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { -return psaux_proto_operations.ReadHwState(local, proto_ops, comm, hwRet); +return psaux_proto_operations.ReadHwState(pInfo, proto_ops, comm, hwRet); } static Bool PSMAutoDevProbe(InputInfoPtr pInfo) -- 1.7.2.3 sorry. merged and pushed, thanks. 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: [PATCH setxkbmap] Minor style changes in help message.
On Fri, Feb 25, 2011 at 11:55:57PM +0300, Van de Bugger wrote: 1. `args' renamed to `options'. (xkbcomp and gcc name these entities `options'). 2. `Where legal args are:' replaced with `Options:'. (Short and correct. As I remember, GNU does not recommend to use word `legal' unless it related to law and lawyers). 3. Option descriptions shifted right by 2 space. (Like gcc.) Signed-off-by: Van de Bugger van.de.bug...@gmail.com --- merged, thanks. Cheers, Peter setxkbmap.c | 46 +++--- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/setxkbmap.c b/setxkbmap.c index fc0362e..5d97ad8 100644 --- a/setxkbmap.c +++ b/setxkbmap.c @@ -238,29 +238,29 @@ void usage(int argc, char **argv) { MSG1( -Usage: %s [args] [layout [variant [option ... ]]]\n -Where legal args are:\n --?, -help Print this message\n --compat name Specifies compatibility map component name\n --config file Specifies configuration file to use\n --device deviceid Specifies the device ID to use\n --display dpy Specifies display to use\n --geometry nameSpecifies geometry component name\n --Idir Add dir to list of directories to be used\n --keycodes nameSpecifies keycodes component name\n --keymap name Specifies name of keymap to load\n --layout name Specifies layout used to choose component names\n --model name Specifies model used to choose component names\n --option name Adds an option used to choose component names\n --print Print a complete xkb_keymap description and exit\n --query Print the current layout settings and exit\n --rules name Name of rules file to use\n --symbols name Specifies symbols component name\n --synch Synchronize request w/X server\n --types name Specifies types component name\n --v[erbose] [lvl] Sets verbosity (1..10). Higher values yield\n -more messages\n --variant name Specifies layout variant used to choose component names\n, +Usage: %s [options] [layout [variant [option ... ]]]\n +Options:\n + -?, -help Print this message\n + -compat name Specifies compatibility map component name\n + -config file Specifies configuration file to use\n + -device deviceid Specifies the device ID to use\n + -display dpy Specifies display to use\n + -geometry nameSpecifies geometry component name\n + -Idir Add dir to list of directories to be used\n + -keycodes nameSpecifies keycodes component name\n + -keymap name Specifies name of keymap to load\n + -layout name Specifies layout used to choose component names\n + -model name Specifies model used to choose component names\n + -option name Adds an option used to choose component names\n + -print Print a complete xkb_keymap description and exit\n + -query Print the current layout settings and exit\n + -rules name Name of rules file to use\n + -symbols name Specifies symbols component name\n + -synch Synchronize request with X server\n + -types name Specifies types component name\n + -v[erbose] [lvl] Sets verbosity (1..10). Higher values yield\n + more messages\n + -variant name Specifies layout variant used to choose component names\n, argv[0] ); } -- 1.7.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: [PULL] Server build fixes
On Sun, 27 Feb 2011 14:29:30 -0800, Dan Nicholson dbn.li...@gmail.com wrote: I rolled Keith's diff in with my own and added the fix of actually making sdksyms.dep be a prerequisite for sdksyms.c. I think that should fix all the cases. Actually, I'm wondering if sdksyms.dep isn't needed if we add an explicit dependency on do-not-use-config.h for sdksyms.c -- any change to the config stuff that might affect the contents of sdksyms.c will also change do-not-use-config.h, right? Or, am I just confused -- this is surprisingly twisty. -- keith.pack...@intel.com pgpVDjCUkWJYk.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] xf86AutoConfig: Try newport on mips.
Matt Turner matts...@gmail.com (28/02/2011): Since newport doesn't even compile anymore (since the RAC removal), this probably isn't helpful at all. Ah. At the moment I haven't rebuilt all drivers against 1.10 (only against 1.9.x for now), so I didn't notice that. Sorry for the noise then. KiBi. signature.asc Description: Digital 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 synaptics 1/8] United functions of SynapticsDefaultDimensions() and ReadDevDimensions()
On Sun, Feb 27, 2011 at 01:11:44AM +0500, Alexandr Shadchin wrote: There is no point doing the same thing in different places Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- src/alpscomm.c |2 +- src/ps2comm.c |2 +- src/psmcomm.c |2 +- src/synaptics.c| 96 --- src/synapticsstr.h |3 -- 5 files changed, 41 insertions(+), 64 deletions(-) diff --git a/src/alpscomm.c b/src/alpscomm.c index 84d2136..c5af681 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -233,5 +233,5 @@ struct SynapticsProtocolOperations alps_proto_operations = { ALPSQueryHardware, ALPSReadHwState, ALPSAutoDevProbe, -SynapticsDefaultDimensions +NULL }; diff --git a/src/ps2comm.c b/src/ps2comm.c index 4e372b3..a34613e 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -672,5 +672,5 @@ struct SynapticsProtocolOperations psaux_proto_operations = { PS2QueryHardware, PS2ReadHwState, PS2AutoDevProbe, -SynapticsDefaultDimensions +NULL }; diff --git a/src/psmcomm.c b/src/psmcomm.c index 741cd1d..903e6dd 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -181,5 +181,5 @@ struct SynapticsProtocolOperations psm_proto_operations = { PSMQueryHardware, PSMReadHwState, PSMAutoDevProbe, -SynapticsDefaultDimensions +NULL }; diff --git a/src/synaptics.c b/src/synaptics.c index 56ce725..daa0542 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -174,63 +174,6 @@ _X_EXPORT XF86ModuleData synapticsModuleData = { /* * Function Definitions / -/** - * Fill in default dimensions for backends that cannot query the hardware. - * Eventually, we want the edges to be 1900/5400 for x, 1900/4000 for y. - * These values are based so that calculate_edge_widths() will give us the - * right values. - * - * The default values 1900, etc. come from the dawn of time, when men where - * men, or possibly apes. - */ -void -SynapticsDefaultDimensions(InputInfoPtr pInfo) -{ -SynapticsPrivate *priv = (SynapticsPrivate *)pInfo-private; - -if (priv-minx = priv-maxx) -{ - priv-minx = 1615; - priv-maxx = 5685; - priv-resx = 0; - - xf86Msg(X_PROBED, - %s: invalid x-axis range. defaulting to %d - %d\n, - pInfo-name, priv-minx, priv-maxx); -} - -if (priv-miny = priv-maxy) -{ - priv-miny = 1729; - priv-maxy = 4171; - priv-resx = 0; - - xf86Msg(X_PROBED, - %s: invalid y-axis range. defaulting to %d - %d\n, - pInfo-name, priv-miny, priv-maxy); -} - -if (priv-minp = priv-maxp) -{ - priv-minp = 0; - priv-maxp = 256; - - xf86Msg(X_PROBED, - %s: invalid pressure range. defaulting to %d - %d\n, - pInfo-name, priv-minp, priv-maxp); -} - -if (priv-minw = priv-maxw) -{ - priv-minw = 0; - priv-maxw = 16; - - xf86Msg(X_PROBED, - %s: invalid finger width range. defaulting to %d - %d\n, - pInfo-name, priv-minw, priv-maxw); -} -} - static void SetDeviceAndProtocol(InputInfoPtr pInfo) { @@ -444,7 +387,6 @@ static void set_default_parameters(InputInfoPtr pInfo) * If the range was autodetected, apply these edge widths to all four * sides. */ -SynapticsDefaultDimensions(pInfo); width = abs(priv-maxx - priv-minx); height = abs(priv-maxy - priv-miny); @@ -2613,6 +2555,44 @@ ReadDevDimensions(InputInfoPtr pInfo) if (priv-proto_ops-ReadDevDimensions) priv-proto_ops-ReadDevDimensions(pInfo); + +if (priv-minx = priv-maxx) { +priv-minx = 1615; +priv-maxx = 5685; +priv-resx = 0; + +xf86Msg(X_PROBED, +%s: invalid x-axis range. defaulting to %d - %d\n, +pInfo-name, priv-minx, priv-maxx); +} + +if (priv-miny = priv-maxy) { +priv-miny = 1729; +priv-maxy = 4171; +priv-resy = 0; + +xf86Msg(X_PROBED, +%s: invalid y-axis range. defaulting to %d - %d\n, +pInfo-name, priv-miny, priv-maxy); +} + +if (priv-minp = priv-maxp) { +priv-minp = 0; +priv-maxp = 256; + +xf86Msg(X_PROBED, +%s: invalid pressure range. defaulting to %d - %d\n, +pInfo-name, priv-minp, priv-maxp); +} + +if (priv-minw = priv-maxw) { +priv-minw = 0; +priv-maxw = 16; + +xf86Msg(X_PROBED, +%s: invalid finger width range. defaulting to %d - %d\n, +pInfo-name, priv-minw, priv-maxw); +} } static Bool diff --git a/src/synapticsstr.h
Re: [PATCH synaptics 4/8] Move definition struct SynapticsHwInfo in ps2comm.h
On Sun, Feb 27, 2011 at 01:11:47AM +0500, Alexandr Shadchin wrote: Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- src/ps2comm.c |7 --- src/ps2comm.h |8 ++-- src/psmcomm.c |7 --- src/synproto.h |1 - 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/ps2comm.c b/src/ps2comm.c index a34613e..1ea09c9 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -82,13 +82,6 @@ #define PS2DBG(x) #endif -struct SynapticsHwInfo { -unsigned int model_id; /* Model-ID */ -unsigned int capabilities; /* Capabilities */ -unsigned int ext_cap;/* Extended Capabilities */ -unsigned int identity; /* Identification */ -}; can we give this some ps2-related name in a follow-up patch? Cheers, Peter - /* * PS/2 Utility functions. * Many parts adapted from tpconfig.c by C. Scott Ananian diff --git a/src/ps2comm.h b/src/ps2comm.h index fec5634..99ff3ec 100644 --- a/src/ps2comm.h +++ b/src/ps2comm.h @@ -94,10 +94,14 @@ typedef unsigned char byte; +struct SynapticsHwInfo { +unsigned int model_id; /* Model-ID */ +unsigned int capabilities; /* Capabilities */ +unsigned int ext_cap;/* Extended Capabilities */ +unsigned int identity; /* Identification */ +}; Bool ps2_putbyte(int fd, byte b); - -struct SynapticsHwInfo; void ps2_print_ident(const struct SynapticsHwInfo *synhw); #endif /* _PS2COMM_H_ */ diff --git a/src/psmcomm.c b/src/psmcomm.c index 903e6dd..88263ae 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -52,13 +52,6 @@ #define SYSCALL(call) while (((call) == -1) (errno == EINTR)) -struct SynapticsHwInfo { -unsigned int model_id; /* Model-ID */ -unsigned int capabilities; /* Capabilities */ -unsigned int ext_cap;/* Extended Capabilities */ -unsigned int identity; /* Identification */ -}; - /* * Identify Touchpad * See also the SYN_ID_* macros diff --git a/src/synproto.h b/src/synproto.h index 96ddf3e..a899a73 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -79,7 +79,6 @@ enum SynapticsProtocol { }; struct _SynapticsParameters; -struct SynapticsHwInfo; struct CommData; struct SynapticsProtocolOperations { -- 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 synaptics 5/8] Remove arg proto_ops in ReadHwState()
On Sun, Feb 27, 2011 at 01:11:48AM +0500, Alexandr Shadchin wrote: Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- Before need apply [PATCH synaptics] Fix build on BSD http://lists.x.org/archives/xorg-devel/2011-February/019664.html src/alpscomm.c |3 +-- src/eventcomm.c |1 - src/ps2comm.c | 13 ++--- src/ps2comm.h |3 +++ src/psmcomm.c |3 +-- src/synaptics.c |3 +-- src/synproto.h |1 - 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/alpscomm.c b/src/alpscomm.c index 56f74ac..3872f5c 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -33,10 +33,10 @@ #endif #include xorg-server.h -#include ps2comm.h #include synproto.h #include synaptics.h #include synapticsstr.h +#include ps2comm.h #include xf86.h @@ -206,7 +206,6 @@ ALPS_process_packet(unsigned char *packet, struct SynapticsHwState *hw) static Bool ALPSReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { unsigned char *buf = comm-protoBuf; diff --git a/src/eventcomm.c b/src/eventcomm.c index 1a31c54..d394d3f 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -316,7 +316,6 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev) static Bool EventReadHwState(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { struct input_event ev; diff --git a/src/ps2comm.c b/src/ps2comm.c index 1ea09c9..b676ddc 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -37,10 +37,10 @@ #endif #include xorg-server.h -#include ps2comm.h #include synproto.h #include synaptics.h #include synapticsstr.h +#include ps2comm.h #include xf86.h #define MAX_UNSYNC_PACKETS 10/* i.e. 10 to 60 bytes */ @@ -513,8 +513,8 @@ ps2_synaptics_get_packet(InputInfoPtr pInfo, struct SynapticsHwInfo *synhw, return FALSE; } -static Bool -PS2ReadHwState(InputInfoPtr pInfo, +Bool +PS2ReadHwStatePriv(InputInfoPtr pInfo, something like PS2ReadHwStateProto seems a better description of the function. Priv is a bit ambiguous, especially since the Priv one is called from two places and not actually the private one. Cheers, Peter struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { @@ -654,6 +654,13 @@ PS2ReadHwState(InputInfoPtr pInfo, } static Bool +PS2ReadHwState(InputInfoPtr pInfo, + struct CommData *comm, struct SynapticsHwState *hwRet) +{ +return PS2ReadHwStatePriv(pInfo, psaux_proto_operations, comm, hwRet); +} + +static Bool PS2AutoDevProbe(InputInfoPtr pInfo) { return FALSE; diff --git a/src/ps2comm.h b/src/ps2comm.h index 99ff3ec..733759a 100644 --- a/src/ps2comm.h +++ b/src/ps2comm.h @@ -103,5 +103,8 @@ struct SynapticsHwInfo { Bool ps2_putbyte(int fd, byte b); void ps2_print_ident(const struct SynapticsHwInfo *synhw); +Bool PS2ReadHwStatePriv(InputInfoPtr pInfo, + struct SynapticsProtocolOperations *proto_ops, + struct CommData *comm, struct SynapticsHwState *hwRet); #endif /* _PS2COMM_H_ */ diff --git a/src/psmcomm.c b/src/psmcomm.c index 88263ae..ea8cf88 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -157,10 +157,9 @@ PSMQueryHardware(InputInfoPtr pInfo) static Bool PSMReadHwState(InputInfoPtr pInfo, -struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet) { -return psaux_proto_operations.ReadHwState(pInfo, proto_ops, comm, hwRet); +return PS2ReadHwStatePriv(pInfo, psm_proto_operations, comm, hwRet); } static Bool PSMAutoDevProbe(InputInfoPtr pInfo) diff --git a/src/synaptics.c b/src/synaptics.c index b1d027f..1a559a2 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1196,8 +1196,7 @@ static Bool SynapticsGetHwState(InputInfoPtr pInfo, SynapticsPrivate *priv, struct SynapticsHwState *hw) { -return priv-proto_ops-ReadHwState(pInfo, priv-proto_ops, - priv-comm, hw); +return priv-proto_ops-ReadHwState(pInfo, priv-comm, hw); } /* diff --git a/src/synproto.h b/src/synproto.h index a899a73..3fe70b9 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -86,7 +86,6 @@ struct SynapticsProtocolOperations { void (*DeviceOffHook)(InputInfoPtr pInfo); Bool (*QueryHardware)(InputInfoPtr pInfo); Bool (*ReadHwState)(InputInfoPtr pInfo, - struct SynapticsProtocolOperations *proto_ops, struct CommData *comm, struct SynapticsHwState *hwRet); Bool (*AutoDevProbe)(InputInfoPtr pInfo); void
Re: [PATCH synaptics 2/8] Removing extra call SetDeviceAndProtocol()
On Sun, Feb 27, 2011 at 01:11:45AM +0500, Alexandr Shadchin wrote: SetDeviceAndProtocol() calling in SynapticsPreInit(), extra calling in DeviceOn() unnecessary. Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- src/synaptics.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/synaptics.c b/src/synaptics.c index daa0542..b1d027f 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -786,7 +786,6 @@ DeviceOn(DeviceIntPtr dev) DBG(3, Synaptics DeviceOn called\n); -SetDeviceAndProtocol(pInfo); pInfo-fd = xf86OpenSerial(pInfo-options); if (pInfo-fd == -1) { xf86Msg(X_WARNING, %s: cannot open input device\n, pInfo-name); -- 1.7.3.5 Reviewed-by: Peter Hutterer peter.hutte...@who-t.net 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: [PATCH synaptics 3/8] Delete empty alpscomm.h
On Sun, Feb 27, 2011 at 01:11:46AM +0500, Alexandr Shadchin wrote: Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Cheers, Peter --- src/Makefile.am |2 +- src/alpscomm.c |2 +- src/alpscomm.h | 33 - 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 src/alpscomm.h diff --git a/src/Makefile.am b/src/Makefile.am index 980ab5e..0637445 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c synapticsstr.h \ - alpscomm.c alpscomm.h \ + alpscomm.c \ ps2comm.c ps2comm.h \ synproto.h \ properties.c diff --git a/src/alpscomm.c b/src/alpscomm.c index c5af681..56f74ac 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -33,7 +33,7 @@ #endif #include xorg-server.h -#include alpscomm.h +#include ps2comm.h #include synproto.h #include synaptics.h #include synapticsstr.h diff --git a/src/alpscomm.h b/src/alpscomm.h deleted file mode 100644 index 547cf72..000 --- a/src/alpscomm.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright © 2004 Peter Osterlund - * - * 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, and that the name of Red Hat - * not be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. Red - * Hat makes no representations about the suitability of this software - * for any purpose. It is provided as is without express or implied - * warranty. - * - * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN - * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Authors: - * Peter Osterlund (pete...@telia.com) - */ - -#ifndef _ALPSCOMM_H_ -#define _ALPSCOMM_H_ - -#include ps2comm.h - - -#endif /* _ALPSCOMM_H_ */ -- 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 synaptics 6/8] Remove extra definition CommData
On Sun, Feb 27, 2011 at 01:11:49AM +0500, Alexandr Shadchin wrote: Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- src/synproto.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/synproto.h b/src/synproto.h index 3fe70b9..4b37df0 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -79,7 +79,6 @@ enum SynapticsProtocol { }; struct _SynapticsParameters; -struct CommData; struct SynapticsProtocolOperations { void (*DeviceOnHook)(InputInfoPtr pInfo, struct _SynapticsParameters *para); -- 1.7.3.5 Reviewed-by: Peter Hutterer peter.hutte...@who-t.net 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: [PATCH synaptics 7/8] Rewrite mechanisn detect Protocol and Device
typo in subject Rewrite mechanisn _to_ detect ... please describe in the commit message what you did here. in the future, it'll be much easier to understand why a line was changed and this commit isn't as straightforward as removing dead code. On Sun, Feb 27, 2011 at 01:11:50AM +0500, Alexandr Shadchin wrote: It is now easier to add new backends Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- src/alpscomm.c |8 +- src/ps2comm.c |8 +- src/psmcomm.c |7 + src/synaptics.c | 80 --- src/synproto.h | 16 +++--- 5 files changed, 37 insertions(+), 82 deletions(-) diff --git a/src/alpscomm.c b/src/alpscomm.c index 3872f5c..dc76655 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -220,17 +220,11 @@ ALPSReadHwState(InputInfoPtr pInfo, return TRUE; } -static Bool -ALPSAutoDevProbe(InputInfoPtr pInfo) -{ -return FALSE; -} - struct SynapticsProtocolOperations alps_proto_operations = { NULL, NULL, ALPSQueryHardware, ALPSReadHwState, -ALPSAutoDevProbe, +NULL, NULL }; diff --git a/src/ps2comm.c b/src/ps2comm.c index b676ddc..92665c8 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -660,17 +660,11 @@ PS2ReadHwState(InputInfoPtr pInfo, return PS2ReadHwStatePriv(pInfo, psaux_proto_operations, comm, hwRet); } -static Bool -PS2AutoDevProbe(InputInfoPtr pInfo) -{ -return FALSE; -} - struct SynapticsProtocolOperations psaux_proto_operations = { NULL, PS2DeviceOffHook, PS2QueryHardware, PS2ReadHwState, -PS2AutoDevProbe, +NULL, NULL }; diff --git a/src/psmcomm.c b/src/psmcomm.c index ea8cf88..8d633bd 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -162,16 +162,11 @@ PSMReadHwState(InputInfoPtr pInfo, return PS2ReadHwStatePriv(pInfo, psm_proto_operations, comm, hwRet); } -static Bool PSMAutoDevProbe(InputInfoPtr pInfo) -{ -return FALSE; -} - struct SynapticsProtocolOperations psm_proto_operations = { NULL, NULL, PSMQueryHardware, PSMReadHwState, -PSMAutoDevProbe, +NULL, NULL }; diff --git a/src/synaptics.c b/src/synaptics.c index 1a559a2..8819798 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -135,6 +135,18 @@ void InitDeviceProperties(InputInfoPtr pInfo); int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly); +const static SynapticsProtocolRec protocols[] = { +{psaux, psaux_proto_operations}, +{alps, alps_proto_operations}, +#ifdef BUILD_PSMCOMM +{psm, psm_proto_operations}, +#endif +#ifdef BUILD_EVENTCOMM +{event, event_proto_operations}, +#endif +{NULL, NULL} +}; event is the most common backend these days, moving it up would save precious nanoseconds ;) + InputDriverRec SYNAPTICS = { 1, synaptics, @@ -177,61 +189,23 @@ _X_EXPORT XF86ModuleData synapticsModuleData = { static void SetDeviceAndProtocol(InputInfoPtr pInfo) { -char *str_par, *device; SynapticsPrivate *priv = pInfo-private; -enum SynapticsProtocol proto = SYN_PROTO_PSAUX; +char *proto, *device; +int i; +proto = xf86SetStrOption(pInfo-options, Protocol, NULL); device = xf86SetStrOption(pInfo-options, Device, NULL); -if (!device) { - device = xf86SetStrOption(pInfo-options, Path, NULL); - if (device) { - pInfo-options = - xf86ReplaceStrOption(pInfo-options, Device, device); - } -} -if (device strstr(device, /dev/input/event)) { -#ifdef BUILD_EVENTCOMM - proto = SYN_PROTO_EVENT; -#endif -} else { - str_par = xf86FindOptionValue(pInfo-options, Protocol); - if (str_par !strcmp(str_par, psaux)) { - /* Already set up */ -#ifdef BUILD_EVENTCOMM - } else if (str_par !strcmp(str_par, event)) { - proto = SYN_PROTO_EVENT; -#endif /* BUILD_EVENTCOMM */ -#ifdef BUILD_PSMCOMM - } else if (str_par !strcmp(str_par, psm)) { - proto = SYN_PROTO_PSM; -#endif /* BUILD_PSMCOMM */ - } else if (str_par !strcmp(str_par, alps)) { - proto = SYN_PROTO_ALPS; - } else { /* default to auto-dev */ -#ifdef BUILD_EVENTCOMM - if (!device event_proto_operations.AutoDevProbe(pInfo)) - proto = SYN_PROTO_EVENT; -#endif - } -} -switch (proto) { -case SYN_PROTO_PSAUX: - priv-proto_ops = psaux_proto_operations; - break; -#ifdef BUILD_EVENTCOMM -case SYN_PROTO_EVENT: - priv-proto_ops = event_proto_operations; - break; -#endif /* BUILD_EVENTCOMM */ -#ifdef BUILD_PSMCOMM -case SYN_PROTO_PSM: - priv-proto_ops = psm_proto_operations; - break; -#endif /* BUILD_PSMCOMM */ -case SYN_PROTO_ALPS: - priv-proto_ops = alps_proto_operations; - break; +for (i = 0;
Re: [PATCH synaptics 8/8] Now ps2comm and alpscomm backend optional
On Sun, Feb 27, 2011 at 01:11:51AM +0500, Alexandr Shadchin wrote: Signed-off-by: Alexandr Shadchin alexandr.shadc...@gmail.com --- OpenBSD don't support this backends. Backend for OpenBSD I'll add later. Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Cheers, Peter configure.ac| 20 +++- src/Makefile.am |8 ++-- src/synaptics.c |2 ++ src/synproto.h |5 +++-- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index ea66935..edfc4e4 100644 --- a/configure.ac +++ b/configure.ac @@ -98,21 +98,31 @@ AM_CONDITIONAL(DEBUG, [test x$DEBUGGING = xyes]) AC_MSG_CHECKING([which optional backends will be build]) case ${host} in *linux*) - AC_MSG_RESULT([eventcomm]) + AC_MSG_RESULT([ps2comm alpscomm eventcomm]) + BUILD_PS2COMM=yes BUILD_EVENTCOMM=yes - AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) ;; -*freebsd* | *openbsd* | *netbsd* | *dragonfly*) - AC_MSG_RESULT([psmcomm]) +*freebsd* | *netbsd* | *dragonfly*) + AC_MSG_RESULT([ps2comm alpscomm psmcomm]) + BUILD_PS2COMM=yes BUILD_PSMCOMM=yes - AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) ;; *) AC_MSG_RESULT([none]) ;; esac +if test x$BUILD_EVENTCOMM = xyes; then +AC_DEFINE(BUILD_EVENTCOMM, 1, [Optional backend eventcomm enabled]) +fi +if test x$BUILD_PSMCOMM = xyes; then +AC_DEFINE(BUILD_PSMCOMM, 1, [Optional backend psmcomm enabled]) +fi +if test x$BUILD_PS2COMM = xyes; then +AC_DEFINE(BUILD_PS2COMM, 1, [Optional backend ps2comm and alpscomm enabled]) +fi AM_CONDITIONAL([BUILD_EVENTCOMM], [test x${BUILD_EVENTCOMM} = xyes]) AM_CONDITIONAL([BUILD_PSMCOMM], [test x${BUILD_PSMCOMM} = xyes]) +AM_CONDITIONAL([BUILD_PS2COMM], [test x${BUILD_PS2COMM} = xyes]) # - #Dependencies for synclient and syndaemon diff --git a/src/Makefile.am b/src/Makefile.am index 0637445..ff513f1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,11 +32,15 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c synapticsstr.h \ - alpscomm.c \ - ps2comm.c ps2comm.h \ synproto.h \ properties.c +if BUILD_PS2COMM +@DRIVER_NAME@_drv_la_SOURCES += \ + alpscomm.c \ + ps2comm.c ps2comm.h +endif + if BUILD_EVENTCOMM @DRIVER_NAME@_drv_la_SOURCES += \ eventcomm.c eventcomm.h diff --git a/src/synaptics.c b/src/synaptics.c index 8819798..3b6e63b 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -136,8 +136,10 @@ int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly); const static SynapticsProtocolRec protocols[] = { +#ifdef BUILD_PS2COMM {psaux, psaux_proto_operations}, {alps, alps_proto_operations}, +#endif #ifdef BUILD_PSMCOMM {psm, psm_proto_operations}, #endif diff --git a/src/synproto.h b/src/synproto.h index 9c25428..700cf7a 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -84,14 +84,15 @@ typedef struct { struct SynapticsProtocolOperations *proto_ops; } SynapticsProtocolRec; +#ifdef BUILD_PS2COMM extern struct SynapticsProtocolOperations psaux_proto_operations; +extern struct SynapticsProtocolOperations alps_proto_operations; +#endif /* BUILD_PS2COMM */ #ifdef BUILD_EVENTCOMM extern struct SynapticsProtocolOperations event_proto_operations; #endif /* BUILD_EVENTCOMM */ #ifdef BUILD_PSMCOMM extern struct SynapticsProtocolOperations psm_proto_operations; #endif /* BUILD_PSMCOMM */ -extern struct SynapticsProtocolOperations alps_proto_operations; - #endif /* _SYNPROTO_H_ */ -- 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 v3 11/11] glx: Cleanup DRI2Drawable
On Wed, 2011-02-16 at 12:21 +0200, Pauli wrote: From: Pauli Nieminen ext-pauli.niemi...@nokia.com glx should cleanup DRI2Drawable when GLXDrawable is destroyed. v3: * Fix resource destruction order between GLX and DRI2 when client disconnects. Signed-off-by: Pauli Nieminen ext-pauli.niemi...@nokia.com --- glx/glxdri2.c | 12 hw/xfree86/dri2/dri2.c | 18 ++ hw/xfree86/dri2/dri2.h | 18 ++ 3 files changed, 48 insertions(+), 0 deletions(-) For the series: Reviewed-By: Christopher James Halse Rogers christopher.halse.rog...@canonical.com signature.asc Description: This is a digitally signed message part ___ 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