Re: [PULL] kdrive fix

2013-04-04 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes:

 Geert Uytterhoeven (1):
   kdrive/fbdev: revive randr new screen size logic

 Peter Hutterer (1):
   Revert kdrive: fix set but not used warnings

Merged.
   ac4c2ab..8928f8f  master - master

-- 
keith.pack...@intel.com


pgp4iOqhSVCNi.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 1.14] input fixes for 1.14.1

2013-04-04 Thread Matt Dew

Acked.


On 04/02/2013 12:04 AM, Peter Hutterer wrote:

two comment fixes that are negligible, just there so the future merges are
easier.

The configure.ac and xfixes ones fix the build, they're much needed.

The following changes since commit 103b77c59e3638a45179bf6d7908f5c738d2d872:

   Version bumped to 1.14 (2013-03-05 22:31:17 -0800)

are available in the git repository at:

   git://people.freedesktop.org/~whot/xserver server-1.14-branch

for you to fetch changes up to 2eec013569f6daa952482ac5d9db8acc71fe01aa:

   dix: fix a comment (2013-04-02 15:50:10 +1000)


Peter Hutterer (3):
   xfixes: ifdef PanoramiXFixes* (#62015)
   Xi: add a comment to make a condition a bit clearer
   dix: fix a comment

Robert Morell (2):
   configure.ac: Require inputproto 2.3
   list.h: Make xorg_list_init inline

  Xi/exevents.c  | 1 +
  configure.ac   | 2 +-
  dix/touch.c| 3 ++-
  include/list.h | 2 +-
  xfixes/xfixesint.h | 2 ++
  5 files changed, 7 insertions(+), 3 deletions(-)



___
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: [xinit] XSLASHGLOB

2013-04-04 Thread Thomas Klausner
On Mon, Apr 01, 2013 at 10:18:10PM -0700, Alan Coopersmith wrote:
 On 07/12/12 04:57 AM, Thomas Klausner wrote:
  Hi!
  
  While looking at NetBSD xsrc patches I found one for xinit.
  
  Index: xinit/dist/xinitrc.cpp
  ===
  RCS file: /cvsroot/xsrc/external/mit/xinit/dist/xinitrc.cpp,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- xinit/dist/xinitrc.cpp  21 Nov 2010 03:47:48 -  1.1.1.3
  +++ xinit/dist/xinitrc.cpp  6 Mar 2011 01:05:51 -   1.2
  @@ -84,8 +84,9 @@
   XCOMM This is the fallback case if nothing else is executed above
   #endif /* !defined(__SCO__)   !defined(__UNIXWARE__) */
  
  +XCOMM do not use slash-star in the glob; slash-questionmark-star is 
  equivalent
   if [ -d XINITDIR/xinitrc.d ] ; then
  -   for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
  +   for f in XINITDIR/xinitrc.d/?*.sh ; do
  [ -x $f ]  . $f
  done
  unset f
  
  The commit message was:
  Use xinitrc.d/?*.sh as the matching pattern instead of needing a
  fragile sed substitution XSLASHGLOB to produce xinitrc.d/*.sh. (If
  that were used literally the slash-star would confuse cpp.)
  
  Fixes PR 44619. Patch has been sent upstream.
  
  
  I don't know where it was sent or if the discussion had a result, so
  I'd like to know if the patch would be accepted? (with an additional
  patch removing it from cpprules.in as well).
 
 Seems reasonable to me - I don't remember discussing it before, and does
 seem cleaner than patching it up in sed.

Thanks for the reply. I've just sent a git diff for cleaning this up.
 Thomas
___
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:xinit] Use xinitrc.d/?*.sh as the matching pattern instead of needing a fragile sed substitution XSLASHGLOB to produce xinitrc.d/*.sh. (If that were used literally the slash-star would confuse

2013-04-04 Thread Thomas Klausner
---
 cpprules.in | 1 -
 xinitrc.cpp | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpprules.in b/cpprules.in
index 92a987d..eaea428 100644
--- a/cpprules.in
+++ b/cpprules.in
@@ -10,7 +10,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
-e '/^[ ]*XHASH/s/XHASH/\#/' \
-   -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \
-e '/\@\@$$/s/\@\@$$/\\/'
 
 SUFFIXES = .cpp
diff --git a/xinitrc.cpp b/xinitrc.cpp
index 049a8e4..81c238b 100644
--- a/xinitrc.cpp
+++ b/xinitrc.cpp
@@ -85,7 +85,7 @@ XCOMM This is the fallback case if nothing else is executed 
above
 #endif /* !defined(__SCO__)   !defined(__UNIXWARE__) */
 
 if [ -d XINITDIR/xinitrc.d ] ; then
-   for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
+   for f in XINITDIR/xinitrc.d/?*.sh ; do
[ -x $f ]  . $f
done
unset f
-- 
1.8.1.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 v2 libXi] Require XFixes for PointerBarrier, remove duplicate typedef

2013-04-04 Thread Julien Cristau
On Thu, Mar 28, 2013 at 09:24:57 +1000, Peter Hutterer wrote:

 The PointerBarrier typedef is duplicate if a client includes both Xfixes.h
 and XInput2.h.
 
 gcc 4.6 won't complain about that, but earlier versions do:
 http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ce3765bf44e49ef0568a1ad4a0b7f807591d6412
 
 gcc 4.6 with -pedantic-errors shows:
 /opt/xorg/include/X11/extensions/XInput2.h:172:13: error: redefinition of
 typedef ‘PointerBarrier’ [-pedantic]
 In file included from test.c:1:0:
 /opt/xorg/include/X11/extensions/Xfixes.h:255:13: note: previous declaration
 of ‘PointerBarrier’ was here
 
 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

Reviewed-by: Julien Cristau jcris...@debian.org

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

Re: [PATCH synaptics 1/3] Improve readability of the soft button areas

2013-04-04 Thread Peter Hutterer
On Wed, Apr 03, 2013 at 09:09:08AM +0200, walter harms wrote:
 
 
 Am 03.04.2013 04:09, schrieb Peter Hutterer:
  Replace the hardcoded indices with enums that are somewhat expressive.
  
  Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
  ---
   src/synaptics.c | 78 
  +++--
   1 file changed, 48 insertions(+), 30 deletions(-)
  
  diff --git a/src/synaptics.c b/src/synaptics.c
  index df092c0..50eb34b 100644
  --- a/src/synaptics.c
  +++ b/src/synaptics.c
  @@ -367,42 +367,53 @@ SynapticsIsSoftButtonAreasValid(int *values)
   Bool right_disabled = FALSE;
   Bool middle_disabled = FALSE;
   
  +enum {
  +RBL = 0,
  +RBR = 1,
  +RBT = 2,
  +RBB = 3,
  +MBL = 4,
  +MBR = 5,
  +MBT = 6,
  +MBB = 7,
  +};
  +
 reading about readability; Could you please add a comment what RBL should 
 mean ?
 That would help people reading the code in future.

done, thanks.
fwiw: RBL == right button left edge, MBT == middle button top edge, etc.

Cheers,
   Peter
 
 
   /* Check right button area */
  -if values[0] != 0)  (values[1] != 0))  (values[0]  
  values[1])) ||
  -(((values[2] != 0)  (values[3] != 0))  (values[2]  
  values[3])))
  +if values[RBL] != 0)  (values[RBR] != 0))  (values[RBL]  
  values[RBR])) ||
  +(((values[RBT] != 0)  (values[RBB] != 0))  (values[RBT]  
  values[RBB])))
   return FALSE;
   
   /* Check middle button area */
  -if values[4] != 0)  (values[5] != 0))  (values[4]  
  values[5])) ||
  -(((values[6] != 0)  (values[7] != 0))  (values[6]  
  values[7])))
  +if values[MBL] != 0)  (values[MBR] != 0))  (values[MBL]  
  values[MBR])) ||
  +(((values[MBT] != 0)  (values[MBB] != 0))  (values[MBT]  
  values[MBB])))
   return FALSE;
   
  -if (values[0] == 0  values[1] == 0  values[2] == 0  values[3] == 
  0)
  +if (values[RBL] == 0  values[RBR] == 0  values[RBT] == 0  
  values[RBB] == 0)
   right_disabled = TRUE;
   
  -if (values[4] == 0  values[5] == 0  values[6] == 0  values[7] == 
  0)
  +if (values[MBL] == 0  values[MBR] == 0  values[MBT] == 0  
  values[MBB] == 0)
   middle_disabled = TRUE;
   
   if (!right_disabled 
  -((values[0]  values[0] == values[1]) ||
  - (values[2]  values[2] == values[3])))
  +((values[RBL]  values[RBL] == values[RBR]) ||
  + (values[RBT]  values[RBT] == values[RBB])))
   return FALSE;
   
   if (!middle_disabled 
  -((values[4]  values[4] == values[5]) ||
  - (values[6]  values[6] == values[7])))
  +((values[MBL]  values[MBL] == values[MBR]) ||
  + (values[MBT]  values[MBT] == values[MBB])))
   return FALSE;
   
   /* Check for overlapping button areas */
   if (!right_disabled  !middle_disabled) {
  -int right_left = values[0] ? values[0] : INT_MIN;
  -int right_right = values[1] ? values[1] : INT_MAX;
  -int right_top = values[2] ? values[2] : INT_MIN;
  -int right_bottom = values[3] ? values[3] : INT_MAX;
  -int middle_left = values[4] ? values[4] : INT_MIN;
  -int middle_right = values[5] ? values[5] : INT_MAX;
  -int middle_top = values[6] ? values[6] : INT_MIN;
  -int middle_bottom = values[7] ? values[7] : INT_MAX;
  +int right_left = values[RBL] ? values[RBL] : INT_MIN;
  +int right_right = values[RBR] ? values[RBR] : INT_MAX;
  +int right_top = values[RBT] ? values[RBT] : INT_MIN;
  +int right_bottom = values[RBB] ? values[RBB] : INT_MAX;
  +int middle_left = values[MBL] ? values[MBL] : INT_MIN;
  +int middle_right = values[MBR] ? values[MBR] : INT_MAX;
  +int middle_top = values[MBT] ? values[MBT] : INT_MIN;
  +int middle_bottom = values[MBB] ? values[MBB] : INT_MAX;
   
   /* If areas overlap in the Y axis */
   if ((right_bottom = middle_bottom  right_bottom = middle_top) 
  ||
  @@ -1360,23 +1371,30 @@ is_inside_button_area(SynapticsParameters * para, 
  int which, int x, int y)
   {
   Bool inside_area = TRUE;
   
  -if (para-softbutton_areas[which][0] == 0 
  -para-softbutton_areas[which][1] == 0 
  -para-softbutton_areas[which][2] == 0 
  -para-softbutton_areas[which][3] == 0)
  +enum {
  +LEFT = 0,
  +RIGHT = 1,
  +TOP = 2,
  +BOTTOM = 3
  +};
  +
  +if (para-softbutton_areas[which][LEFT] == 0 
  +para-softbutton_areas[which][RIGHT] == 0 
  +para-softbutton_areas[which][TOP] == 0 
  +para-softbutton_areas[which][BOTTOM] == 0)
   return FALSE;
   
  -if (para-softbutton_areas[which][0] 
  -x  para-softbutton_areas[which][0])
  +if (para-softbutton_areas[which][LEFT] 
  +x  para-softbutton_areas[which][LEFT])