Reminder: 2016 X.Org Board of Directors Elections Nomination period is NOW

2016-03-01 Thread Peter Hutterer
We are seeking nominations for candidates for election to the X.Org
Foundation Board of Directors.  All X.Org Foundation members are
eligible for election to the board.

Nominations for the 2016 election are now open and will remain open
until 23:59 UTC on 15 March 2016.

The Board consists of directors elected from the membership.  Each
year, an election is held to bring the total number of directors to
eight. The four members receiving the highest vote totals will serve
as directors for two year terms.

The directors who received two year terms starting in 2015 were
Peter Hutterer, Martin Peres, Rob Clark and Daniel Vetter, They
will continue to serve until their term ends in 2017.  Current
directors whose term expires in 2016 are Alex Deucher, Matt Dew,
Egbert Eich and Keith Packard.

A director is expected to participate in the fortnightly IRC meeting to
discuss current business and to attend the annual meeting of the X.Org
Foundation, which will be held at a location determined in advance by
the Board of Directors.

A member may nominate themselves or any other member they feel is
qualified. Nominations should be sent to the Election Committee at
electi...@x.org.

Nominees shall be required to be current members of the X.Org
Foundation, and submit a  personal statement of up to 200 words that
will be provided to prospective voters.  The collected statements,
along with the statement of contribution to the X.Org Foundation in
the members account page on http://members.x.org, will be made
available to all voters to help them make their voting decisions.

Nominations, membership applications or renewals and completed
personal statements must be received no later than 23:59 UTC on 15 March
2016.

The slate of candidates will be published 17 March
2016 and candidate Q will begin then.  The deadline for Xorg
membership applications and renewals is 17 March 2016.

Cheers,
  Peter, on behalf of the X.Org BoD

___
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] Allows holding down two keys to repeat both ("Two-key repeat")

2016-03-01 Thread Thomas Ross
Hi,

Germain and I have developed a new patch to add "n-key repeat" (controlled by a 
variable, potentially could be set with xset.
The patch can be found here: 
https://git.framasoft.org/bobo/xkb_repeat/blob/master/patches/xkb-repeat-pattern.patch

I think that we should cancel/ignore this patch and potentially merge the n-key 
repeat one instead.

Thoughts?

Thanks,
Thomas.

On 29/02/16 05:59 PM, thomassross wrote:
> From: Germain Bossu 
> 
> https://git.framasoft.org/bobo/xkb_repeat/blob/master/patches/xkb-repeat2-easy.patch
> ---
>  include/xkbsrv.h | 1 +
>  xkb/xkbAccessX.c | 9 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/include/xkbsrv.h b/include/xkbsrv.h
> index cc6307a..5d8d913 100644
> --- a/include/xkbsrv.h
> +++ b/include/xkbsrv.h
> @@ -173,6 +173,7 @@ typedef struct _XkbSrvInfo {
>  KeyCode slowKey;
>  KeyCode slowKeyEnableKey;
>  KeyCode repeatKey;
> +KeyCode repeatKey2;
>  CARD8 krgTimerActive;
>  CARD8 beepType;
>  CARD8 beepCount;
> diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
> index 02e820b..e0a135c 100644
> --- a/xkb/xkbAccessX.c
> +++ b/xkb/xkbAccessX.c
> @@ -80,6 +80,7 @@ AccessXInit(DeviceIntPtr keybd)
>  xkbi->inactiveKey = 0;
>  xkbi->slowKey = 0;
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  xkbi->krgTimerActive = _OFF_TIMER;
>  xkbi->beepType = _BEEP_NONE;
>  xkbi->beepCount = 0;
> @@ -318,6 +319,8 @@ AccessXRepeatKeyExpire(OsTimerPtr timer, CARD32 now, void 
> *arg)
>  return 0;
>  
>  AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
> +if (xkbi->repeatKey2 != 0)
> +AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey2, TRUE);
>  
>  return xkbi->desc->ctrls->repeat_interval;
>  }
> @@ -327,6 +330,7 @@ AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi, KeyCode key)
>  {
>  if (xkbi->repeatKey == key)
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  return;
>  }
>  
> @@ -541,6 +545,10 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr 
> keybd)
>  DebugF("Starting software autorepeat...\n");
>  if (xkbi->repeatKey == key)
>  ignoreKeyEvent = TRUE;
> +else if (xkbi->repeatKey != 0)
> +xkbi->repeatKey2 = key;
> +else if (xkbi->repeatKey2 == key)
> +ignoreKeyEvent = TRUE;
>  else {
>  xkbi->repeatKey = key;
>  xkbi->repeatKeyTimer = TimerSet(xkbi->repeatKeyTimer,
> @@ -644,6 +652,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, 
> DeviceIntPtr keybd)
>   */
>  if (xkbi->repeatKey == key) {
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  }
>  
>  if ((ctrls->enabled_ctrls & XkbAccessXTimeoutMask) &&
> 



signature.asc
Description: OpenPGP digital 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] Allows holding down two keys to repeat both ("Two-key repeat")

2016-03-01 Thread thomassross
From: Germain Bossu 

https://git.framasoft.org/bobo/xkb_repeat/blob/master/patches/xkb-repeat2-easy.patch
---
 include/xkbsrv.h |  1 +
 xkb/xkbAccessX.c | 12 
 2 files changed, 13 insertions(+)

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index cc6307a..5d8d913 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -173,6 +173,7 @@ typedef struct _XkbSrvInfo {
 KeyCode slowKey;
 KeyCode slowKeyEnableKey;
 KeyCode repeatKey;
+KeyCode repeatKey2;
 CARD8 krgTimerActive;
 CARD8 beepType;
 CARD8 beepCount;
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 02e820b..12ae964 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -80,6 +80,7 @@ AccessXInit(DeviceIntPtr keybd)
 xkbi->inactiveKey = 0;
 xkbi->slowKey = 0;
 xkbi->repeatKey = 0;
+xkbi->repeatKey2 = 0;
 xkbi->krgTimerActive = _OFF_TIMER;
 xkbi->beepType = _BEEP_NONE;
 xkbi->beepCount = 0;
@@ -318,6 +319,8 @@ AccessXRepeatKeyExpire(OsTimerPtr timer, CARD32 now, void 
*arg)
 return 0;
 
 AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
+if (xkbi->repeatKey2 != 0)
+AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey2, TRUE);
 
 return xkbi->desc->ctrls->repeat_interval;
 }
@@ -326,7 +329,11 @@ void
 AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi, KeyCode key)
 {
 if (xkbi->repeatKey == key)
+{
 xkbi->repeatKey = 0;
+xkbi->repeatKey2 = 0;
+}
+
 return;
 }
 
@@ -541,6 +548,10 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr 
keybd)
 DebugF("Starting software autorepeat...\n");
 if (xkbi->repeatKey == key)
 ignoreKeyEvent = TRUE;
+else if (xkbi->repeatKey != 0)
+xkbi->repeatKey2 = key;
+else if (xkbi->repeatKey2 == key)
+ignoreKeyEvent = TRUE;
 else {
 xkbi->repeatKey = key;
 xkbi->repeatKeyTimer = TimerSet(xkbi->repeatKeyTimer,
@@ -644,6 +655,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr 
keybd)
  */
 if (xkbi->repeatKey == key) {
 xkbi->repeatKey = 0;
+xkbi->repeatKey2 = 0;
 }
 
 if ((ctrls->enabled_ctrls & XkbAccessXTimeoutMask) &&
-- 
2.7.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

[no subject]

2016-03-01 Thread thomassross

Thanks walter for pointing that out, I've attached a fixed version.

Thanks,
Thomas.
___
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] xv: fix double free in AddResource failure case

2016-03-01 Thread Julien Cristau
XvdiDestroyVideoNotifyList already frees the list if AddResource fails,
so don't do it twice.  And set tpn->client to NULL explicitly to avoid
confusing uninitialized memory with a valid value.

Signed-off-by: Julien Cristau 
---
 Xext/xvmain.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 0c6f25b..de6cc7a 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -800,10 +800,9 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, 
BOOL onoff)
 if (!(tpn = malloc(sizeof(XvVideoNotifyRec
 return BadAlloc;
 tpn->next = NULL;
-if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) {
-free(tpn);
+tpn->client = NULL;
+if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn))
 return BadAlloc;
-}
 }
 else {
 /* LOOK TO SEE IF ENTRY ALREADY EXISTS */
-- 
2.7.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 2/5] dri1: Fix unchecked AddResource

2016-03-01 Thread Julien Cristau
On Tue, Mar  1, 2016 at 14:09:30 -0500, Adam Jackson wrote:

> Signed-off-by: Adam Jackson 
> ---
>  hw/xfree86/dri/dri.c | 8 +---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
Kind of silly that those result in BadValue instead of BadAlloc, but
meh, dri1.

for the series (1/5 and 2/5):
Reviewed-by: Julien Cristau 

Cheers,
Julien

> diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
> index 875c9cc..0046e52 100644
> --- a/hw/xfree86/dri/dri.c
> +++ b/hw/xfree86/dri/dri.c
> @@ -1032,7 +1032,8 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
>  }
>  
>  /* track this in case the client dies before cleanup */
> -AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv);
> +if (!AddResource(context, DRIContextPrivResType, (void *) 
> pDRIContextPriv))
> +return FALSE;
>  
>  return TRUE;
>  }
> @@ -1263,8 +1264,9 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, 
> DrawablePtr pDrawable,
>  }
>  
>  /* track this in case the client dies */
> -AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
> -(void *) (intptr_t) pDrawable->id);
> +if (!AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
> + (void *) (intptr_t) pDrawable->id))
> +return FALSE;
>  
>  if (pDRIDrawablePriv->hwDrawable) {
>  drmUpdateDrawableInfo(pDRIPriv->drmFD,
> -- 
> 2.5.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 2/5] dri1: Fix unchecked AddResource

2016-03-01 Thread Adam Jackson
Signed-off-by: Adam Jackson 
---
 hw/xfree86/dri/dri.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 875c9cc..0046e52 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1032,7 +1032,8 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
 }
 
 /* track this in case the client dies before cleanup */
-AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv);
+if (!AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv))
+return FALSE;
 
 return TRUE;
 }
@@ -1263,8 +1264,9 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, 
DrawablePtr pDrawable,
 }
 
 /* track this in case the client dies */
-AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
-(void *) (intptr_t) pDrawable->id);
+if (!AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
+ (void *) (intptr_t) pDrawable->id))
+return FALSE;
 
 if (pDRIDrawablePriv->hwDrawable) {
 drmUpdateDrawableInfo(pDRIPriv->drmFD,
-- 
2.5.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/5] xv: Fix unchecked AddResource

2016-03-01 Thread Adam Jackson
Signed-off-by: Adam Jackson 
---
 Xext/xvmain.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 0c6f25b..3a02634 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -844,7 +844,8 @@ XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, 
BOOL onoff)
 
 tpn->client = NULL;
 tpn->id = FakeClientID(client->index);
-AddResource(tpn->id, XvRTVideoNotify, tpn);
+if (!AddResource(tpn->id, XvRTVideoNotify, tpn))
+return BadAlloc;
 
 tpn->client = client;
 return Success;
@@ -893,7 +894,8 @@ XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, 
BOOL onoff)
 
 tpn->client = client;
 tpn->id = FakeClientID(client->index);
-AddResource(tpn->id, XvRTPortNotify, tpn);
+if (!AddResource(tpn->id, XvRTPortNotify, tpn))
+return BadAlloc;
 
 return Success;
 
-- 
2.5.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] vidmode: build without xf86vidmodeproto

2016-03-01 Thread Adam Jackson
On Tue, 2016-03-01 at 17:03 +0100, Olivier Fourdan wrote:
> git commit f175cf45:
> 
>   vidmode: move to a separate library of its own
> 
> introduced a regression where the xserver would not build when
> xf86vidmodeproto is not installed even if the configure option
> "--disable-xf86vidmode" is specified.
> 
> Fix build failure when xf86vidmodeproto is not installed.
> 
> Signed-off-by: Olivier Fourdan 

remote: I: patch #75487 updated using rev 
ac4d8c7cee13947b688ebb26035f06f7744db201.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   9c88cb9..ac4d8c7  master -> master

- 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 kdrive/ephyr v3] kdrive/ephyr: map host X server's keymap into Xephyr, if supported

2016-03-01 Thread Adam Jackson
On Thu, 2016-02-25 at 16:37 -0300, Laércio de Sousa wrote:
> Currently Xephyr doesn't inherit host X server's keymap, which
> may lead to keymap mismatches when using a non-US keyboard in a
> window inside Xephyr. This patch makes Xephyr change its keymap
> to match host X server's one (unless XKB support is disabled),
> using xcb-xkb to retrieve the needed XKB controls.
> This implementation is analogous to Xnest one at commit 83fef4235.
> 
> Supersedes: https://patchwork.freedesktop.org/patch/67504
> 
> Signed-off-by: Laércio de Sousa 

remote: I: patch #74979 updated using rev 
9c88cb9b059111e0531852f3fa8fa571c0306f57.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   daa6d2d..9c88cb9  master -> master

- 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

[PATCH] vidmode: build without xf86vidmodeproto

2016-03-01 Thread Olivier Fourdan
git commit f175cf45:

  vidmode: move to a separate library of its own

introduced a regression where the xserver would not build when
xf86vidmodeproto is not installed even if the configure option
"--disable-xf86vidmode" is specified.

Fix build failure when xf86vidmodeproto is not installed.

Signed-off-by: Olivier Fourdan 
---
 Xext/vidmode.c   | 4 
 include/vidmodestr.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index 7ea5ddf..7c838f4 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -33,6 +33,8 @@ from Kaleb S. KEITHLEY
 #include 
 #endif
 
+#ifdef XF86VIDMODE
+
 #include 
 #include 
 #include 
@@ -2145,3 +2147,5 @@ VidModePtr VidModeInit(ScreenPtr pScreen)
 
 return VidModeGetPtr(pScreen);
 }
+
+#endif /* XF86VIDMODE */
diff --git a/include/vidmodestr.h b/include/vidmodestr.h
index 3a44185..b47daa7 100644
--- a/include/vidmodestr.h
+++ b/include/vidmodestr.h
@@ -133,8 +133,10 @@ typedef struct {
 VidModeGetGammaRampSizeProcPtrGetGammaRampSize;
 } VidModeRec, *VidModePtr;
 
+#ifdef XF86VIDMODE
 void VidModeAddExtension(Bool allow_non_local);
 VidModePtr VidModeGetPtr(ScreenPtr pScreen);
 VidModePtr VidModeInit(ScreenPtr pScreen);
+#endif /* XF86VIDMODE */
 
 #endif
-- 
2.5.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 kdrive/ephyr v8 0/4] Xephyr input hot-plugging support and other additions for single-GPU multi-seat

2016-03-01 Thread Adam Jackson
On Fri, 2016-02-12 at 14:17 -0200, Laércio de Sousa wrote:
> This is the v8 of patch series which provides some missing parts
> for full single-GPU multi-seat support in Xephyr. This version is
> mainly for fixing purposes, since most of v7 patches are already
> merged. The main differences to v7 are the following:
> 
> * Some fixes and clean-ups in patch that introduces hot-plugging feature,
>   following discussions with Adam Jackson, Peter Hutterer,
>   and Emil Velikov.
> 
>   - During tests, I realized that some issues regarding input
> hot-plugging with evdev driver in kdrive only seems to affect
> Debian/Ubuntu systems, so I've dropped some pieces of code written
> to address such issues at upstream level.
> 
> * Some fixes and cahges in patch that introduces command-line options
>   -xkb-layout et al., following Hutterer's advices.
> 
> * The patch with a workaround to make keyboard LEDs
>   work properly in Xephyr was dropped for now. After discussing
>   with Hutterer, I've decided to search for a better solution,
>   which I'll submit in a second moment.
> 
> * A new patch is introduced to enable option -sw-cursor by default
>   if -seat is passed.
> 
> Example of systemd service unit "xorg@.service" to launch a bare
> Xorg server to be used by Xephyr:
> 
>   [Unit]
>   Description=Service for Xorg server at display :%i
> 
>   [Service]
>   ExecStart=/usr/bin/X :%i -seat __fake-seat__ -dpms -s 0 -nocursor
>   SuccessExitStatus=0 1
> 
>   # Not needed if Xorg is to be started via
>   # socket-activation (see xorg@.socket below)
>   [Install]
>   WantedBy=display-manager.service
> 
> NOTE: in this example, __fake-seat__ is a trick to ensure
>   this bare Xorg server will neither touch VTs (like a
>   seat0 X server does) nor grab input devices (like a
>   non-seat0 X server does).
> 
> Example of systemd socket unit "xorg@.socket" to be used in
> conjunction with service unit above (if Xorg was built with
> systemd socket-activation support):
> 
>   [Unit]
>   Description=Socket for Xorg server at display :%i
> 
>   [Socket]
>   ListenStream=/tmp/.X11-unix/X%i
> 
>   [Install]
>   WantedBy=sockets.target
> 
> Example of Xephyr-based seat configuration in LightDM 1.12
> and newer, based on this patch series (provided that a bare
> X server on display number :90, with two outputs named LVDS
> and VGA, is already running):
> 
>   [Seat:seat-LVDS]
>   xserver-command=env DISPLAY=:90 Xephyr -xkb-rules evdev -xkb-layout br 
> -xkb-model abnt2 -output LVDS
> 
>   [Seat:seat-VGA]
>   xserver-command=env DISPLAY=:90 Xephyr -xkb-rules evdev -xkb-layout br 
> -xkb-model abnt2 -output VGA
> 
> ** IDEAS FOR FURTHER STEPS **
>  * Write a new input driver for kdrive, based on libinput
>    (or find a way to share the same input drivers
>    between kdrive and Xorg itself).
> 
>  * Bring InputClass matching rules support (or something similar)
>    to kdrive, so we don't need to rely on e.g. udev rules to
>    retrieve XKB preperties.
> 
>  * Eventually search for a better integration with
>    systemd-logind, so that Xephyr can be started
>    in multi-seat mode without root privileges
>    (may require root-less Xorg support in display
>    managers).
> 
> ** HISTORY **
> In v7, ephyr input driver for kdrive won't be loaded
> in multi-seat mode, i.e. if -seat option is passed to Xephyr, so that
> it'll handle only its seat's input hardware. In this version, we've
> also dropped patch to add command-line options -host-display and
> -host-auth for Xephyr (use "env DISPLAY=... XAUTHORITY=... Xephyr" instead).
> 
> v6 adds "-novtswitch" to the list of command-line
> arguments ignored by Xephyr.
> 
> v5 only builds input hot-plugging for kdrive if one
> of CONFIG_UDEV or CONFIG_HAL options is enabled.
> 
> v4 drops explicit option -input-hotplug. Since input hot-plugging support
> in Xephyr is very unlikely to be used outside multi-seat context,
> it's now automatically enabled if, and only if, -seat option is passed.
> 
> v3 includes two patches: one that introduces a new flag to better
> distinguish between real keyboards and other key input devices (so that
> kdrive can grab keyboards only), and another one that prevents kdrive
> evdev driver from deliberately renaming keyboard and pointer devices
> if they are already named (e.g. from udev), with potential memory leaks.
> 
> v2 fixes some problems found in v1, like double-free errors for some
> InputOption objects, and memory corruptions when a USB keyboard or mouse is
> unplugged and replugged several times, due to the fact that their FDs may not 
> be
> successfully unregistered when they are unplugged. It also brings new patches
> for improving NewInputDeviceRequest() implementation in hw/kdrive/src/kinput.c
> (making use of KdParseKbdOptions() and KdParsePointerOptions() as requested),
> and some other minor changes.
> 
> Some patches provide new command-line options to make it
> easier to launch Xephyr directly from display manager, 

Re: [PATCH 09/12 v2] vidmode: move to a separate library of its own

2016-03-01 Thread Olivier Fourdan
Hi Jon,

- Original Message -
> This doesn't build if xf86vidmodeproto isn't installed (See [1]), and I
> think doesn't respect ./configure --disable-xf86vidmode
> 
> I guess some wrapping in #ifdef XF86VIDMODE/#endif is needed
> 
> [1]
> http://ec2-52-16-27-13.eu-west-1.compute.amazonaws.com:8010/builders/xserver/builds/321

It does respect --disable-xf86vidmode in the sense that xvidmode is disabled 
when this option is used, but you're right that I did not check it would build 
without xf86vidmodeproto (partly because my Linux distribution of choice 
bundles that in a general x11proto package where they all come together).

Patch to follow...

Cheers,
Olivier
___
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] xwayland: fix a crash on output removal

2016-03-01 Thread Adam Jackson
On Tue, 2016-03-01 at 03:20 -0500, Olivier Fourdan wrote:
> Hi Adam, Keith,
> 
> I think we'll need this patch in both branches master and 1.18 to fix
> a segfault in Xwayland on output removal (that one is completely my
> fault).
> 
> Was discussed with Daniel who suggested the fix on irc some time ago
> (and Daniel gave his R-b on irc, thus the R-b in the commit) but
> somehow forgot to track it and it seems it's not been pushed yet.

Thanks for the reminder, merged:

remote: I: patch #72951 updated using rev 
2116f03be04240e961649ca750a7aa5438b8446c.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   1bee4e2..2116f03  master -> master

- 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: [PULL] Reviewed DRI3 & Present patches

2016-03-01 Thread Adam Jackson
On Tue, 2016-03-01 at 12:45 +0900, Michel Dänzer wrote:
> Hi Keith / Adam,
> 
> 
> the following changes since commit 6070a749d953951bacbfb149c5c36451293aad35:
> 
>   xwayland: add partial xvidmode extension support (2016-02-29 16:29:17 -0500)
> 
> are available in the git repository at:
> 
>   git://people.freedesktop.org/~daenzer/xserver for-master
> 
> for you to fetch changes up to 1bee4e254ca0305cb23e574b4c8b250d276ee998:
> 
>   present: Call present_restore_screen_pixmap from present_set_abort_flip 
> (2016-03-01 11:59:51 +0900)

remote: I: patch #71844 updated using rev 
43eb5b6047c9b35c337e553ec054f08bdc835abb.
remote: I: patch #74387 updated using rev 
72328e5eb98a3f27e1f0a0e17beae6db447bd87c.
remote: I: patch #74583 updated using rev 
4611e902c291b8a789f374cff3300f74645bc2b2.
remote: I: patch #74584 updated using rev 
1bee4e254ca0305cb23e574b4c8b250d276ee998.
remote: I: 4 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   6070a74..1bee4e2  master -> master

- 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 09/12 v2] vidmode: move to a separate library of its own

2016-03-01 Thread Jon Turney

On 10/02/2016 08:34, Olivier Fourdan wrote:

XVidMode extension might be useful to non hardware servers as well (e.g.
Xwayand) so that applications that rely on it (e.g. lot of older games)
can at least have read access to XVidMode.

But the implementation is very XFree86 centric, so the idea is to add
a bunch of vfunc that other non-XFree86 servers can hook up into to
provide a similar functionality.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806
Signed-off-by: Olivier Fourdan 


This doesn't build if xf86vidmodeproto isn't installed (See [1]), and I 
think doesn't respect ./configure --disable-xf86vidmode


I guess some wrapping in #ifdef XF86VIDMODE/#endif is needed

[1] 
http://ec2-52-16-27-13.eu-west-1.compute.amazonaws.com:8010/builders/xserver/builds/321


___
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 3/3] present: Only requeue if target MSC is not reached after an unflip

2016-03-01 Thread Martin Peres

On 25/02/16 17:28, Adam Jackson wrote:

On Thu, 2016-02-25 at 09:49 +, Chris Wilson wrote:

On Wed, Feb 24, 2016 at 04:52:59PM +0900, Michel Dänzer wrote:

From: Michel Dänzer 

While present_pixmap decrements target_msc by 1 for present_queue_vblank,
it leaves the original vblank->target_msc intact. So incrementing the
latter for requeueing resulted in the requeued presentation being
executed too late.

My mistake. Yes, the local target_msc is decremented but after
vblank->target_msc is assigned.
  

Also, no need to requeue if the target MSC is already reached.

This further reduces stutter when a popup menu appears on top of a
flipping fullscreen window.

Signed-off-by: Michel Dänzer 

Reviewed-by: Chris Wilson 
-Chris

Series merged:

remote: I: patch #74919 updated using rev 
1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a.
remote: I: patch #74915 updated using rev 
e7a35b9e16aa12970908f5d55371bb1b862f8f24.
remote: I: patch #74910 updated using rev 
b4ac7b142fa3c536e9b283cfd34b94d82c03aac6.
remote: I: 3 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
0461bca..b4ac7b1  master -> master



For some reason, this patch prevents kde from starting. I will provide 
an xtrace for this as soon as I can, but I wanted to provide you with a 
heads'up!

___
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] Allows holding down two keys to repeat both ("Two-key repeat")

2016-03-01 Thread walter harms


Am 29.02.2016 23:59, schrieb thomassross:
> From: Germain Bossu 
> 
> https://git.framasoft.org/bobo/xkb_repeat/blob/master/patches/xkb-repeat2-easy.patch
> ---
>  include/xkbsrv.h | 1 +
>  xkb/xkbAccessX.c | 9 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/include/xkbsrv.h b/include/xkbsrv.h
> index cc6307a..5d8d913 100644
> --- a/include/xkbsrv.h
> +++ b/include/xkbsrv.h
> @@ -173,6 +173,7 @@ typedef struct _XkbSrvInfo {
>  KeyCode slowKey;
>  KeyCode slowKeyEnableKey;
>  KeyCode repeatKey;
> +KeyCode repeatKey2;
>  CARD8 krgTimerActive;
>  CARD8 beepType;
>  CARD8 beepCount;
> diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
> index 02e820b..e0a135c 100644
> --- a/xkb/xkbAccessX.c
> +++ b/xkb/xkbAccessX.c
> @@ -80,6 +80,7 @@ AccessXInit(DeviceIntPtr keybd)
>  xkbi->inactiveKey = 0;
>  xkbi->slowKey = 0;
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  xkbi->krgTimerActive = _OFF_TIMER;
>  xkbi->beepType = _BEEP_NONE;
>  xkbi->beepCount = 0;
> @@ -318,6 +319,8 @@ AccessXRepeatKeyExpire(OsTimerPtr timer, CARD32 now, void 
> *arg)
>  return 0;
>  
>  AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE);
> +if (xkbi->repeatKey2 != 0)
> +AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey2, TRUE);
>  
>  return xkbi->desc->ctrls->repeat_interval;
>  }
> @@ -327,6 +330,7 @@ AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi, KeyCode key)
>  {
>  if (xkbi->repeatKey == key)
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  return;
>  }


