[PULL] XQuartz {Add, Remove}EnabledDevice build fixes and other cleanup

2016-09-11 Thread Jeremy Huddleston Sequoia
The following changes since commit 527c6baa294d17c5eca1d87ac941844872e90dac:

  xkb: fix check for appending '|' character when applying rules (2016-09-07 
15:16:13 +1000)

are available in the git repository at:

  https://github.com/XQuartz/xorg-server.git 

for you to fetch changes up to dd85834e3995671da908e825eaa7a228d11f0b3d:

  xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice 
(2016-09-10 23:37:46 -0700)


Jeremy Huddleston Sequoia (4):
  XQuartz: Fix the issue where the h key could be come "stuck" after hiding 
XQuartz with cmd-h
  XQuartz: Cleanup CPPFLAGS that are no longer necessary on darwin
  os/connection: Improve abstraction for launchd secure sockets
  xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice

 hw/xquartz/X11Application.m|  9 +
 hw/xquartz/darwin.c| 17 +++--
 hw/xquartz/pbproxy/Makefile.am |  5 ++---
 os/connection.c| 31 ++-
 4 files changed, 48 insertions(+), 14 deletions(-)



smime.p7s
Description: S/MIME cryptographic 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

Re: [PATCH:xserver] Use pthread_setname_np to set thread names if available

2016-09-11 Thread Jeremy Huddleston Sequoia
Reviewed-by: Jeremy Huddleston Sequoia 
Tested-by: Jeremy Huddleston Sequoia 
(on current macOS)

> On Sep 10, 2016, at 21:14, Alan Coopersmith  
> wrote:
> 
> Autoconf logic borrowed from glib
> 
> Signed-off-by: Alan Coopersmith 
> ---
> configure.ac| 20 
> include/dix-config.h.in |  6 ++
> os/inputthread.c| 12 
> 3 files changed, 38 insertions(+)
> 
> I have only tested this on Solaris, not MacOS or Linux, but since the
> similar code in glib works on both, hope this will too.
> 
> diff --git a/configure.ac b/configure.ac
> index e206e0f..4ff317f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -870,6 +870,26 @@ if test "x$INPUTTHREAD" = "xyes" ; then
> SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS"
> CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
> AC_DEFINE(INPUTTHREAD, 1, [Use a separate input thread])
> +
> +save_LIBS="$LIBS"
> +LIBS="$LIBS $SYS_LIBS"
> +dnl MacOS X 10.6 & higher
> +AC_MSG_CHECKING(for pthread_setname_np(const char*))
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],
> + [pthread_setname_np("example")])],
> +   [AC_MSG_RESULT(yes)
> + AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID,1,
> +   [Have function pthread_setname_np(const char*)])],
> +   [AC_MSG_RESULT(no)])
> +dnl GNU libc 2.12 & higher, Solaris 11.3 & higher
> +AC_MSG_CHECKING(for pthread_setname_np(pthread_t, const char*))
> +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ],
> + [pthread_setname_np(pthread_self(), 
> "example")])],
> +   [AC_MSG_RESULT(yes)
> + AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITH_TID,1,
> +   [Have function pthread_setname_np(pthread_t, 
> const char*)])],
> +[AC_MSG_RESULT(no)])
> +LIBS="$save_LIBS"
> fi
> 
> REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO 
> $SDK_REQUIRED_MODULES"
> diff --git a/include/dix-config.h.in b/include/dix-config.h.in
> index d49af92..4f020e5 100644
> --- a/include/dix-config.h.in
> +++ b/include/dix-config.h.in
> @@ -143,6 +143,12 @@
> /* Define to 1 if you have the `mmap' function. */
> #undef HAVE_MMAP
> 
> +/* Define to 1 if you have the function pthread_setname_np(const char*) */
> +#undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID
> +
> +/* Define to 1 if you have the function pthread_setname_np(pthread_t, const 
> char*) */
> +#undef HAVE_PTHREAD_SETNAME_NP_WITH_TID
> +
> /* Define to 1 if you have the  header file. */
> #undef HAVE_NDBM_H
> 
> diff --git a/os/inputthread.c b/os/inputthread.c
> index 1cd1c2a..2ea39e7 100644
> --- a/os/inputthread.c
> +++ b/os/inputthread.c
> @@ -310,6 +310,12 @@ InputThreadDoWork(void *arg)
> 
> inputThreadInfo->running = TRUE;
> 
> +#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
> +pthread_setname_np (pthread_self(), "InputThread");
> +#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID)
> +pthread_setname_np ("InputThread");
> +#endif
> +
> ospoll_add(inputThreadInfo->fds, hotplugPipeRead,
>ospoll_trigger_level,
>InputThreadPipeNotify,
> @@ -411,6 +417,12 @@ InputThreadPreInit(void)
> fcntl(hotplugPipeRead, F_SETFL, O_NONBLOCK | O_CLOEXEC);
> hotplugPipeWrite = hotplugPipe[1];
> 
> +#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
> +pthread_setname_np (pthread_self(), "MainThread");
> +#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID)
> +pthread_setname_np ("MainThread");
> +#endif
> +
> }
> 
> /**
> -- 
> 2.7.4
> 
> ___
> 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



smime.p7s
Description: S/MIME cryptographic 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 1/1] randr: Initialize RandR even if there are currently no screens attached

2016-09-11 Thread Jeremy Huddleston Sequoia
Failure to do so causes an overvlow in RRClientCallback().

=
==41262==ERROR: AddressSanitizer: global-buffer-overflow on address 
0x000103ccfbc8 at pc 0x0001034f32b9 bp 0x735a94c0 sp 0x735a94b8
WRITE of size 4 at 0x000103ccfbc8 thread T6
#0 0x1034f32b8 in RRClientCallback randr.c:72
#1 0x1038c75e3 in _CallCallbacks dixutils.c:737
#2 0x10388f406 in CallCallbacks callback.h:83
#3 0x1038bc49a in NextAvailableClient dispatch.c:3562
#4 0x103ad094c in AllocNewConnection connection.c:777
#5 0x103ad1695 in EstablishNewConnections connection.c:863
#6 0x1038c6630 in ProcessWorkQueue dixutils.c:523
#7 0x103ab2dbf in WaitForSomething WaitFor.c:175
#8 0x103880836 in Dispatch dispatch.c:411
#9 0x1038c2141 in dix_main main.c:301
#10 0x1032ac75a in server_thread quartzStartup.c:66
#11 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
#12 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
#13 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)

Signed-off-by: Jeremy Huddleston Sequoia 
---
 randr/randr.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/randr/randr.c b/randr/randr.c
index 0138dc1..efd3859 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -387,9 +387,6 @@ RRExtensionInit(void)
 {
 ExtensionEntry *extEntry;
 
-if (RRNScreens == 0)
-return;
-
 if (!dixRegisterPrivateKey(&RRClientPrivateKeyRec, PRIVATE_CLIENT,
sizeof(RRClientRec) +
screenInfo.numScreens * sizeof(RRTimesRec)))
-- 
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/1] dix/dispatch: Fix SmartScheduleClient interval adjustment to use best rather than pClient

2016-09-11 Thread Jeremy Huddleston Sequoia
pClient does not contain a live value after the transition to lists

https://bugs.freedesktop.org/show_bug.cgi?id=97765

Application Specific Information:
X.Org X Server 1.18.99.1 Build Date: 20160910
=
==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 
0x000108ce3834 at pc 0x000108880766 bp 0x745f76c0 sp 0x745f76b8
READ of size 4 at 0x000108ce3834 thread T6
#0 0x108880765 in SmartScheduleClient dispatch.c:365
#1 0x10887ecc5 in Dispatch dispatch.c:422
#2 0x1088c05f1 in dix_main main.c:301
#3 0x1082aabba in server_thread quartzStartup.c:66
#4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
#5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
#6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)

Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e
Signed-off-by: Jeremy Huddleston Sequoia 
---
 dix/dispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3b9600e..f1a074d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -360,7 +360,7 @@ SmartScheduleClient(void)
  * has run, bump the slice up to get maximal
  * performance from a single client
  */
-if ((now - pClient->smart_start_tick) > 1000 &&
+if ((now - best->smart_start_tick) > 1000 &&
 SmartScheduleSlice < SmartScheduleMaxSlice) {
 SmartScheduleSlice += SmartScheduleInterval;
 }
-- 
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/1] glx: Initialize glx even if there are currently no screens attached

2016-09-11 Thread Jeremy Huddleston Sequoia
Failure to do so causes an overvlow in glxClientCallback

Application Specific Information:
X.Org X Server 1.18.99.1 Build Date: 20160911
=
==52118==ERROR: AddressSanitizer: SEGV on unknown address 0x000102b27b80 (pc 
0x000103433245 bp 0x7de67c20 sp 0x7de67c00 T6)
#0 0x103433244 in __asan::asan_free(void*, 
__sanitizer::BufferedStackTrace*, __asan::AllocType) 
(libclang_rt.asan_osx_dynamic.dylib+0x3244)
#1 0x10347aeee in wrap_free (libclang_rt.asan_osx_dynamic.dylib+0x4aeee)
#2 0x102e6a5ed in glxClientCallback glxext.c:301
#3 0x102b672a3 in _CallCallbacks dixutils.c:737
#4 0x102b2f0c6 in CallCallbacks callback.h:83
#5 0x102b5c15a in NextAvailableClient dispatch.c:3562
#6 0x102d7060c in AllocNewConnection connection.c:777
#7 0x102d71355 in EstablishNewConnections connection.c:863
#8 0x102b662f0 in ProcessWorkQueue dixutils.c:523
#9 0x102d52a7f in WaitForSomething WaitFor.c:175
#10 0x102b204f6 in Dispatch dispatch.c:411
#11 0x102b61e01 in dix_main main.c:301
#12 0x10254c42a in server_thread quartzStartup.c:66
#13 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa)
#14 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6)
#15 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc)

Signed-off-by: Jeremy Huddleston Sequoia 
---
 glx/glxext.c | 21 -
 1 file changed, 21 deletions(-)

diff --git a/glx/glxext.c b/glx/glxext.c
index d595a05..d216c9d 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -319,23 +319,6 @@ GlxPushProvider(__GLXprovider * provider)
 __glXProviderStack = provider;
 }
 
-static Bool
-checkScreenVisuals(void)
-{
-int i, j;
-
-for (i = 0; i < screenInfo.numScreens; i++) {
-ScreenPtr screen = screenInfo.screens[i];
-for (j = 0; j < screen->numVisuals; j++) {
-if (screen->visuals[j].class == TrueColor ||
-screen->visuals[j].class == DirectColor)
-return True;
-}
-}
-
-return False;
-}
-
 static void
 GetGLXDrawableBytes(void *value, XID id, ResourceSizePtr size)
 {
@@ -371,10 +354,6 @@ GlxExtensionInit(void)
 *stack = &__glXDRISWRastProvider;
 }
 
-/* Mesa requires at least one True/DirectColor visual */
-if (!checkScreenVisuals())
-return;
-
 __glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
 "GLXContext");
 __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
-- 
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] Use pthread_setname_np to set thread names if available

2016-09-11 Thread Alan Coopersmith

On 09/10/16 10:30 PM, Keith Packard wrote:

Alan Coopersmith  writes:


Autoconf logic borrowed from glib


This seems kinda nice to me, but I'd like to know how many
configurations you've found to test this on?


As I said, I've only tested on Solaris myself.  Thanks to Jeremy for
testing on MacOS, hopefully others can test on Linux & the BSD's.

The similar code in glib has been in their git since April:
https://git.gnome.org/browse/glib/log/glib/gthread-posix.c

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
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

XLoadQueryFont() not returning with recent xserver master

2016-09-11 Thread Jeremy Huddleston Sequoia
Using current master plus the various patches I submitted to the list last 
night, I'm able to launch the server fairly reliably under ASan again, but some 
clients are getting wedged.  Most notably, xterm gets stuck waiting for a reply 
from XLoadQueryFont().  Looking at the state of the server threads, it looks 
fine.  It's processing other requests just fine from other clients.

Has anyone noticed anything odd like this or have some hunch as to where I 
might start looking other than to do yet another bisect? =/

  Thread 0x344e96   DispatchQueue 1   1000 samples (1-1000) 
priority 31 (base 31)
  1000  start + 52 (xterm + 6312) [0x10d3bf8a8]
1000  main + 3752 (xterm + 146228) [0x10d3e1b34]
  1000  spawnXTerm + 977 (xterm + 148776) [0x10d3e2528]
1000  VTInit + 22 (xterm + 68248) [0x10d3cea98]
  1000  XtRealizeWidget + 135 (libXt.6.dylib + 84572) [0x10d4ffa5c]
1000  RealizeWidget + 871 (libXt.6.dylib + 85805) [0x10d4fff2d]
  1000  RealizeWidget + 365 (libXt.6.dylib + 85299) [0x10d4ffd33]
1000  VTRealize + 324 (xterm + 82404) [0x10d3d21e4]
  1000  SetVTFont + 335 (xterm + 121728) [0x10d3dbb80]
1000  xtermLoadFont + 514 (xterm + 114081) [0x10d3d9da1]
  1000  xtermOpenFont + 86 (xterm + 112342) [0x10d3d96d6]
1000  XLoadQueryFont + 311 (libX11.6.dylib + 29419) 
[0x10d54f2eb]
  1000  _XQueryFont + 163 (libX11.6.dylib + 32127) 
[0x10d54fd7f]
1000  _XReply + 279 (libX11.6.dylib + 143484) 
[0x10d56b07c]
  1000  xcb_wait_for_reply + 103 (libxcb.1.dylib + 
8247) [0x10d711037]
1000  wait_for_reply + 251 (libxcb.1.dylib + 
8521) [0x10d711149]
  1000  _xcb_conn_wait + 466 (libxcb.1.dylib + 
4166) [0x10d710046]
1000  _xcb_in_read + 1051 (libxcb.1.dylib + 
12750) [0x10d7121ce]
  1000  __select + 10 
(libsystem_kernel.dylib + 106318) [0x7fffc5e2df4e]
   *1000  _sleep_continue + 0 
(kernel.development + 7459248) [0xff800091d1b0]




smime.p7s
Description: S/MIME cryptographic 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 font/adobe-utopia-75dpi] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index 20d60d2..a38bbdb 100644
--- Makefile.am
+++ Makefile.am
@@ -174,7 +174,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 all-local: $(BUILT_BDF_FILES) $(font_DATA)
 
 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
2.9.2

___
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 font/adobe-100dpi] Typo font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index 0e891ed..a070186 100644
--- Makefile.am
+++ Makefile.am
@@ -257,7 +257,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 all-local: $(BUILT_BDF_FILES) $(font_DATA)
 
 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
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 font/adobe-utopia-100dpi] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index 20d60d2..a38bbdb 100644
--- Makefile.am
+++ Makefile.am
@@ -174,7 +174,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 all-local: $(BUILT_BDF_FILES) $(font_DATA)
 
 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
2.9.2

___
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 font/adobe-utopia-type1] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index d5e6407..19bc82a 100644
--- Makefile.am
+++ Makefile.am
@@ -39,7 +39,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 install-data-hook:
@rm -f $(DESTDIR)$(fontdir)/fonts.scale
$(MKFONTSCALE) $(DESTDIR)$(fontdir)
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
2.9.2

___
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 font/adobe-75dpi] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index 0e891ed..a070186 100644
--- Makefile.am
+++ Makefile.am
@@ -257,7 +257,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 all-local: $(BUILT_BDF_FILES) $(font_DATA)
 
 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
2.9.2

___
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 font/arabic-misc] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index af56a62..b4c89d5 100644
--- Makefile.am
+++ Makefile.am
@@ -39,7 +39,7 @@ EXTRA_DIST = $(BDF_FILES) uniarab.txt
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
 
-- 
2.9.2

___
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 font/arabic-misc] Typo: font.dir -> fonts.dir

2016-09-11 Thread Alan Coopersmith

Reviewed-by: Alan Coopersmith 
for all the fonts with this typo.

-alan-

On 09/11/16 01:16 PM, Matthieu Herrb wrote:

On Sun, Sep 11, 2016 at 10:14:53PM +0200, Matthieu Herrb wrote:

I'm stopping here sending the mails, but you've got the idea:
all fonts Makefile.am share the same typo since the initial
conversion to the autotools build system...

ok?


Signed-off-by: Matthieu Herrb 
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git Makefile.am Makefile.am
index af56a62..b4c89d5 100644
--- Makefile.am
+++ Makefile.am
@@ -39,7 +39,7 @@ EXTRA_DIST = $(BDF_FILES) uniarab.txt
 MAINTAINERCLEANFILES = ChangeLog INSTALL

 install-data-hook:
-   @rm -f $(DESTDIR)$(fontdir)/font.dir
+   @rm -f $(DESTDIR)$(fontdir)/fonts.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@

--
2.9.2

___
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




--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
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 font/arabic-misc] Typo: font.dir -> fonts.dir

2016-09-11 Thread Matthieu Herrb
On Sun, Sep 11, 2016 at 10:14:53PM +0200, Matthieu Herrb wrote:

