Re: [PATCH xserver] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Peter Hutterer
On Thu, Mar 23, 2017 at 12:10:24AM -0400, Alex Deucher wrote:
> On Wed, Mar 22, 2017 at 11:42 PM, Michel Dänzer  wrote:
> > From: Michel Dänzer 
> >
> > There is no pixmap associated with source-only pictures.
> >
> > Fixes Xephyr -fakexa crashing on startup.
> >
> > Signed-off-by: Michel Dänzer 
> 
> Reviewed-by: Alex Deucher 

remote: Updating patchwork state for 
https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #145879 updated using rev 
eb2cf11724df5cbe0be3cce1ad4c61ba61e8ec6b.
remote: I: 1 patch(es) updated to state Accepted.

Cheers,
   Peter
> 
> > ---
> >  hw/kdrive/ephyr/ephyr_draw.c | 6 --
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
> > index 5b8a1d504..66371334a 100644
> > --- a/hw/kdrive/ephyr/ephyr_draw.c
> > +++ b/hw/kdrive/ephyr/ephyr_draw.c
> > @@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
> > PicturePtr pMaskPicture,
> >  EphyrFakexaPriv *fakexa = scrpriv->fakexa;
> >
> >  ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
> > -ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> > +if (pSrc != NULL)
> > +ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> >  if (pMask != NULL)
> >  ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
> >
> > @@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
> >
> >  if (fakexa->pMask != NULL)
> >  ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
> > -ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> > +if (fakexa->pSrc != NULL)
> > +ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> >  ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
> >  }
> >
> > --
> > 2.11.0
> >
> > ___
> > xorg-devel@lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: https://lists.x.org/mailman/listinfo/xorg-devel
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Alex Deucher
On Wed, Mar 22, 2017 at 11:42 PM, Michel Dänzer  wrote:
> From: Michel Dänzer 
>
> There is no pixmap associated with source-only pictures.
>
> Fixes Xephyr -fakexa crashing on startup.
>
> Signed-off-by: Michel Dänzer 

Reviewed-by: Alex Deucher 

> ---
>  hw/kdrive/ephyr/ephyr_draw.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
> index 5b8a1d504..66371334a 100644
> --- a/hw/kdrive/ephyr/ephyr_draw.c
> +++ b/hw/kdrive/ephyr/ephyr_draw.c
> @@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
> PicturePtr pMaskPicture,
>  EphyrFakexaPriv *fakexa = scrpriv->fakexa;
>
>  ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
> -ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> +if (pSrc != NULL)
> +ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
>  if (pMask != NULL)
>  ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
>
> @@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
>
>  if (fakexa->pMask != NULL)
>  ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
> -ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> +if (fakexa->pSrc != NULL)
> +ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
>  ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
>  }
>
> --
> 2.11.0
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Michel Dänzer
From: Michel Dänzer 

There is no pixmap associated with source-only pictures.

Fixes Xephyr -fakexa crashing on startup.

Signed-off-by: Michel Dänzer 
---
 hw/kdrive/ephyr/ephyr_draw.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 5b8a1d504..66371334a 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
PicturePtr pMaskPicture,
 EphyrFakexaPriv *fakexa = scrpriv->fakexa;
 
 ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
-ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
+if (pSrc != NULL)
+ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
 if (pMask != NULL)
 ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
 
@@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
 
 if (fakexa->pMask != NULL)
 ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
-ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
+if (fakexa->pSrc != NULL)
+ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
 ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
 }
 
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 7/7] ephyr: Remove the -fakexa option.

2017-03-22 Thread Michel Dänzer
On 23/03/17 07:11 AM, Eric Anholt wrote:
> It fatal errors at startup, I haven't used it in 5 years, and I don't
> think anyone else has either.

I used it recently, I'll send a patch to fix it.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols

2017-03-22 Thread Bill Spitzak
I can't imagine blocking all/none shortcuts can be the only choices.
What if the nested wm does not use one of the shortcuts? And whether a
particular shortcut is used can vary: a tab between windows may not
work if you are on the last window, in that case it would be nice if
tab then went out of the nested wm and to the next main window.

An "I consumed/ignored this event" request sent back from clients to
the compositor would allow this to work. This also matches how a
number of toolkits work so it would make integration of them into
desktops better.

As for the X thing, I don't see why any new api is necessary. The X
emulator can just set normal Wayland keyboard focus to the window and
do whatever is necessary so that moving the focus away is discouraged
and it is easy to get the focus back (ie mouse enter and click try to
put it back), rather than add an extremely dangerous and unwanted api
from X to Wayland.

On Wed, Mar 22, 2017 at 9:27 AM, Olivier Fourdan  wrote:
> [Resending because I sent to wayland-devel-bounce by mistake -facepalm-]
>
> Hi,
>
> This is a follow-up on my previous attempt to add a keyboard grabbing
> protocol for Xwayland [0].
>
> While I had the previous iteration working in Xwayland and mutter, this
> was clearly not acceptable for Wayland native windows.
>
> So I reckon we actually need two protocols, one specifically for Xwayland
> and another one for Wayland native clients.
>
> The one for Xwayland allows to re-route keyboard events to a given surface
> even when the surface doesn't have actual keyboard focus. This is needed
> for X11 applications that map an override redirect window (thus never
> actually focused by the window manager) but issueing an active grab on
> the keyboard to capture all keyboard events. An example of this is
> xscreensaver unlock dialog [1] or gksu [2]
>
> The second protocol is simpler, in the sense that it will simply tell the
> Wayland compositor to ignore its own keyboard shortcuts when a given surface
> is focused. A typical use case for this is virt-viewer/virt-manager where the
> typical window manager shortcuts should be send to the remote host rather
> than being caught and handled by the local Wayland compositor [3].
>
> I have sample implementations of these two protcols in Xwayland, mutter
> and gtk+ and it seems to work well, for both cases (x11 O-R window under
> Xwayland and virt-viewer using Wayland native).
>
> Cheers,
> Olivier
>
> [0] 
> https://lists.freedesktop.org/archives/wayland-devel/2016-August/030863.html
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=96547
> [2] https://bugzilla.gnome.org/show_bug.cgi?id=752956
> [3] https://bugzilla.redhat.com/show_bug.cgi?id=1285770
>
> Olivier Fourdan (2):
>   Introduce keyboard grabbing protocol for Xwayland
>   Add keyboard shortcuts inhibitor
>
>  Makefile.am|   2 +
>  configure.ac   |   2 +-
>  unstable/keyboard-shortcuts-inhibit/README |   4 +
>  .../keyboard-shortcuts-inhibit-unstable-v1.xml |  85 +
>  unstable/xwayland-keyboard-grab/README |   4 +
>  .../xwayland-keyboard-grab-unstable-v1.xml | 101 
> +
>  6 files changed, 197 insertions(+), 1 deletion(-)
>  create mode 100644 unstable/keyboard-shortcuts-inhibit/README
>  create mode 100644 
> unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
>  create mode 100644 unstable/xwayland-keyboard-grab/README
>  create mode 100644 
> unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
>
> --
> 2.9.3
>
> ___
> wayland-devel mailing list
> wayland-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 6/7] xserver: Unifdef HAVE_CONFIG_H

2017-03-22 Thread Peter Hutterer
On Wed, Mar 22, 2017 at 03:11:35PM -0700, Eric Anholt wrote:
> The X Server never generates a global config.h, and instead all these
> paths are including dix-config.h or xorg-config.h.
> ---
>  hw/xfree86/modes/xf86Crtc.c  | 3 ---
>  hw/xfree86/modes/xf86Cursors.c   | 3 ---
>  hw/xfree86/modes/xf86DiDGA.c | 3 ---
>  hw/xfree86/modes/xf86EdidModes.c | 3 ---
>  hw/xfree86/modes/xf86Modes.c | 3 ---
>  hw/xfree86/modes/xf86RandR12.c   | 3 ---
>  hw/xfree86/modes/xf86Rotate.c| 3 ---
>  hw/xfree86/modes/xf86cvt.c   | 3 ---
>  hw/xfree86/modes/xf86gtf.c   | 3 ---
>  xkb/XKBMAlloc.c  | 2 --
>  xkb/XKBMisc.c| 2 --
>  11 files changed, 31 deletions(-)
> 
> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
> index 966a1689103f..fcf8343d1439 100644
> --- a/hw/xfree86/modes/xf86Crtc.c
> +++ b/hw/xfree86/modes/xf86Crtc.c
> @@ -24,9 +24,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif

unifdef apparently isn't smart enough to realise that it leaves us with an
empty else branch now.

You're missing a few s-o-b as well in the commit messages, but with all that
fixed, Reviewed-by: Peter Hutterer 

Cheers,
   Peter

>  
>  #include 
> diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
> index 9543eedb3996..095bf3e9138b 100644
> --- a/hw/xfree86/modes/xf86Cursors.c
> +++ b/hw/xfree86/modes/xf86Cursors.c
> @@ -24,9 +24,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include 
> diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c
> index 645727441c19..ece94bbe04e7 100644
> --- a/hw/xfree86/modes/xf86DiDGA.c
> +++ b/hw/xfree86/modes/xf86DiDGA.c
> @@ -23,9 +23,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include "xf86.h"
> diff --git a/hw/xfree86/modes/xf86EdidModes.c 
> b/hw/xfree86/modes/xf86EdidModes.c
> index b4ab14fc59ad..b29d95d16da1 100644
> --- a/hw/xfree86/modes/xf86EdidModes.c
> +++ b/hw/xfree86/modes/xf86EdidModes.c
> @@ -30,9 +30,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #define _PARSE_EDID_
> diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
> index 43b223307e8c..439fefd63b26 100644
> --- a/hw/xfree86/modes/xf86Modes.c
> +++ b/hw/xfree86/modes/xf86Modes.c
> @@ -28,9 +28,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include "xf86Modes.h"
> diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
> index d83461997409..0a670266378e 100644
> --- a/hw/xfree86/modes/xf86RandR12.c
> +++ b/hw/xfree86/modes/xf86RandR12.c
> @@ -23,9 +23,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include "xf86.h"
> diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
> index 13e5a50596b7..4a2d2f3b0b06 100644
> --- a/hw/xfree86/modes/xf86Rotate.c
> +++ b/hw/xfree86/modes/xf86Rotate.c
> @@ -24,9 +24,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include 
> diff --git a/hw/xfree86/modes/xf86cvt.c b/hw/xfree86/modes/xf86cvt.c
> index b6c1bc81ce43..585ef804d636 100644
> --- a/hw/xfree86/modes/xf86cvt.c
> +++ b/hw/xfree86/modes/xf86cvt.c
> @@ -29,9 +29,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include "xf86.h"
> diff --git a/hw/xfree86/modes/xf86gtf.c b/hw/xfree86/modes/xf86gtf.c
> index 17c2f3255527..bd329a00ce52 100644
> --- a/hw/xfree86/modes/xf86gtf.c
> +++ b/hw/xfree86/modes/xf86gtf.c
> @@ -63,9 +63,6 @@
>  #ifdef HAVE_XORG_CONFIG_H
>  #include 
>  #else
> -#ifdef HAVE_CONFIG_H
> -#include 
> -#endif
>  #endif
>  
>  #include "xf86.h"
> diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
> index dbc1389e683c..3e380a8ea633 100644
> --- a/xkb/XKBMAlloc.c
> +++ b/xkb/XKBMAlloc.c
> @@ -26,8 +26,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  
>  #ifdef HAVE_DIX_CONFIG_H
>  #include 
> -#elif defined(HAVE_CONFIG_H)
> -#include 
>  #endif
>  
>  #include 
> diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
> index df268b5835a3..f17194528aa7 100644
> --- a/xkb/XKBMisc.c
> +++ b/xkb/XKBMisc.c
> @@ -26,8 +26,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  
>  #ifdef HAVE_DIX_CONFIG_H
>  #include 
> -#elif defined(HAVE_CONFIG_H)
> -#include 
>  #endif
>  
>  #include 
> -- 
> 2.11.0
> 
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 
___
xorg-devel@lists.x.org: X.Org 

[PATCH xserver 3/7] kdrive: Drop kdrive-config.h.

2017-03-22 Thread Eric Anholt
It had nothing left in it that was used but wasn't in dix-config.h.
---
 configure.ac  |  7 +--
 hw/kdrive/ephyr/Makefile.am   |  1 +
 hw/kdrive/ephyr/ephyr.c   |  4 ++--
 hw/kdrive/ephyr/ephyr_draw.c  |  4 ++--
 hw/kdrive/ephyr/ephyr_glamor_xv.c |  4 ++--
 hw/kdrive/ephyr/ephyrcursor.c |  4 ++--
 hw/kdrive/ephyr/ephyrinit.c   |  4 ++--
 hw/kdrive/ephyr/ephyrvideo.c  |  4 ++--
 hw/kdrive/ephyr/hostx.c   |  4 ++--
 hw/kdrive/ephyr/os.c  |  4 ++--
 hw/kdrive/src/kcmap.c |  4 ++--
 hw/kdrive/src/kdrive.c|  4 ++--
 hw/kdrive/src/kinfo.c |  4 ++--
 hw/kdrive/src/kinput.c|  5 +++--
 hw/kdrive/src/kmode.c |  4 ++--
 hw/kdrive/src/kshadow.c   |  4 ++--
 hw/kdrive/src/kxv.c   |  4 ++--
 include/kdrive-config.h.in| 25 -
 mi/miinitext.c|  4 
 19 files changed, 33 insertions(+), 65 deletions(-)
 delete mode 100644 include/kdrive-config.h.in

diff --git a/configure.ac b/configure.ac
index 705119859183..c0e40ad96dba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,8 +67,6 @@ dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.
 AC_CONFIG_HEADERS(include/xkb-config.h)
 dnl xwin-config.h covers the XWin DDX.
 AC_CONFIG_HEADERS(include/xwin-config.h)
-dnl kdrive-config.h covers the kdrive DDX
-AC_CONFIG_HEADERS(include/kdrive-config.h)
 dnl version-config.h covers the version numbers so they can be bumped without
 dnl forcing an entire recompile.x
 AC_CONFIG_HEADERS(include/version-config.h)
@@ -2368,9 +2366,6 @@ XEPHYR_INCS=
 AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes])
 
 if test "$KDRIVE" = yes; then
-AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server])
-AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx])
-
 XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil 
xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms xcb-randr xcb-xkb"
 if test "x$XV" = xyes; then
 XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
@@ -2398,7 +2393,7 @@ if test "$KDRIVE" = yes; then
 KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
 KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
 
-KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H"
+KDRIVE_CFLAGS="$XSERVER_CFLAGS"
 
 KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB 
$RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB 
$MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB 
$XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
 KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 6ce0d6fa0a7b..f4bd060f816d 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -26,6 +26,7 @@ AM_CPPFLAGS = \
@KDRIVE_CFLAGS@ \
@XEPHYR_INCS@   \
@XEPHYR_CFLAGS@ \
+   -DHAVE_DIX_CONFIG_H \
-I$(top_srcdir) \
-I$(top_srcdir)/glamor  \
-I$(top_srcdir)/exa
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index ef5350e1884e..546a76c249d4 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -23,8 +23,8 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include 
+#ifdef HAVE_DIX_CONFIG_H
+#include 
 #endif
 
 #include 
diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 5b8a1d504721..0b467860a170 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -25,8 +25,8 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include 
+#ifdef HAVE_DIX_CONFIG_H
+#include 
 #endif
 
 #include "ephyr.h"
diff --git a/hw/kdrive/ephyr/ephyr_glamor_xv.c 
b/hw/kdrive/ephyr/ephyr_glamor_xv.c
index b9c3464d8c78..4dd15cf4170c 100644
--- a/hw/kdrive/ephyr/ephyr_glamor_xv.c
+++ b/hw/kdrive/ephyr/ephyr_glamor_xv.c
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include 
+#ifdef HAVE_DIX_CONFIG_H
+#include 
 #endif
 
 #include "kdrive.h"
diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c
index 808b3c72ccc6..f991899c502f 100644
--- a/hw/kdrive/ephyr/ephyrcursor.c
+++ b/hw/kdrive/ephyr/ephyrcursor.c
@@ -24,8 +24,8 @@
  *  Adam Jackson 
  */
 
-#ifdef HAVE_CONFIG_H
-#include 
+#ifdef HAVE_DIX_CONFIG_H
+#include 
 #endif
 #include "ephyr.h"
 #include "ephyrlog.h"
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 9794cecc96dd..383fa9f7c72a 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -23,8 +23,8 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include 
+#ifdef HAVE_DIX_CONFIG_H
+#include 
 #endif
 #include "ephyr.h"
 #include "ephyrlog.h"
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index 31b1eee31a30..9c9c78d11348 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ 

[PATCH xserver 0/7] meson prep work

2017-03-22 Thread Eric Anholt
As I've mentioned in IRC, I'm in the process of converting the X
Server to Meson.  It's proved to be a delight to work with, with a
helpful IRC community for when you get stuck.  The build system will
probably be half the size when meson is done, and I'm doing full
rebuilds in a tiny fraction of the time it takes to ./configure.

In the process, I've run into some silly stuff in our tree that could
be cleaned up independently of whether we go with meson.

Eric Anholt (7):
  kdrive: Unifdef KDRIVE_EVDEV.
  kdrive: Remove vestiges of TSLIB support.
  kdrive: Drop kdrive-config.h.
  xserver: Check the right HAVE_*_CONFIG_H.
  glamor: Fix some formatting that confused the unifdef command.
  xserver: Unifdef HAVE_CONFIG_H
  ephyr: Remove the -fakexa option.

 configure.ac  |  10 +-
 glamor/glamor_priv.h  |   2 +-
 hw/kdrive/ephyr/Makefile.am   |   6 +-
 hw/kdrive/ephyr/ephyr.c   |   4 +-
 hw/kdrive/ephyr/ephyr.h   |  15 --
 hw/kdrive/ephyr/ephyr_draw.c  | 531 --
 hw/kdrive/ephyr/ephyr_glamor_xv.c |   4 +-
 hw/kdrive/ephyr/ephyrcursor.c |   4 +-
 hw/kdrive/ephyr/ephyrinit.c   |  23 +-
 hw/kdrive/ephyr/ephyrvideo.c  |   4 +-
 hw/kdrive/ephyr/hostx.c   |   4 +-
 hw/kdrive/ephyr/os.c  |   4 +-
 hw/kdrive/src/kcmap.c |   4 +-
 hw/kdrive/src/kdrive.c|   4 +-
 hw/kdrive/src/kinfo.c |   4 +-
 hw/kdrive/src/kinput.c|  30 +--
 hw/kdrive/src/kmode.c |   4 +-
 hw/kdrive/src/kshadow.c   |   4 +-
 hw/kdrive/src/kxv.c   |   4 +-
 hw/xfree86/exa/examodule.c|   2 +-
 hw/xfree86/modes/xf86Crtc.c   |   3 -
 hw/xfree86/modes/xf86Cursors.c|   3 -
 hw/xfree86/modes/xf86DiDGA.c  |   3 -
 hw/xfree86/modes/xf86EdidModes.c  |   3 -
 hw/xfree86/modes/xf86Modes.c  |   3 -
 hw/xfree86/modes/xf86RandR12.c|   3 -
 hw/xfree86/modes/xf86Rotate.c |   3 -
 hw/xfree86/modes/xf86cvt.c|   3 -
 hw/xfree86/modes/xf86gtf.c|   3 -
 hw/xwayland/xwayland-shm.c|   2 +-
 include/dix-config.h.in   |   6 -
 include/kdrive-config.h.in|  31 ---
 include/xorg-server.h.in  |   3 -
 mi/miinitext.c|   4 -
 xkb/XKBMAlloc.c   |   2 -
 xkb/XKBMisc.c |   2 -
 36 files changed, 36 insertions(+), 708 deletions(-)
 delete mode 100644 hw/kdrive/ephyr/ephyr_draw.c
 delete mode 100644 include/kdrive-config.h.in

-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 5/7] glamor: Fix some formatting that confused the unifdef command.

2017-03-22 Thread Eric Anholt
---
 glamor/glamor_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 27f95521dd3d..7b92f35705f4 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -910,7 +910,7 @@ int glamor_xv_put_image(glamor_port_private *port_priv,
 void glamor_xv_core_init(ScreenPtr screen);
 void glamor_xv_render(glamor_port_private *port_priv);
 
-#include"glamor_utils.h"
+#include "glamor_utils.h"
 
 /* Dynamic pixmap upload to texture if needed.
  * Sometimes, the target is a gl texture pixmap/picture,
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 1/7] kdrive: Unifdef KDRIVE_EVDEV.

2017-03-22 Thread Eric Anholt
ajax deleted the evdev driver in the removal of fbdev and the linux
backend.

Signed-off-by: Eric Anholt 
---
 hw/kdrive/ephyr/ephyrinit.c | 10 --
 hw/kdrive/src/kinput.c  | 25 -
 include/kdrive-config.h.in  |  3 ---
 3 files changed, 38 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 7632c2643210..9794cecc96dd 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -40,11 +40,6 @@ extern Bool ephyr_glamor, ephyr_glamor_gles2, 
ephyr_glamor_skip_present;
 
 extern Bool ephyrNoXV;
 
-#ifdef KDRIVE_EVDEV
-extern KdPointerDriver LinuxEvdevMouseDriver;
-extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
-#endif
-
 void processScreenOrOutputArg(const char *screen_size, const char *output, 
char *parent_id);
 void processOutputArg(const char *output, char *parent_id);
 void processScreenArg(const char *screen_size, char *parent_id);
@@ -91,11 +86,6 @@ InitInput(int argc, char **argv)
 KdKeyboardInfo *ki;
 KdPointerInfo *pi;
 
-#ifdef KDRIVE_EVDEV
-KdAddKeyboardDriver();
-KdAddPointerDriver();
-#endif
-
 if (!SeatId) {
 KdAddKeyboardDriver();
 KdAddPointerDriver();
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 8b08747a6077..b15375137af4 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -54,11 +54,6 @@
 #include 
 #endif
 
-#ifdef KDRIVE_EVDEV
-#define DEV_INPUT_EVENT_PREFIX "/dev/input/event"
-#define DEV_INPUT_EVENT_PREFIX_LEN (sizeof(DEV_INPUT_EVENT_PREFIX) - 1)
-#endif
-
 #define AtomFromName(x) MakeAtom(x, strlen(x), 1)
 
 struct KdConfigDevice {
@@ -1091,16 +1086,6 @@ KdParseKbdOptions(KdKeyboardInfo * ki)
 ErrorF("Kbd option key (%s) of value (%s) not assigned!\n",
key, value);
 }
-
-#ifdef KDRIVE_EVDEV
-if (!ki->driver && ki->path != NULL &&
-strncasecmp(ki->path,
-DEV_INPUT_EVENT_PREFIX,
-DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
-ki->driver = KdFindKeyboardDriver("evdev");
-ki->options = input_option_new(ki->options, "driver", "evdev");
-}
-#endif
 }
 
 KdKeyboardInfo *
@@ -1209,16 +1194,6 @@ KdParsePointerOptions(KdPointerInfo * pi)
 ErrorF("Pointer option key (%s) of value (%s) not assigned!\n",
key, value);
 }
-
-#ifdef KDRIVE_EVDEV
-if (!pi->driver && pi->path != NULL &&
-strncasecmp(pi->path,
-DEV_INPUT_EVENT_PREFIX,
-DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
-pi->driver = KdFindPointerDriver("evdev");
-pi->options = input_option_new(pi->options, "driver", "evdev");
-}
-#endif
 }
 
 KdPointerInfo *
diff --git a/include/kdrive-config.h.in b/include/kdrive-config.h.in
index f59262c417f1..2d3aedf856fc 100644
--- a/include/kdrive-config.h.in
+++ b/include/kdrive-config.h.in
@@ -16,9 +16,6 @@
 /* Support tslib touchscreen abstraction library */
 #undef TSLIB
 
-/* Support KDrive evdev driver */
-#undef KDRIVE_EVDEV
-
 /* Verbose debugging output hilarity */
 #undef DEBUG
 
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 2/7] kdrive: Remove vestiges of TSLIB support.

2017-03-22 Thread Eric Anholt
The actual code was gone in 27819950e4158326e0f83a30f2e8968b932625ef,
but some checks remained.
---
 configure.ac   | 5 ++---
 include/dix-config.h.in| 6 --
 include/kdrive-config.h.in | 3 ---
 include/xorg-server.h.in   | 3 ---
 4 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index ac11e65728e8..705119859183 100644