this looks strange, either the indent is wrong or same braces are missing ?

  if (xkbi->repeatKey != key)
return

  xkbi->repeatKey = 0;
  xkbi->repeatKey2 = 0;

below there is the same pattern, maybe you want to use AccessXCancelRepeatKey()
there ?

just my 2 cents,

re,
 wh

>  
> @@ -541,6 +545,10 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr 
> keybd)
>  DebugF("Starting software autorepeat...\n");
>  if (xkbi->repeatKey == key)
>  ignoreKeyEvent = TRUE;
> +else if (xkbi->repeatKey != 0)
> +xkbi->repeatKey2 = key;
> +else if (xkbi->repeatKey2 == key)
> +ignoreKeyEvent = TRUE;
>  else {
>  xkbi->repeatKey = key;
>  xkbi->repeatKeyTimer = TimerSet(xkbi->repeatKeyTimer,
> @@ -644,6 +652,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, 
> DeviceIntPtr keybd)
>   */
>  if (xkbi->repeatKey == key) {
>  xkbi->repeatKey = 0;
> +xkbi->repeatKey2 = 0;
>  }
>  
>  if ((ctrls->enabled_ctrls & XkbAccessXTimeoutMask) &&
___
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] xwayland: fix a crash on output removal

2016-03-01 Thread Olivier Fourdan
> Hi Adam, Keith,
> 
> I think we'll need this patch in both branches master and 1.18 to fix a
> segfault in Xwayland on output removal (that one is completely my fault).
> 
> Was discussed with Daniel who suggested the fix on irc some time ago (and
> Daniel gave his R-b on irc, thus the R-b in the commit) but somehow forgot
> to track it and it seems it's not been pushed yet.

Sorry, I mean, _I_ forgot to track it...

> 
> Cheers,
> Olivier
> 
___
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] xwayland: fix a crash on output removal

2016-03-01 Thread Olivier Fourdan
Hi Adam, Keith,

I think we'll need this patch in both branches master and 1.18 to fix a 
segfault in Xwayland on output removal (that one is completely my fault).

Was discussed with Daniel who suggested the fix on irc some time ago (and 
Daniel gave his R-b on irc, thus the R-b in the commit) but somehow forgot to 
track it and it seems it's not been pushed yet.

Cheers,
Olivier



- Original Message -
> On output removal, the CRTC that was added in xwl_output_create()
> is not removed in xwl_output_destroy() and would cause a segmentation
> fault later on in ProcRRGetMonitors():
> 
>   (EE) Segmentation fault at address 0x10001
>   (EE)
>   (EE) 10: ? (?+0x29) [0x29]
>   (EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299]
>   (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580]
>   (EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3]
>   (EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e]
>   (EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b]
>   (EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9]
>   (EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198]
>   (EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710]
>   (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f]
>   (EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9]
> 
> Remove the output CRTC in xwl_output_destroy() to avoid the crash.
> 
> Signed-off-by: Olivier Fourdan 
> Reviewed-by: Daniel Stone 
> ---
>  hw/xwayland/xwayland-output.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
> index e9ec190..abb73ab 100644
> --- a/hw/xwayland/xwayland-output.c
> +++ b/hw/xwayland/xwayland-output.c
> @@ -298,6 +298,7 @@ xwl_output_destroy(struct xwl_output *xwl_output)
>  
>  wl_output_destroy(xwl_output->output);
>  xorg_list_del(_output->link);
> +RRCrtcDestroy(xwl_output->randr_crtc);
>  RROutputDestroy(xwl_output->randr_output);
>  
>  xorg_list_for_each_entry(it, _screen->output_list, link)
> --
> 2.5.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 v3] xwayland: add glamor Xv adaptor

2016-03-01 Thread Olivier Fourdan
This adds an Xv adaptor using glamor.

Signed-off-by: Olivier Fourdan 
---
 v2: Plug leak of Xv adaptor and glamor private ports array on closure
 v3: Get the adaptor size from the GL_MAX_TEXTURE_SIZE 

 hw/xwayland/Makefile.am  |   4 +-
 hw/xwayland/xwayland-glamor-xv.c | 413 +++
 hw/xwayland/xwayland-glamor.c|   3 +
 hw/xwayland/xwayland.h   |   2 +
 4 files changed, 421 insertions(+), 1 deletion(-)
 create mode 100644 hw/xwayland/xwayland-glamor-xv.c

diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
index 0905082..26fdba7 100644
--- a/hw/xwayland/Makefile.am
+++ b/hw/xwayland/Makefile.am
@@ -32,7 +32,9 @@ Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
 
 if GLAMOR_EGL
-Xwayland_SOURCES += xwayland-glamor.c
+Xwayland_SOURCES +=\
+   xwayland-glamor.c   \
+   xwayland-glamor-xv.c
 
 nodist_Xwayland_SOURCES =  \
drm-client-protocol.h   \
diff --git a/hw/xwayland/xwayland-glamor-xv.c b/hw/xwayland/xwayland-glamor-xv.c
new file mode 100644
index 000..5fa1c69
--- /dev/null
+++ b/hw/xwayland/xwayland-glamor-xv.c
@@ -0,0 +1,413 @@
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
+ * Copyright © 2013 Red Hat
+ * Copyright © 2014 Intel Corporation
+ * Copyright © 2016 Red Hat
+ *
+ * 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:
+ *  Olivier Fourdan 
+ *
+ * Derived from the glamor_xf86_xv, ephyr_glamor_xv and xf86xv
+ * implementations
+ */
+
+#include "xwayland.h"
+#include "glamor_priv.h"
+
+#include 
+
+#define NUM_FORMATS3
+#define NUM_PORTS  16
+#define ADAPTOR_NAME   "glamor textured video"
+#define ENCODER_NAME   "XV_IMAGE"
+
+static DevPrivateKeyRec xwlXvScreenPrivateKeyRec;
+#define xwlXvScreenPrivateKey ()
+
+typedef struct {
+XvAdaptorPtr glxv_adaptor; /* We have only one adaptor, glamor Xv */
+glamor_port_private *port_privates;
+
+CloseScreenProcPtr CloseScreen;
+} xwlXvScreenRec, *xwlXvScreenPtr;
+
+typedef struct {
+char depth;
+short class;
+} xwlVideoFormatRec, *xwlVideoFormatPtr;
+
+static xwlVideoFormatRec Formats[NUM_FORMATS] = {
+{15, TrueColor},
+{16, TrueColor},
+{24, TrueColor}
+};
+
+static int
+xwl_glamor_xv_stop_video(XvPortPtr   pPort,
+ DrawablePtr pDraw)
+{
+glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
+
+if (pDraw->type != DRAWABLE_WINDOW)
+return BadAlloc;
+
+glamor_xv_stop_video(gpp);
+
+return Success;
+}
+
+static int
+xwl_glamor_xv_set_port_attribute(XvPortPtr pPort,
+ Atom  attribute,
+ INT32 value)
+{
+glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
+
+return glamor_xv_set_port_attribute(gpp, attribute, value);
+}
+
+static int
+xwl_glamor_xv_get_port_attribute(XvPortPtr pPort,
+ Atom  attribute,
+ INT32*pValue)
+{
+glamor_port_private *gpp = (glamor_port_private *) (pPort->devPriv.ptr);
+
+return glamor_xv_get_port_attribute(gpp, attribute, pValue);
+}
+
+static int
+xwl_glamor_xv_query_best_size(XvPortPtr pPort,
+  CARD8 motion,
+  CARD16vid_w,
+  CARD16vid_h,
+  CARD16drw_w,
+  CARD16drw_h,
+  unsigned int *p_w,
+  unsigned int *p_h)
+{
+*p_w = drw_w;
+*p_h = drw_h;
+
+return Success;
+}
+
+static int
+xwl_glamor_xv_query_image_attributes(XvPortPtr  pPort,
+ XvImagePtr format,
+