I'm stopping here sending the mails, but you've got the idea:
all fonts Makefile.am share the same typo since the initial
conversion to the autotools build system...

ok?

> Signed-off-by: Matthieu Herrb 
> ---
>  Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git Makefile.am Makefile.am
> index af56a62..b4c89d5 100644
> --- Makefile.am
> +++ Makefile.am
> @@ -39,7 +39,7 @@ EXTRA_DIST = $(BDF_FILES) uniarab.txt
>  MAINTAINERCLEANFILES = ChangeLog INSTALL
>  
>  install-data-hook:
> - @rm -f $(DESTDIR)$(fontdir)/font.dir
> + @rm -f $(DESTDIR)$(fontdir)/fonts.dir
>   $(MKFONTDIR) $(DESTDIR)$(fontdir)
>   @RUN_FCCACHE@
>  
> -- 
> 2.9.2
> 
> ___
> 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

-- 
Matthieu Herrb


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

Re: XLoadQueryFont() not returning with recent xserver master

2016-09-11 Thread Jeremy Huddleston Sequoia
Upon a bit more digging, it looks like the clients are listed in 
output_pending_clients, but it's not getting delivered.

This situation reveals another issue with a use-after-free during 
CloseDownClient() in which a client will get re-added to the 
output_pending_clients during FlushClient() as part of CloseDownConnection().

See https://bugs.freedesktop.org/show_bug.cgi?id=97770 for more details on that.

> On Sep 11, 2016, at 12:24, Jeremy Huddleston Sequoia  
> wrote:
> 
> Using current master plus the various patches I submitted to the list last 
> night, I'm able to launch the server fairly reliably under ASan again, but 
> some clients are getting wedged.  Most notably, xterm gets stuck waiting for 
> a reply from XLoadQueryFont().  Looking at the state of the server threads, 
> it looks fine.  It's processing other requests just fine from other clients.
> 
> Has anyone noticed anything odd like this or have some hunch as to where I 
> might start looking other than to do yet another bisect? =/
> 
>  Thread 0x344e96   DispatchQueue 1   1000 samples (1-1000)
>  priority 31 (base 31)
>  1000  start + 52 (xterm + 6312) [0x10d3bf8a8]
>1000  main + 3752 (xterm + 146228) [0x10d3e1b34]
>  1000  spawnXTerm + 977 (xterm + 148776) [0x10d3e2528]
>1000  VTInit + 22 (xterm + 68248) [0x10d3cea98]
>  1000  XtRealizeWidget + 135 (libXt.6.dylib + 84572) [0x10d4ffa5c]
>1000  RealizeWidget + 871 (libXt.6.dylib + 85805) [0x10d4fff2d]
>  1000  RealizeWidget + 365 (libXt.6.dylib + 85299) [0x10d4ffd33]
>1000  VTRealize + 324 (xterm + 82404) [0x10d3d21e4]
>  1000  SetVTFont + 335 (xterm + 121728) [0x10d3dbb80]
>1000  xtermLoadFont + 514 (xterm + 114081) [0x10d3d9da1]
>  1000  xtermOpenFont + 86 (xterm + 112342) [0x10d3d96d6]
>1000  XLoadQueryFont + 311 (libX11.6.dylib + 29419) 
> [0x10d54f2eb]
>  1000  _XQueryFont + 163 (libX11.6.dylib + 32127) 
> [0x10d54fd7f]
>1000  _XReply + 279 (libX11.6.dylib + 143484) 
> [0x10d56b07c]
>  1000  xcb_wait_for_reply + 103 (libxcb.1.dylib + 
> 8247) [0x10d711037]
>1000  wait_for_reply + 251 (libxcb.1.dylib + 
> 8521) [0x10d711149]
>  1000  _xcb_conn_wait + 466 (libxcb.1.dylib + 
> 4166) [0x10d710046]
>1000  _xcb_in_read + 1051 (libxcb.1.dylib 
> + 12750) [0x10d7121ce]
>  1000  __select + 10 
> (libsystem_kernel.dylib + 106318) [0x7fffc5e2df4e]
>   *1000  _sleep_continue + 0 
> (kernel.development + 7459248) [0xff800091d1b0]
> 
> 



smime.p7s
Description: S/MIME cryptographic 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/3] Xext/shm: Better support cases where O_CLOEXEC is not defined

2016-09-11 Thread Jeremy Huddleston Sequoia
Signed-off-by: Jeremy Huddleston Sequoia 
---
 Xext/shm.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Xext/shm.c b/Xext/shm.c
index 125000f..7a45dbd 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1202,7 +1202,11 @@ shm_tmpfile(void)
int flags;
chartemplate[] = SHMDIR "/shmfd-XX";
 #ifdef O_TMPFILE
-   fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666);
+   flags = O_TMPFILE|O_RDWR|O_EXCL;
+#ifdef O_CLOEXEC
+   flags |= O_CLOEXEC;
+#endif
+   fd = open(SHMDIR, flags, 0666);
if (fd >= 0) {
ErrorF ("Using O_TMPFILE\n");
return fd;
-- 
2.10.0 (Apple Git-99)

___
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/3] Xext/shm: Fix usage of F_GETFD to match standard

2016-09-11 Thread Jeremy Huddleston Sequoia
flags = fcntl(fd, F_GETFD) is compliant.

fcntl(fd, F_GETFD, &flags) is non-compliant (Linux extension?)

cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
Signed-off-by: Jeremy Huddleston Sequoia 
---
 Xext/shm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Xext/shm.c b/Xext/shm.c
index 0557538..125000f 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1213,7 +1213,8 @@ shm_tmpfile(void)
if (fd < 0)
return -1;
unlink(template);
-   if (fcntl(fd, F_GETFD, &flags) >= 0) {
+   flags = fcntl(fd, F_GETFD);
+   if (flags != -1) {
flags |= FD_CLOEXEC;
(void) fcntl(fd, F_SETFD, &flags);
}
-- 
2.10.0 (Apple Git-99)

___
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 3/3] os/inputthread: Fix setting of cloexec on file descriptors

2016-09-11 Thread Jeremy Huddleston Sequoia
O_CLOEXEC is not a file bit.  It is not setable with F_SETFL.  One must use it
when calling open(2).  To set it cloexec on an existing fd, F_SETFD and
FD_CLOEXEC must be used.

This also fixes a build failure regression on configurations that don't have
O_CLOEXEC defined.

cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
Regressed-in: 30ac7567980a1eb79d084a63e0e74e1d9a3af673
Signed-off-by: Jeremy Huddleston Sequoia 
---
 os/inputthread.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/os/inputthread.c b/os/inputthread.c
index 2ea39e7..6aa0a9c 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -385,6 +385,7 @@ void
 InputThreadPreInit(void)
 {
 int fds[2], hotplugPipe[2];
+int flags;
 
 if (!InputThreadEnable)
 return;
@@ -408,13 +409,23 @@ InputThreadPreInit(void)
  * in parallel.
  */
 inputThreadInfo->readPipe = fds[0];
-fcntl(inputThreadInfo->readPipe, F_SETFL, O_NONBLOCK | O_CLOEXEC);
+fcntl(inputThreadInfo->readPipe, F_SETFL, O_NONBLOCK);
+flags = fcntl(inputThreadInfo->readPipe, F_GETFD);
+if (flags != -1) {
+flags |= FD_CLOEXEC;
+(void)fcntl(inputThreadInfo->readPipe, F_SETFD, &flags);
+}
 SetNotifyFd(inputThreadInfo->readPipe, InputThreadNotifyPipe, 
X_NOTIFY_READ, NULL);
 
 inputThreadInfo->writePipe = fds[1];
 
 hotplugPipeRead = hotplugPipe[0];
-fcntl(hotplugPipeRead, F_SETFL, O_NONBLOCK | O_CLOEXEC);
+fcntl(hotplugPipeRead, F_SETFL, O_NONBLOCK);
+flags = fcntl(hotplugPipeRead, F_GETFD);
+if (flags != -1) {
+flags |= FD_CLOEXEC;
+(void)fcntl(hotplugPipeRead, F_SETFD, &flags);
+}
 hotplugPipeWrite = hotplugPipe[1];
 
 #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
-- 
2.10.0 (Apple Git-99)

___
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 12/12] xwayland: Add pointer warp emulator

2016-09-11 Thread Peter Hutterer
On Thu, Sep 08, 2016 at 06:46:41PM +0800, Jonas Ådahl wrote:
> Emulate pointer warps by locking the pointer and sending relative
> motion events instead of absolute. X will keep track of the "fake"
> pointer cursor position given the relative motion events, and the
> client warping the cursor will warp the faked cursor position.
> 
> Various requirements need to be met for the pointer warp emulator to
> enable:
> 
> The cursor must be invisible: since it would not be acceptable that a
> fake cursor position would be different from the visual representation
> of the cursor, emulation can only be done when there is no visual
> representation done by the Wayland compositor. Thus, for the emulator
> to enable, the cursor must be hidden, and would the cursor be displayed
> while the emulator is active, the emulator would be destroyed.
> 
> The window that is warped within must be likely to have pointer focus.
> For example, warping outside of the window region will be ignored.
> 
> The pointer warp emulator will disable itself once the fake cursor
> position leaves the window region, or the cursor is made visible.
> 
> This makes various games depending on pointer warping (such as 3D
> first-person shooters and stategy games using click-to-drag-map like
> things) work.
> 
> Signed-off-by: Jonas Ådahl 
> ---
>  hw/xwayland/xwayland-cursor.c |   7 ++
>  hw/xwayland/xwayland-input.c  | 267 
> +-
>  hw/xwayland/xwayland.c|  27 +
>  hw/xwayland/xwayland.h|  17 +++
>  4 files changed, 317 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
> index 7d14a3d..20ddf6e 100644
> --- a/hw/xwayland/xwayland-cursor.c
> +++ b/hw/xwayland/xwayland-cursor.c
> @@ -168,12 +168,19 @@ xwl_set_cursor(DeviceIntPtr device,
> ScreenPtr screen, CursorPtr cursor, int x, int y)
>  {
>  struct xwl_seat *xwl_seat;
> +Bool cursor_visibility_changed;
>  
>  xwl_seat = device->public.devicePrivate;
>  if (xwl_seat == NULL)
>  return;
>  
> +cursor_visibility_changed = !!xwl_seat->x_cursor ^ !!cursor;
> +
>  xwl_seat->x_cursor = cursor;
> +
> +if (cursor_visibility_changed)
> +xwl_seat_cursor_visibility_changed(xwl_seat);
> +
>  xwl_seat_set_cursor(xwl_seat);
>  }
>  
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index d73448a..aa67a00 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -47,6 +47,21 @@ struct sync_pending {
>  };
>  
>  static void
> +xwl_pointer_warp_emulator_handle_motion(struct xwl_pointer_warp_emulator 
> *warp_emulator,
> +double dx,
> +double dy,
> +double dx_unaccel,
> +double dy_unaccel);
> +static void
> +xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator 
> *warp_emulator,
> + struct xwl_window *xwl_window,
> + SpritePtr sprite,
> + int x, int y);
> +
> +static void
> +xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat);
> +
> +static void
>  xwl_pointer_control(DeviceIntPtr device, PtrCtrl *ctrl)
>  {
>  /* Nothing to do, dix handles all settings */
> @@ -320,6 +335,12 @@ pointer_handle_enter(void *data, struct wl_pointer 
> *pointer,
>  xwl_seat->cursor_frame_cb = NULL;
>  xwl_seat_set_cursor(xwl_seat);
>  }
> +
> +if (xwl_seat->pointer_warp_emulator) {
> +xwl_pointer_warp_emulator_maybe_lock(xwl_seat->pointer_warp_emulator,
> + xwl_seat->focus_window,
> + NULL, 0, 0);
> +}
>  }
>  
>  static void
> @@ -340,8 +361,22 @@ dispatch_pointer_motion_event(struct xwl_seat *xwl_seat)
>  {
>  ValuatorMask mask;
>  
> -if (xwl_seat->pending_pointer_event.has_absolute ||
> +if (xwl_seat->pointer_warp_emulator &&
>  xwl_seat->pending_pointer_event.has_relative) {
> +double dx;
> +double dy;
> +double dx_unaccel;
> +double dy_unaccel;
> +
> +dx = xwl_seat->pending_pointer_event.dx;
> +dy = xwl_seat->pending_pointer_event.dy;
> +dx_unaccel = xwl_seat->pending_pointer_event.dx_unaccel;
> +dy_unaccel = xwl_seat->pending_pointer_event.dy_unaccel;
> +
> xwl_pointer_warp_emulator_handle_motion(xwl_seat->pointer_warp_emulator,
> +dx, dy,
> +dx_unaccel, dy_unaccel);
> +} else if (xwl_seat->pending_pointer_event.has_absolute ||
> +   xwl_seat->pending_pointer_event.has_relative) {
>  int x;
>  int y;
>  
> @@ -1236,6 +1271,233 @@ xwl_seat_clear_touch(struct xwl_seat