--- a/configure.ac
+++ b/configure.ac
@@ -624,7 +624,6 @@ AC_ARG_ENABLE(xf86vidmode,
AS_HELP_STRING([--disable-xf86vidmode], [Build XF8
 AC_ARG_ENABLE(xace,   AS_HELP_STRING([--disable-xace], [Build X-ACE 
extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
 AC_ARG_ENABLE(xselinux,   AS_HELP_STRING([--enable-xselinux], [Build 
SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no])
 AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build 
Security extension (default: disabled)]), [XCSECURITY=$enableval], 
[XCSECURITY=no])
-AC_ARG_ENABLE(tslib,  AS_HELP_STRING([--enable-tslib], [Build kdrive 
tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
 AC_ARG_ENABLE(dbe,AS_HELP_STRING([--disable-dbe], [Build DBE 
extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
 AC_ARG_ENABLE(xf86bigfont,AS_HELP_STRING([--enable-xf86bigfont], [Build 
XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], 
[XF86BIGFONT=no])
 AC_ARG_ENABLE(dpms,   AS_HELP_STRING([--disable-dpms], [Build DPMS 
extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
@@ -2399,7 +2398,7 @@ if test "$KDRIVE" = yes; then
 KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
 KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
 
-KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
+KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H"
 
 KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB 
$RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB 
$MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB 
$XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
 KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
@@ -2407,7 +2406,7 @@ if test "$KDRIVE" = yes; then
 KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
-KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS 
$DLOPEN_LIBS $TSLIB_LIBS"
+KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS 
$DLOPEN_LIBS"
 
 AC_SUBST([XEPHYR_LIBS])
 AC_SUBST([XEPHYR_INCS])
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index c3f956d67a02..a59d441bb641 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -247,9 +247,6 @@
 /* Define to 1 if you have the `timingsafe_memcmp' function. */
 #undef HAVE_TIMINGSAFE_MEMCMP
 
-/* Define to 1 if you have the  header file. */
-#undef HAVE_TSLIB_H
-
 /* Define to 1 if you have the  header file. */
 #undef HAVE_UNISTD_H
 
@@ -322,9 +319,6 @@
 /* Support TCP socket connections */
 #undef TCPCONN
 
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
 /* Support UNIX socket connections */
 #undef UNIXCONN
 
diff --git a/include/kdrive-config.h.in b/include/kdrive-config.h.in
index 2d3aedf856fc..59c754be562f 100644
--- a/include/kdrive-config.h.in
+++ b/include/kdrive-config.h.in
@@ -13,9 +13,6 @@
 /* Include framebuffer support in X servers */
 #undef KDRIVEFBDEV
 
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
 /* Verbose debugging output hilarity */
 #undef DEBUG
 
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index e46ccecf7136..dafc27f4ae79 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -101,9 +101,6 @@
 /* Support TCP socket connections */
 #undef TCPCONN
 
-/* Support tslib touchscreen abstraction library */
-#undef TSLIB
-
 /* Support UNIX socket connections */
 #undef UNIXCONN
 
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 6/7] xserver: Unifdef HAVE_CONFIG_H

2017-03-22 Thread Eric Anholt
The X Server never generates a global config.h, and instead all these
paths are including dix-config.h or xorg-config.h.
---
 hw/xfree86/modes/xf86Crtc.c  | 3 ---
 hw/xfree86/modes/xf86Cursors.c   | 3 ---
 hw/xfree86/modes/xf86DiDGA.c | 3 ---
 hw/xfree86/modes/xf86EdidModes.c | 3 ---
 hw/xfree86/modes/xf86Modes.c | 3 ---
 hw/xfree86/modes/xf86RandR12.c   | 3 ---
 hw/xfree86/modes/xf86Rotate.c| 3 ---
 hw/xfree86/modes/xf86cvt.c   | 3 ---
 hw/xfree86/modes/xf86gtf.c   | 3 ---
 xkb/XKBMAlloc.c  | 2 --
 xkb/XKBMisc.c| 2 --
 11 files changed, 31 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 966a1689103f..fcf8343d1439 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -24,9 +24,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include 
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 9543eedb3996..095bf3e9138b 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -24,9 +24,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include 
diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c
index 645727441c19..ece94bbe04e7 100644
--- a/hw/xfree86/modes/xf86DiDGA.c
+++ b/hw/xfree86/modes/xf86DiDGA.c
@@ -23,9 +23,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include "xf86.h"
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index b4ab14fc59ad..b29d95d16da1 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -30,9 +30,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #define _PARSE_EDID_
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 43b223307e8c..439fefd63b26 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -28,9 +28,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include "xf86Modes.h"
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index d83461997409..0a670266378e 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -23,9 +23,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include "xf86.h"
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 13e5a50596b7..4a2d2f3b0b06 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -24,9 +24,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include 
diff --git a/hw/xfree86/modes/xf86cvt.c b/hw/xfree86/modes/xf86cvt.c
index b6c1bc81ce43..585ef804d636 100644
--- a/hw/xfree86/modes/xf86cvt.c
+++ b/hw/xfree86/modes/xf86cvt.c
@@ -29,9 +29,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include "xf86.h"
diff --git a/hw/xfree86/modes/xf86gtf.c b/hw/xfree86/modes/xf86gtf.c
index 17c2f3255527..bd329a00ce52 100644
--- a/hw/xfree86/modes/xf86gtf.c
+++ b/hw/xfree86/modes/xf86gtf.c
@@ -63,9 +63,6 @@
 #ifdef HAVE_XORG_CONFIG_H
 #include 
 #else
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
 #endif
 
 #include "xf86.h"
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
index dbc1389e683c..3e380a8ea633 100644
--- a/xkb/XKBMAlloc.c
+++ b/xkb/XKBMAlloc.c
@@ -26,8 +26,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #ifdef HAVE_DIX_CONFIG_H
 #include 
-#elif defined(HAVE_CONFIG_H)
-#include 
 #endif
 
 #include 
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index df268b5835a3..f17194528aa7 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -26,8 +26,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #ifdef HAVE_DIX_CONFIG_H
 #include 
-#elif defined(HAVE_CONFIG_H)
-#include 
 #endif
 
 #include 
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 7/7] ephyr: Remove the -fakexa option.

2017-03-22 Thread Eric Anholt
It fatal errors at startup, I haven't used it in 5 years, and I don't
think anyone else has either.
---
 hw/kdrive/ephyr/Makefile.am  |   5 +-
 hw/kdrive/ephyr/ephyr.h  |  15 --
 hw/kdrive/ephyr/ephyr_draw.c | 531 ---
 hw/kdrive/ephyr/ephyrinit.c  |   9 -
 4 files changed, 1 insertion(+), 559 deletions(-)
 delete mode 100644 hw/kdrive/ephyr/ephyr_draw.c

diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index f4bd060f816d..4d3711a80b22 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -28,8 +28,7 @@ AM_CPPFLAGS = \
@XEPHYR_CFLAGS@ \
-DHAVE_DIX_CONFIG_H \
-I$(top_srcdir) \
-   -I$(top_srcdir)/glamor  \
-   -I$(top_srcdir)/exa
+   -I$(top_srcdir)/glamor
 
 if XV
 XV_SRCS = ephyrvideo.c
@@ -53,7 +52,6 @@ Xephyr_SOURCES = \
ephyr.c \
ephyr.h \
ephyrlog.h \
-   ephyr_draw.c \
os.c \
ephyrinit.c \
ephyrcursor.c \
@@ -72,7 +70,6 @@ XEPHYR_GLAMOR_LIB = \
 endif
 
 Xephyr_LDADD = \
-   $(top_builddir)/exa/libexa.la   \
$(XEPHYR_GLAMOR_LIB)\
@KDRIVE_LIBS@   \
@XEPHYR_LIBS@
diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
index b48a21ce2f93..d0a2f3dcab63 100644
--- a/hw/kdrive/ephyr/ephyr.h
+++ b/hw/kdrive/ephyr/ephyr.h
@@ -46,26 +46,11 @@ typedef struct _ephyrPriv {
 int bytes_per_line;
 } EphyrPriv;
 
-typedef struct _ephyrFakexaPriv {
-ExaDriverPtr exa;
-Bool is_synced;
-
-/* The following are arguments and other information from Prepare* calls
- * which are stored for use in the inner calls.
- */
-int op;
-PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
-void *saved_ptrs[3];
-PixmapPtr pDst, pSrc, pMask;
-GCPtr pGC;
-} EphyrFakexaPriv;
-
 typedef struct _ephyrScrPriv {
 /* ephyr server info */
 Rotation randr;
 Bool shadow;
 DamagePtr pDamage;
-EphyrFakexaPriv *fakexa;
 
 /* Host X window info */
 xcb_window_t win;
diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
deleted file mode 100644
index 0b467860a170..
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Copyright © 2006 Intel Corporation
- *
- * 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.
- *
- * Authors:
- *Eric Anholt 
- *
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include 
-#endif
-
-#include "ephyr.h"
-#include "exa_priv.h"
-#include "fbpict.h"
-
-#define EPHYR_TRACE_DRAW 0
-
-#if EPHYR_TRACE_DRAW
-#define TRACE_DRAW() ErrorF("%s\n", __FUNCTION__);
-#else
-#define TRACE_DRAW() do { } while (0)
-#endif
-
-/* Use some oddball alignments, to expose issues in alignment handling in EXA. 
*/
-#define EPHYR_OFFSET_ALIGN 24
-#define EPHYR_PITCH_ALIGN  24
-
-#define EPHYR_OFFSCREEN_SIZE   (16 * 1024 * 1024)
-#define EPHYR_OFFSCREEN_BASE   (1 * 1024 * 1024)
-
-/**
- * Forces a real devPrivate.ptr for hidden pixmaps, so that we can call down to
- * fb functions.
- */
-static void
-ephyrPreparePipelinedAccess(PixmapPtr pPix, int index)
-{
-KdScreenPriv(pPix->drawable.pScreen);
-KdScreenInfo *screen = pScreenPriv->screen;
-EphyrScrPriv *scrpriv = screen->driver;
-EphyrFakexaPriv *fakexa = scrpriv->fakexa;
-
-assert(fakexa->saved_ptrs[index] == NULL);
-fakexa->saved_ptrs[index] = pPix->devPrivate.ptr;
-
-if (pPix->devPrivate.ptr != NULL)
-return;
-
-pPix->devPrivate.ptr = fakexa->exa->memoryBase + exaGetPixmapOffset(pPix);
-}
-
-/**
- * Restores the original devPrivate.ptr of the pixmap from before we messed 
with
- * it.
- */
-static void
-ephyrFinishPipelinedAccess(PixmapPtr pPix, int index)
-{
-

[PATCH xserver 4/7] xserver: Check the right HAVE_*_CONFIG_H.

2017-03-22 Thread Eric Anholt
---
 hw/xfree86/exa/examodule.c | 2 +-
 hw/xwayland/xwayland-shm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index 76f780ab6d6f..0bbd93e34015 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/exa/examodule.c
@@ -25,7 +25,7 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_XORG_CONFIG_H
 #include 
 #endif
 
diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c
index 452d1f509115..29732eaca23b 100644
--- a/hw/xwayland/xwayland-shm.c
+++ b/hw/xwayland/xwayland-shm.c
@@ -24,7 +24,7 @@
  * SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_DIX_CONFIG_H
 #include 
 #endif
 
-- 
2.11.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols

2017-03-22 Thread Adam Jackson
On Wed, 2017-03-22 at 11:33 +0100, Olivier Fourdan wrote:

> The second protocol is simpler, in the sense that it will simply tell the
> Wayland compositor to ignore its own keyboard shortcuts when a given surface
> is focused. A typical use case for this is virt-viewer/virt-manager where the
> typical window manager shortcuts should be send to the remote host rather
> than being caught and handled by the local Wayland compositor [3].

I think this wants the same kind of caveat that the compositor is under
no obligation to ignore every shortcut, since you might want like
control-alt-shift-super-tab to still switch apps, or control-alt-
backspace to nuke the server, or whatever. But the idea looks sane.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] glproto: Fix typo in X_GLXSetClientInfo2ARB definition

2017-03-22 Thread Eric Anholt
Adam Jackson  writes:

> Signed-off-by: Adam Jackson 
> ---
>  glxproto.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/glxproto.h b/glxproto.h
> index b4629c7..b207d93 100644
> --- a/glxproto.h
> +++ b/glxproto.h
> @@ -2158,7 +2158,7 @@ typedef struct {
>  #define X_GLXDestroyWindow   32
>  #define X_GLXSetClientInfoARB33
>  #define X_GLXCreateContextAttribsARB 34
> -#define X_GLXSetConfigInfo2ARB   35
> +#define X_GLXSetClientInfo2ARB   35

Mesa and xserver don't seem to rely on the typoed name.

Reviewed-by: Eric Anholt 


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 2/2] Add keyboard shortcuts inhibitor

2017-03-22 Thread Olivier Fourdan
This adds a new protocol to let Wayland clients specify that they want
all keyboard events to be send to the client, regardless of the
compositor own shortcuts.

This is for use by virtual machine and remote connections viewers.

Signed-off-by: Olivier Fourdan 
---
 unstable/keyboard-shortcuts-inhibit/README |  4 +
 .../keyboard-shortcuts-inhibit-unstable-v1.xml | 85 ++
 2 files changed, 89 insertions(+)
 create mode 100644 unstable/keyboard-shortcuts-inhibit/README
 create mode 100644 
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml

diff --git a/unstable/keyboard-shortcuts-inhibit/README 
b/unstable/keyboard-shortcuts-inhibit/README
new file mode 100644
index 000..929959c
--- /dev/null
+++ b/unstable/keyboard-shortcuts-inhibit/README
@@ -0,0 +1,4 @@
+Compositor shortcut inhibit protocol
+
+Maintainers:
+Olivier Fourdan 
diff --git 
a/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
 
b/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
new file mode 100644
index 000..f68e25a
--- /dev/null
+++ 
b/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
@@ -0,0 +1,85 @@
+
+
+
+  
+   Copyright ?? 2017 Red Hat Inc.
+
+   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.
+  
+
+  
+   This protocol specifies a way for a client to request the compositor
+   to ignore its own keyboard shortcuts, so that all keyboard events
+   get forwarded to a surface.
+
+   Warning! The protocol described in this file is experimental and
+   backward incompatible changes may be made. Backward compatible
+   changes may be added together with the corresponding interface
+   version bump.
+   Backward incompatible changes are done by bumping the version
+   number in the protocol and interface names and resetting the
+   interface version. Once the protocol is to be declared stable,
+   the 'z' prefix and the version number in the protocol and
+   interface names are removed and the interface version number is
+   reset.
+  
+
+  
+
+
+  
+   Destroy the keyboard shortcuts inhibitor manager.
+  
+
+
+
+  
+   Create a new keyboard shortcuts inhibitor object associated with the 
given surface.
+  
+  
+  
+
+
+  
+
+  
+
+   A keyboard shortcuts inhibitor instructs the compositor to ignore
+   its own keyboard shortcuts when the associated surface has keyboard
+   focus. As a result, when the surface is focused, it will receive all
+   keyboard events, even those which would normally be caught by the
+   compositor for its own shortcuts.
+
+   If the surface is destroyed, unmapped, or loses keyboard focus, the
+   the compositor will restore its own keyboard shortcuts.
+
+   If the surface regains keyboard focus the inhibitor will take effect
+   again.
+
+
+
+  
+   Remove the keyboard shortcuts inhibitor from the associated wl_surface.
+  
+
+
+  
+
-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols

2017-03-22 Thread Olivier Fourdan
[Resending because I sent to wayland-devel-bounce by mistake -facepalm-]

Hi,

This is a follow-up on my previous attempt to add a keyboard grabbing
protocol for Xwayland [0].

While I had the previous iteration working in Xwayland and mutter, this
was clearly not acceptable for Wayland native windows.

So I reckon we actually need two protocols, one specifically for Xwayland
and another one for Wayland native clients.

The one for Xwayland allows to re-route keyboard events to a given surface
even when the surface doesn't have actual keyboard focus. This is needed
for X11 applications that map an override redirect window (thus never
actually focused by the window manager) but issueing an active grab on
the keyboard to capture all keyboard events. An example of this is
xscreensaver unlock dialog [1] or gksu [2]

The second protocol is simpler, in the sense that it will simply tell the
Wayland compositor to ignore its own keyboard shortcuts when a given surface
is focused. A typical use case for this is virt-viewer/virt-manager where the
typical window manager shortcuts should be send to the remote host rather
than being caught and handled by the local Wayland compositor [3].

I have sample implementations of these two protcols in Xwayland, mutter
and gtk+ and it seems to work well, for both cases (x11 O-R window under
Xwayland and virt-viewer using Wayland native).

Cheers,
Olivier

[0] https://lists.freedesktop.org/archives/wayland-devel/2016-August/030863.html
[1] https://bugs.freedesktop.org/show_bug.cgi?id=96547
[2] https://bugzilla.gnome.org/show_bug.cgi?id=752956
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1285770

Olivier Fourdan (2):
  Introduce keyboard grabbing protocol for Xwayland
  Add keyboard shortcuts inhibitor

 Makefile.am|   2 +
 configure.ac   |   2 +-
 unstable/keyboard-shortcuts-inhibit/README |   4 +
 .../keyboard-shortcuts-inhibit-unstable-v1.xml |  85 +
 unstable/xwayland-keyboard-grab/README |   4 +
 .../xwayland-keyboard-grab-unstable-v1.xml | 101 +
 6 files changed, 197 insertions(+), 1 deletion(-)
 create mode 100644 unstable/keyboard-shortcuts-inhibit/README
 create mode 100644 
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
 create mode 100644 unstable/xwayland-keyboard-grab/README
 create mode 100644 
unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml

-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 1/2] Introduce keyboard grabbing protocol for Xwayland

2017-03-22 Thread Olivier Fourdan
This patch introduces a new protocol for grabbing the keyboard from
Xwayland.

This is needed for X11 applications that map an override redirect window
(ths not focused by the window manager) and issue an active grab on the
keyboard to capture all keyboard events.

Signed-off-by: Olivier Fourdan 
---
 Makefile.am|   2 +
 configure.ac   |   2 +-
 unstable/xwayland-keyboard-grab/README |   4 +
 .../xwayland-keyboard-grab-unstable-v1.xml | 101 +
 4 files changed, 108 insertions(+), 1 deletion(-)
 create mode 100644 unstable/xwayland-keyboard-grab/README
 create mode 100644 
unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml

diff --git a/Makefile.am b/Makefile.am
index e693afa..d100c13 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,8 @@ unstable_protocols =  
\
unstable/tablet/tablet-unstable-v2.xml  
\
unstable/xdg-foreign/xdg-foreign-unstable-v1.xml
\
unstable/idle-inhibit/idle-inhibit-unstable-v1.xml  
\
+   unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml  
\
+   
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \
$(NULL)
 
 stable_protocols = 
\
diff --git a/configure.ac b/configure.ac
index fbb0ec2..e98bceb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_PREREQ([2.64])
 
 m4_define([wayland_protocols_major_version], [1])
-m4_define([wayland_protocols_minor_version], [7])
+m4_define([wayland_protocols_minor_version], [8])
 m4_define([wayland_protocols_version],
   [wayland_protocols_major_version.wayland_protocols_minor_version])
 
diff --git a/unstable/xwayland-keyboard-grab/README 
b/unstable/xwayland-keyboard-grab/README
new file mode 100644
index 000..dbe45a5
--- /dev/null
+++ b/unstable/xwayland-keyboard-grab/README
@@ -0,0 +1,4 @@
+Xwayland keyboard grabbing protocol
+
+Maintainers:
+Olivier Fourdan 
diff --git 
a/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml 
b/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
new file mode 100644
index 000..31dc365
--- /dev/null
+++ b/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
@@ -0,0 +1,101 @@
+
+
+
+  
+   Copyright ?? 2017 Red Hat Inc.
+
+   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.
+  
+
+  
+   This protocol specifies a way for Xwayland to request all keyboard
+   events to be forwarded to a surface even when the surface does not
+   have keyboard focus.
+
+   Unlike the X11 protocol, Wayland doesn't have the notion of
+   active grab on the keyboard.
+
+   When an X11 client acquires an active grab on the keyboard, all
+   key events are reported only to the grabbing X11 client.
+   When running in Xwayland, X11 applications may acquire an active
+   grab but that cannot be translated to the Wayland compositor who
+   may set the input focus to some other surface, thus breaking the
+   X11 client assumption that all key events are reported.
+
+   When an X11 client requests a keyboard grab, the Wayland compositor
+   may either inform or ask the user for the right to forward all key
+   events to the given client surface.
+
+   Warning! The protocol described in this file is experimental and
+   backward incompatible changes may be made. Backward compatible
+   changes may be added together with the corresponding interface
+   version bump.
+   Backward incompatible changes are done by 

[PATCH] glproto: Fix typo in X_GLXSetClientInfo2ARB definition

2017-03-22 Thread Adam Jackson
Signed-off-by: Adam Jackson 
---
 glxproto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glxproto.h b/glxproto.h
index b4629c7..b207d93 100644
--- a/glxproto.h
+++ b/glxproto.h
@@ -2158,7 +2158,7 @@ typedef struct {
 #define X_GLXDestroyWindow   32
 #define X_GLXSetClientInfoARB33
 #define X_GLXCreateContextAttribsARB 34
-#define X_GLXSetConfigInfo2ARB   35
+#define X_GLXSetClientInfo2ARB   35
 
 /* Opcodes for single commands (part of GLX command space) */
 
-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] modesetting: Honor xorg.conf for 16bpp

2017-03-22 Thread Hans de Goede

Hi,

On 21-03-17 20:57, Adam Jackson wrote:

The 32->24 support patch messed this up.

Bugzilla: https://bugs.freedesktop.org/100246
Bugzilla: https://bugs.freedesktop.org/100295
Signed-off-by: Adam Jackson 


LGTM:

Acked-by: Hans de Goede 

Regards,

Hans



---
 hw/xfree86/drivers/modesetting/driver.c  | 4 
 hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ++
 2 files changed, 10 insertions(+)

diff --git a/hw/xfree86/drivers/modesetting/driver.c 
b/hw/xfree86/drivers/modesetting/driver.c
index d7030e5..762b398 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -922,6 +922,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
 if (!check_outputs(ms->fd, _count))
 return FALSE;

+defaultdepth = pScrn->confScreen->defaultdepth;
+defaultbpp = pScrn->confScreen->defaultbpp;
 drmmode_get_default_bpp(pScrn, >drmmode, , );
 if (defaultdepth == 24 && defaultbpp == 24) {
 ms->drmmode.force_24_32 = TRUE;
@@ -949,6 +951,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
pScrn->depth);
 return FALSE;
 }
+if (ms->drmmode.kbpp == 0)
+ms->drmmode.kbpp = pScrn->bitsPerPixel;
 xf86PrintDepthBpp(pScrn);

 /* Process the options */
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index c1e489e..e6158ab 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2057,6 +2057,8 @@ drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, 
int cpp)
 xf86CrtcConfigInit(pScrn, _xf86crtc_config_funcs);

 drmmode->scrn = pScrn;
+if (drmmode->force_24_32 && cpp == 4)
+cpp = 3;
 drmmode->cpp = cpp;
 mode_res = drmModeGetResources(drmmode->fd);
 if (!mode_res)
@@ -2488,6 +2490,10 @@ drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, int *depth,
 uint32_t fb_id;
 int ret;

+/* if we've been configured in xorg.conf, trust it */
+if (*depth || *bpp)
+return;
+
 /* 16 is fine */
 ret = drmGetCap(drmmode->fd, DRM_CAP_DUMB_PREFERRED_DEPTH, );
 if (!ret && (value == 16 || value == 8)) {


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 1/2] Introduce keyboard grabbing protocol for Xwayland

2017-03-22 Thread Olivier Fourdan
This patch introduces a new protocol for grabbing the keyboard from
Xwayland.

This is needed for X11 applications that map an override redirect window
(ths not focused by the window manager) and issue an active grab on the
keyboard to capture all keyboard events.

Signed-off-by: Olivier Fourdan 
---
 Makefile.am|   2 +
 configure.ac   |   2 +-
 unstable/xwayland-keyboard-grab/README |   4 +
 .../xwayland-keyboard-grab-unstable-v1.xml | 101 +
 4 files changed, 108 insertions(+), 1 deletion(-)
 create mode 100644 unstable/xwayland-keyboard-grab/README
 create mode 100644 
unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml

diff --git a/Makefile.am b/Makefile.am
index e693afa..d100c13 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,8 @@ unstable_protocols =  
\
unstable/tablet/tablet-unstable-v2.xml  
\
unstable/xdg-foreign/xdg-foreign-unstable-v1.xml
\
unstable/idle-inhibit/idle-inhibit-unstable-v1.xml  
\
+   unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml  
\
+   
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \
$(NULL)
 
 stable_protocols = 
\
diff --git a/configure.ac b/configure.ac
index fbb0ec2..e98bceb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_PREREQ([2.64])
 
 m4_define([wayland_protocols_major_version], [1])
-m4_define([wayland_protocols_minor_version], [7])
+m4_define([wayland_protocols_minor_version], [8])
 m4_define([wayland_protocols_version],
   [wayland_protocols_major_version.wayland_protocols_minor_version])
 
diff --git a/unstable/xwayland-keyboard-grab/README 
b/unstable/xwayland-keyboard-grab/README
new file mode 100644
index 000..dbe45a5
--- /dev/null
+++ b/unstable/xwayland-keyboard-grab/README
@@ -0,0 +1,4 @@
+Xwayland keyboard grabbing protocol
+
+Maintainers:
+Olivier Fourdan 
diff --git 
a/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml 
b/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
new file mode 100644
index 000..31dc365
--- /dev/null
+++ b/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml
@@ -0,0 +1,101 @@
+
+
+
+  
+   Copyright ?? 2017 Red Hat Inc.
+
+   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.
+  
+
+  
+   This protocol specifies a way for Xwayland to request all keyboard
+   events to be forwarded to a surface even when the surface does not
+   have keyboard focus.
+
+   Unlike the X11 protocol, Wayland doesn't have the notion of
+   active grab on the keyboard.
+
+   When an X11 client acquires an active grab on the keyboard, all
+   key events are reported only to the grabbing X11 client.
+   When running in Xwayland, X11 applications may acquire an active
+   grab but that cannot be translated to the Wayland compositor who
+   may set the input focus to some other surface, thus breaking the
+   X11 client assumption that all key events are reported.
+
+   When an X11 client requests a keyboard grab, the Wayland compositor
+   may either inform or ask the user for the right to forward all key
+   events to the given client surface.
+
+   Warning! The protocol described in this file is experimental and
+   backward incompatible changes may be made. Backward compatible
+   changes may be added together with the corresponding interface
+   version bump.
+   Backward incompatible changes are done by 

[PATCH 0/2] RFC: Introduce keyboard grabbing and shortcuts inhibitor protocols

2017-03-22 Thread Olivier Fourdan
Hi,

This is a follow-up on my previous attempt to add a keyboard grabbing
protocol for Xwayland.

While I had the previous iteration working in Xwayland and mutter, this
was clearly not acceptable for Wayland native windows.

So I reckon we actually need two protocols, one specifically for Xwayland
and another one for Wayland native clients.

The one for Xwayland allows to re-route keyboard events to a given surface
even when the surface doesn't have actual keyboard focus. This is needed
for X11 applications that map an override redirect window (thus never
actually focused by the window manager) but issueing an active grab on
the keyboard to capture all keyboard events. An example of this is
xscreesasver unlock dialog [1] or gksu [2]

The second protocol is simpler, in the sense that it will simply tell the
Wayland compositor to ignore its own keyboard shortcuts when a given surface
is focused. A typical use case for this is virt-viewer/virt-manager where the
typical window manager shortcuts should be send to the remote host rather
than being caught and handled by the local Wayland compositor [3].

I have sample implementations of these two protcols in Xwayland, mutter
and gtk+ and it seems to work well, for both cases (x11 O-R window under
Xwayland and virt-viewer using Wayland native).

Cheers,
Olivier

[1] https://bugs.freedesktop.org/show_bug.cgi?id=96547
[2] https://bugzilla.gnome.org/show_bug.cgi?id=752956
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1285770

Olivier Fourdan (2):
  Introduce keyboard grabbing protocol for Xwayland
  Add keyboard shortcuts inhibitor

 Makefile.am|   2 +
 configure.ac   |   2 +-
 unstable/keyboard-shortcuts-inhibit/README |   4 +
 .../keyboard-shortcuts-inhibit-unstable-v1.xml |  85 +
 unstable/xwayland-keyboard-grab/README |   4 +
 .../xwayland-keyboard-grab-unstable-v1.xml | 101 +
 6 files changed, 197 insertions(+), 1 deletion(-)
 create mode 100644 unstable/keyboard-shortcuts-inhibit/README
 create mode 100644 
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
 create mode 100644 unstable/xwayland-keyboard-grab/README
 create mode 100644 
unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml

-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 2/2] Add keyboard shortcuts inhibitor

2017-03-22 Thread Olivier Fourdan
This adds a new protocol to let Wayland clients specify that they want
all keyboard events to be send to the client, regardless of the
compositor own shortcuts.

This is for use by virtual machine and remote connections viewers.

Signed-off-by: Olivier Fourdan 
---
 unstable/keyboard-shortcuts-inhibit/README |  4 +
 .../keyboard-shortcuts-inhibit-unstable-v1.xml | 85 ++
 2 files changed, 89 insertions(+)
 create mode 100644 unstable/keyboard-shortcuts-inhibit/README
 create mode 100644 
unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml

diff --git a/unstable/keyboard-shortcuts-inhibit/README 
b/unstable/keyboard-shortcuts-inhibit/README
new file mode 100644
index 000..929959c
--- /dev/null
+++ b/unstable/keyboard-shortcuts-inhibit/README
@@ -0,0 +1,4 @@
+Compositor shortcut inhibit protocol
+
+Maintainers:
+Olivier Fourdan 
diff --git 
a/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
 
b/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
new file mode 100644
index 000..f68e25a
--- /dev/null
+++ 
b/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
@@ -0,0 +1,85 @@
+
+
+
+  
+   Copyright ?? 2017 Red Hat Inc.
+
+   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.
+  
+
+  
+   This protocol specifies a way for a client to request the compositor
+   to ignore its own keyboard shortcuts, so that all keyboard events
+   get forwarded to a surface.
+
+   Warning! The protocol described in this file is experimental and
+   backward incompatible changes may be made. Backward compatible
+   changes may be added together with the corresponding interface
+   version bump.
+   Backward incompatible changes are done by bumping the version
+   number in the protocol and interface names and resetting the
+   interface version. Once the protocol is to be declared stable,
+   the 'z' prefix and the version number in the protocol and
+   interface names are removed and the interface version number is
+   reset.
+  
+
+  
+
+
+  
+   Destroy the keyboard shortcuts inhibitor manager.
+  
+
+
+
+  
+   Create a new keyboard shortcuts inhibitor object associated with the 
given surface.
+  
+  
+  
+
+
+  
+
+  
+
+   A keyboard shortcuts inhibitor instructs the compositor to ignore
+   its own keyboard shortcuts when the associated surface has keyboard
+   focus. As a result, when the surface is focused, it will receive all
+   keyboard events, even those which would normally be caught by the
+   compositor for its own shortcuts.
+
+   If the surface is destroyed, unmapped, or loses keyboard focus, the
+   the compositor will restore its own keyboard shortcuts.
+
+   If the surface regains keyboard focus the inhibitor will take effect
+   again.
+
+
+
+  
+   Remove the keyboard shortcuts inhibitor from the associated wl_surface.
+  
+
+
+  
+
-- 
2.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel