Re: [PATCH v2 1/7] xkeyboard-config: Geometries for Apple Aluminium Keyboards

2010-02-20 Thread Sergey Udaltsov
This one is ok for me. But lads, pretty please - use the bugzilla for
patches. Seriously.

Sergey

On Fri, Feb 19, 2010 at 3:20 AM, Peter Hutterer
peter.hutte...@who-t.net wrote:
 On Fri, Jan 22, 2010 at 11:42:13PM +0100, Damien Ciabrini wrote:
 Geometries for the long, wired Aluminium Keyboard:
   . ANSI model (United States, 109 keys)
   . ISO model (International, 110 keys)
   . JIS model (Japanese, 112 keys)

 Signed-off-by: Damien Ciabrini damien.ciabr...@gmail.com
 ---
 Thanks for your comments, patch reworked accordingly.
 I've also added the signed-off-by tag which was missing in all my previous 
 patches, sorry!


 Acked-by: Peter Hutterer peter.hutte...@who-t.net

 Cheers,
  Peter

  geometry/macintosh |  877 
 
  1 files changed, 877 insertions(+), 0 deletions(-)

 diff --git a/geometry/macintosh b/geometry/macintosh
 index e4b4774..4d81eb3 100644
 --- a/geometry/macintosh
 +++ b/geometry/macintosh
 @@ -568,3 +568,880 @@ xkb_geometry macbook79 {

  }; // End of default geometry

 +
 +// Aluminium Keyboard, ANSI model (United States, 109 keys)
 +xkb_geometry applealu_ansi {
 +
 +    width=       430;
 +    height=      113.5;
 +
 +    baseColor=   white;
 +    labelColor=  black;
 +    xfont=       -*-helvetica-medium-r-normal--*-80-*-*-*-*-iso8859-1;
 +    description= Aluminium Keyboard (ANSI);
 +
 +    shape NORM {
 +        corner= 1,
 +        { [  15.5,  15 ] }
 +    };
 +    shape FUNC {
 +        corner= 1,
 +        { [  16.1,   9 ] }
 +    };
 +    shape FUNS {
 +        corner= 1,
 +        { [  15.5,  9 ] }
 +    };
 +    shape BKSP {
 +        corner= 1,
 +        { [  24.5,  15 ] }
 +    };
 +    shape TAB {
 +        corner= 1,
 +        { [  24.5,  15 ] }
 +    };
 +    shape RTRN {
 +        corner= 1,
 +        { [  29.5,  15 ] }
 +    };
 +    shape CAPS {
 +        corner= 1,
 +        { [  29.5,  15 ] }
 +    };
 +    shape LCTL {
 +        corner= 1,
 +        { [  25,  18  ] }
 +    };
 +    shape LALT {
 +        corner= 1,
 +        { [  20,  18 ] }
 +    };
 +    shape LMTA {
 +        corner= 1,
 +        { [  25,  18 ] }
 +    };
 +    shape LFSH {
 +        corner= 1,
 +        { [  39,  15 ] }
 +    };
 +    shape RCTL {
 +        corner= 1,
 +        { [  25,  18 ] }
 +    };
 +    shape RALT {
 +        corner= 1,
 +        { [  20,  18 ] }
 +    };
 +    shape RMTA {
 +        corner= 1,
 +        { [  25,  18 ] }
 +    };
 +    shape RTSH {
 +        corner= 1,
 +        { [  39,  15 ] }
 +    };
 +    shape SPCE {
 +        corner= 1,
 +        { [ 110.5,  18 ] }
 +    };
 +    shape KP0 {
 +        corner= 1,
 +        { [  34.5,  18 ] }
 +    };
 +    shape KPEN {
 +        corner= 1,
 +        { [  15.5,  36.5 ] }
 +    };
 +    shape KPDT {
 +        corner= 1,
 +        { [  15.5,  18 ] }
 +    };
 +    shape LED {
 +        corner= 0.5,
 +        { [   1.5,   1.5 ] }
 +    };
 +
 +    section Function {
 +        key.color= white;
 +        priority=  7;
 +        top=       4.5;
 +        left=      4.7;
 +        width=     420.5;
 +        height=    10;
 +        row {
 +            top=  0;
 +            left= 0;
 +            keys {
 +                {  ESC, FUNC,   0 },   { FK01, FUNC,   3.6 },
 +                { FK02, FUNC,   3.5 }, { FK03, FUNC,   3.6 },
 +                { FK04, FUNC,   3.5 }, { FK05, FUNC,   3.6 },
 +                { FK06, FUNC,   3.5 }, { FK07, FUNC,   3.6 },
 +                { FK08, FUNC,   3.5 }, { FK09, FUNC,   3.6 },
 +                { FK10, FUNC,   3.5 }, { FK11, FUNC,   3.6 },
 +                { FK12, FUNC,   3.5 }, { I169, FUNC,   3.5 },
 +                { FK13, FUNS,  11.5 }, { FK14, FUNS,   3.5 },
 +                { FK15, FUNS,   3.5 }, { FK16, FUNS,  11.5 },
 +                { FK17, FUNS,   3.5 }, { FK18, FUNS,   3.5 },
 +                { FK19, FUNS,   3.5 }
 +            };
 +        };
 +    }; // End of Function section
 +
 +    section Alpha {
 +        key.color= white;
 +        priority=  8;
 +        top=       17;
 +        left=      5;
 +        width=     271.5;
 +        height=    92;
 +        row {
 +            top=  0;
 +            left= 0;
 +            keys {
 +                { TLDE, NORM,   0 },   { AE01, NORM,   3.5 },
 +                { AE02, NORM,   3.5 }, { AE03, NORM,   3.5 },
 +                { AE04, NORM,   3.5 }, { AE05, NORM,   3.5 },
 +                { AE06, NORM,   3.5 }, { AE07, NORM,   3.5 },
 +                { AE08, NORM,   3.5 }, { AE09, NORM,   3.5 },
 +                { AE10, NORM,   3.5 }, { AE11, NORM,   3.5 },
 +                { AE12, NORM,   3.5 }, { BKSP, BKSP,   3.5 }
 +            };
 +        };
 +        row {
 +            top=  18.5;
 +            left= 0;
 +            keys {
 +                {  TAB, TAB,   0 },    { AD01, NORM,   3.5 },
 +                { AD02, NORM,   3.5 }, { AD03, NORM,   3.5 },
 +                { AD04, NORM,   3.5 }, { AD05, NORM,   3.5 },
 +                { AD06, NORM,   3.5 

[PATCH xserver/dri2 2/3] DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML()

2010-02-20 Thread Mario Kleiner
Added implementation for case target_sbc == 0. In that case, the
function shall schedule a wait until all pending swaps for the drawable
have completed.

Fix for non-blocking case. Old implementation returned random,
uninitialized values for (ust,msc,sbc) if it returned immediately
without scheduling a wait due to sbc = target_sbc.

Now if function doesn't schedule a wait, but returns immediately,
it returns the (ust,msc,sbc) of the most recently completed swap,
i.e., the UST and MSC corresponding to the time when the returned
current SBC was reached.

Signed-off-by: Mario Kleiner mario.klei...@tuebingen.mpg.de
---
 hw/xfree86/dri2/dri2.c |   25 +++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index baf0df8..7f40d28 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -64,6 +64,8 @@ typedef struct _DRI2Drawable {
 CARD64  swap_count;
 CARD64  target_sbc; /* -1 means no SBC wait outstanding */
 CARD64  last_swap_target; /* most recently queued swap target 
*/
+CARD64  last_swap_msc; /* msc at completion of most recent 
swap */
+CARD64  last_swap_ust; /* ust at completion of most recent 
swap */
 int swap_limit; /* for N-buffering */
 } DRI2DrawableRec, *DRI2DrawablePtr;
 
@@ -142,6 +144,8 @@ DRI2CreateDrawable(DrawablePtr pDraw)
 pPriv-swap_interval = 1;
 pPriv-last_swap_target = -1;
 pPriv-swap_limit = 1; /* default to double buffering */
+pPriv-last_swap_msc = 0;
+pPriv-last_swap_ust = 0;
 
 if (pDraw-type == DRAWABLE_WINDOW)
 {
@@ -518,6 +522,9 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int 
frame,
 if (swap_complete)
swap_complete(client, swap_data, type, ust, frame, pPriv-swap_count);
 
+pPriv-last_swap_msc = frame;
+pPriv-last_swap_ust = ust;
+
 DRI2WakeClient(client, pDraw, frame, tv_sec, tv_usec);
 }
 
@@ -714,8 +721,22 @@ DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 
target_sbc,
 if (pPriv == NULL)
return BadDrawable;
 
-if (pPriv-swap_count = target_sbc)
-   return Success;
+/* target_sbc == 0 means to block until all pending swaps are
+ * finished. Recalculate target_sbc to get that behaviour.
+ */
+if (target_sbc == 0)
+target_sbc = pPriv-swap_count + pPriv-swapsPending;
+
+/* If current swap count already = target_sbc,
+ * return immediately with (ust, msc, sbc) triplet of
+ * most recent completed swap.
+ */
+if (pPriv-swap_count = target_sbc) {
+*sbc = pPriv-swap_count;
+*msc = pPriv-last_swap_msc;
+*ust = pPriv-last_swap_ust;
+return Success;
+}
 
 pPriv-target_sbc = target_sbc;
 DRI2BlockClient(client, pDraw);
-- 
1.6.6

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xserver/dri2] Improvements to DRI2 2.2 protocol bits.

2010-02-20 Thread Mario Kleiner
The following series of 3 patches contains some bug fixes and adds some
missing functionality to the new DRI2 2.2 protocol requests for
implementation of the SGI_swap_interval and OML_sync_control GLX
extensions.

Jesse Barnes already had a positive look at these patches, but i couldn't test
any of the patches, not even if they compile, due to lack of suitable hardware.

Could somebody please test these and apply them if appropriate?

Thanks,
mario

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xserver/dri2] Fixes and Improvements for DRI 2.2 protocol bits

2010-02-20 Thread Mario Kleiner
Hi,

the patch series against the xserver i just sent out contains bug  
fixes and adds missing functionality for the new DRI2 2.2 protocol  
requests. It should improve the handling of the SGI_swap_interval and  
OML_video_sync GLX extensions.

Jesse Barnes already had a positive look at the patches. Due to lack  
of suitable hardware i wasn't able to test any of these, not even if  
they compile.

Could somebody please test these and apply them if appropriate?

Thanks,
mario

*
Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen
Germany

e-mail: mario.klei...@tuebingen.mpg.de
office: +49 (0)7071/601-1623
fax:+49 (0)7071/601-616
www:http://www.kyb.tuebingen.mpg.de/~kleinerm
*
For a successful technology, reality must take precedence
over public relations, for Nature cannot be fooled.
(Richard Feynman)

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 0/4] Fix XF86BigFont declaration warnings

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Yaakov Selkowitz (4):
  Xext: fix prototype warnings in xf86bigfont.c
  dix: fix XF86Bigfont declaration warnings in dixfonts.c
  os: fix XF86Bigfont declaration warnings in log.c
  mi: remove deprecated #include X11/extensions/xf86bigfstr.h in
miinitext.c

 Xext/xf86bigfont.c |8 ++--
 dix/dixfonts.c |3 +--
 mi/miinitext.c |2 +-
 os/log.c   |3 +--
 4 files changed, 9 insertions(+), 7 deletions(-)

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 1/4] Xext: fix prototype warnings in xf86bigfont.c

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

xf86bigfont.c:147: warning: function declaration isn't a prototype
xf86bigfont.c:147: warning: old-style function definition
xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm'
xf86bigfont.c:306: warning: function declaration isn't a prototype
xf86bigfont.c:306: warning: old-style function definition

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 Xext/xf86bigfont.c |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index ba8b603..ba5af51 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -86,6 +86,10 @@ static DISPATCH_PROC(SProcXF86BigfontDispatch);
 static DISPATCH_PROC(SProcXF86BigfontQueryVersion);
 static DISPATCH_PROC(SProcXF86BigfontQueryFont);
 
+void XFree86BigfontExtensionInit(void);
+void XF86BigfontFreeFontShm(FontPtr);
+void XF86BigfontCleanup(void);
+
 #ifdef HAS_SHM
 
 /* A random signature, transmitted to the clients so they can verify that the
@@ -143,7 +147,7 @@ CheckForShmSyscall(void)
 #endif
 
 void
-XFree86BigfontExtensionInit()
+XFree86BigfontExtensionInit(void)
 {
 if (AddExtension(XF86BIGFONTNAME,
 XF86BigfontNumberEvents,
@@ -302,7 +306,7 @@ XF86BigfontFreeFontShm(
 
 /* Called upon fatal signal. */
 void
-XF86BigfontCleanup()
+XF86BigfontCleanup(void)
 {
 #ifdef HAS_SHM
 while (ShmList)
-- 
1.6.6.1

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/4] dix: fix XF86Bigfont declaration warnings in dixfonts.c

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

dixfonts.c:502: warning: implicit declaration of function 
`XF86BigfontFreeFontShm'
dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm'

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 dix/dixfonts.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 329318d..40e18e4 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -71,8 +71,7 @@ Equipment Corporation.
 #endif
 
 #ifdef XF86BIGFONT
-#define _XF86BIGFONT_SERVER_
-#include X11/extensions/xf86bigfont.h
+extern void XF86BigfontFreeFontShm(FontPtr);
 #endif
 
 #define QUERYCHARINFO(pci, pr)  *(pr) = (pci)-metrics
-- 
1.6.6.1

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 3/4] os: fix XF86Bigfont declaration warnings in log.c

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

log.c:436: warning: implicit declaration of function `XF86BigfontCleanup'
log.c:436: warning: nested extern declaration of `XF86BigfontCleanup'

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 os/log.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/os/log.c b/os/log.c
index 599b1ff..f102120 100644
--- a/os/log.c
+++ b/os/log.c
@@ -99,8 +99,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #endif
 
 #ifdef XF86BIGFONT
-#define _XF86BIGFONT_SERVER_
-#include X11/extensions/xf86bigfont.h
+extern void XF86BigfontCleanup(void);
 #endif
 
 #ifdef DDXOSVERRORF
-- 
1.6.6.1

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] dmx: Rename xdmx client to dmxinfo

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

The DMX Xdmx server and xdmx client cannot both be installed on
case-insensitive file systems.  The client is undocumented and
so renaming it is the best option.

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 hw/dmx/examples/.gitignore  |2 +-
 hw/dmx/examples/Makefile.am |8 +-
 hw/dmx/examples/dmxinfo.c   |  239 +++
 hw/dmx/examples/xdmx.c  |  239 ---
 4 files changed, 244 insertions(+), 244 deletions(-)
 create mode 100644 hw/dmx/examples/dmxinfo.c
 delete mode 100644 hw/dmx/examples/xdmx.c

diff --git a/hw/dmx/examples/.gitignore b/hw/dmx/examples/.gitignore
index 5a86a71..d86e7eb 100644
--- a/hw/dmx/examples/.gitignore
+++ b/hw/dmx/examples/.gitignore
@@ -1,6 +1,7 @@
 #  Add  Override for this directory and it's subdirectories
 dmxaddinput
 dmxaddscreen
+dmxinfo
 dmxreconfig
 dmxresize
 dmxrminput
@@ -10,7 +11,6 @@ ev
 evi
 res
 xbell
-xdmx
 xinput
 xled
 xtest
diff --git a/hw/dmx/examples/Makefile.am b/hw/dmx/examples/Makefile.am
index d814339..229bb57 100644
--- a/hw/dmx/examples/Makefile.am
+++ b/hw/dmx/examples/Makefile.am
@@ -4,14 +4,14 @@ EV_PROG = ev
 endif
 
 bin_PROGRAMS = \
-   xdmx dmxwininfo dmxreconfig dmxresize \
+   dmxinfo dmxwininfo dmxreconfig dmxresize \
dmxaddscreen dmxrmscreen \
dmxaddinput dmxrminput
 noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
 
-xdmx_SOURCES = xdmx.c
-xdmx_LDADD = @DMXEXAMPLES_DEP_LIBS@
-xdmx_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxinfo_SOURCES = dmxinfo.c
+dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@
+dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
 
 dmxwininfo_SOURCES = dmxwininfo.c
 dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@
diff --git a/hw/dmx/examples/dmxinfo.c b/hw/dmx/examples/dmxinfo.c
new file mode 100644
index 000..dedce6e
--- /dev/null
+++ b/hw/dmx/examples/dmxinfo.c
@@ -0,0 +1,239 @@
+/*
+ * Copyright 2001,2002 Red Hat Inc., Durham, North Carolina.
+ *
+ * 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 on 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
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * 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.
+ */
+
+/*
+ * Authors:
+ *   Rickard E. (Rik) Faith fa...@redhat.com
+ *
+ */
+
+#include stdio.h
+#include stdlib.h
+#include X11/Xlib.h
+#include X11/extensions/dmxext.h
+
+static void indent(int level)
+{
+int i;
+for (i = 0; i  level; i++) printf();
+}
+
+static void print_window_id(const char *displayName, Display *display,
+Window window, int level, int child)
+{
+char *name;
+
+if (!XFetchName(display, window, name)) name = NULL;
+indent(level);
+if (child) printf((%d) , child);
+printf(%s window 0x%08lx: %s%s\n,
+   displayName,
+   (long unsigned)window,
+   name ? name : ,
+   (window == DefaultRootWindow(display))
+   ?  (DMX root window) : );
+if (name) XFree(name);
+}
+
+static void print_info(Display *display, Window window, int level, int child)
+{
+DMXWindowAttributes winfo[128];
+int count;
+int i;
+
+if (!DMXGetWindowAttributes(display, window, count, 128, winfo)) {
+printf(Could not get window information for 0x%08lx\n,
+   (long unsigned)window);
+exit(-2);
+}
+printf(\n);
+print_window_id(DMX, display, window, level, child);
+for (i = 0; i  count; i++) {
+DMXScreenAttributes  sinfo;
+Display  *backend;
+
+/* This could also be cached -- the information doesn't change. */
+if (!DMXGetScreenAttributes(display, winfo[i].screen, sinfo)) {
+printf(Could not get screen information for screen %d\n, i);
+exit(-2);
+}
+if (!(backend = XOpenDisplay(sinfo.displayName))) {
+printf(Cannot open backend display %s\n, 

[PATCH 4/4] mi: remove deprecated #include X11/extensions/xf86bigfstr.h in miinitext.c

2010-02-20 Thread Yaakov (Cygwin/X)
From: Yaakov Selkowitz yselkow...@users.sourceforge.net

Signed-off-by: Yaakov Selkowitz yselkow...@users.sourceforge.net
---
 mi/miinitext.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mi/miinitext.c b/mi/miinitext.c
index 2a67fd3..692be86 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -185,7 +185,7 @@ typedef void (*InitExtension)(INITARGS);
 #include X11/extensions/panoramiXproto.h
 #endif
 #ifdef XF86BIGFONT
-#include X11/extensions/xf86bigfstr.h
+#include X11/extensions/xf86bigfproto.h
 #endif
 #ifdef RES
 #include X11/extensions/XResproto.h
-- 
1.6.6.1

___
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel