Commit Graph

1002 Commits

Author SHA1 Message Date
Keith Packard
4dd5989d15 Merge remote-tracking branch 'ajax/server-1.14-abi-churn' 2012-09-24 11:43:01 -07:00
Keith Packard
7722bcbab2 Merge remote-tracking branch 'jeremyhu/master' 2012-09-23 16:04:13 -07:00
Daniel Martin
76d8739b1f dix: Remove #includes of mibstore.h
Remove more backing store leftovers.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:31:27 -07:00
Jeremy Huddleston Sequoia
f54987de97 XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-09-22 14:09:58 -07:00
Jeremy Huddleston Sequoia
25d26875bc XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2
<rdar://problem/12338921>
http://bugs.winehq.org/show_bug.cgi?id=31751

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-09-22 14:09:58 -07:00
Adam Jackson
ff8e3ad807 dix: Pull client-is-local flag up to the ClientRec
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20 14:36:39 -04:00
Jeremy Huddleston Sequoia
486038fe16 XQuartz: Bump Info.plist version to 2.7.4
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-27 22:35:51 -07:00
Jeremy Huddleston Sequoia
ac616d8ed5 XQuartz: Use asl_log_descriptor for children as well
This change is #if'd out due to a bug in asl_log_descriptor, but
it is left here as reference to be enabled in the future.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
ad123071e5 XQuartz: Use asl_log_descriptor on Mountain Lion
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
7c3d2e4828 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
We forgot to multiply by sizeof(), so it wasn't fully zeroed out.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
a32e01802f XQuartz: console_redirect: Set the correct location for reading into the buffer
Prior to this change, it was possible that a large message would have some
of its data prepended to subsequent messages due to our not incorrectly
setting the location to write into the buffer.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 18:32:50 -07:00
Jeremy Huddleston
99b94af1ff XQuartz: Fix build regression for GlxExtensionInit
quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue]
    {GlxExtensionInit, "GLX", &noGlxExtension},

Regression-from: aad428b8e2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-08-15 10:28:16 -07:00
Jeremy Huddleston Sequoia
884f51e977 XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-03 10:02:57 -07:00
Jeremy Huddleston Sequoia
b4c2358e0a pbproxy: Fix a warning about a bad method prototype
x-selection.m:1502:1: warning: method has no return type specified; defaults to 'id'
      [-Wmissing-method-return-type,Semantic Issue]
- init
^
  (id)
1 warning generated.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:45:43 -07:00
Jon TURNEY
f193907f1b Fix pseudoramiX.c compilation without darwin.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:29:55 -07:00
Jon TURNEY
067931ccce hw/xquartz: Various fixes for pseudoramiX.c
Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c:
 Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize

These fixes seem to be necessary in order to compile pseudoramiX.c with gcc

pseudoramiX.c: In function 'ProcPseudoramiXGetState':
pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount':
pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize':
pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:29:38 -07:00
Jeremy Huddleston
fd228d3184 XQuartz: Call xp_window_bring_all_to_front if available in libXplugin
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-25 12:19:01 -07:00
Jeremy Huddleston
3b7f313b3d XQuartz: Fix runtime regressions introduced by extension loading changes
* GLX is now loaded
 * PseudoramiX loading is back in miinitext.  It needs to be loaded
   before RandR.

Regression-from: 27a624bee6
Regression-from: 5f5bbbe543

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-24 00:32:30 -07:00
Jeremy Huddleston
0d64e881a3 XQuartz: Build fix for __GLXscreen::createContext changes
Regression-from: 96d74138b1

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-23 23:17:17 -07:00
Jeremy Huddleston
1720cd9bad XQuartz: Re-add prototype for DRIExtensionInit
Regression from: a1d41e311c

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
CC: Daniel Stone <daniel@fooishbar.org>
2012-07-11 23:54:27 -07:00
Jeremy Huddleston
1a64d3cc9c XQuartz: Fix build failure due to incorrect PseudoramiXExtensionInit prototype
pseudoramiX.c:129:1: error: conflicting types for 'PseudoramiXExtensionInit' [Semantic Issue]
PseudoramiXExtensionInit(int argc, char *argv[])
^
../../include/extinit.h:175:13: note: previous declaration is here
extern void PseudoramiXExtensionInit(void);
            ^

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-11 23:49:59 -07:00
Jeremy Huddleston
228f8bfe81 XQuartz: Silence an unused-variable warning
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-11 23:49:33 -07:00
Daniel Stone
6636244186 Remove last renmants of XFree86LOADER define
Not to be confused with XFree86Loader or XorgLoader.  Which are both now
dead too.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:02 -07:00
Daniel Stone
27a624bee6 Quartz: Move PseudoramiX initialisation to DDX
As PseudoramiX is a DDX-specific extension, move its loading and
initialisation to hw/xquartz.  This creates a QuartzExtensionInit()
similar in spirit to xf86ExtensionInit.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:02 -07:00
Daniel Stone
a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Alan Coopersmith
789d64e19a Remove unneccesary casts from WriteToClient calls
Casting return to (void) was used to tell lint that you intended
to ignore the return value, so it didn't warn you about it.

Casting the third argument to (char *) was used as the most generic
pointer type in the days before compilers supported C89 (void *)
(except for a couple places it's used for byte-sized pointer math).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:12:56 -07:00
Dave Airlie
1f0e8bd5eb api: rework the X server driver API to avoid global arrays.
This is a squash merge containing all the API changes, as
well as the video ABI bump.

Its been squashed to make bisection easier.

Full patch log below:

commit b202738bbf0c5a1c1172767119c2c71f1e7f8070
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon May 14 15:16:11 2012 -0700

    xfree86: Bump video ABI to 13.0

    The ABI was broken by changes to convert from screen index numbers to ScreenPtr
    / ScrnInfoPtr in various structures and function signatures.

    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 10:56:57 2012 +0100

    xf86: xf86ClearEntityListForScreen should take a pScrn

    When adding GPU screens this make life easier.

    (also fix comment, as pointed out by Alan)

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit afee8b5ab4501597ecc1ade34124d7ca227ab055
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 07:07:32 2012 +0100

    xf86i2c: add pscrn for drivers to use

    This just adds a pScrn pointer into the struct for the drivers to use
    instead of scrnIndex. Mostly scrnIndex is used for logging, but some
    drivers use it to lookup xf86Screens, so let them stash a pScrn instead.

    Removing the scrnIndex is a bit more involved and I'm not sure its worth
    the effort. Doing i2c in the X server is legacy code as far as I'm concerned.

    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit ea5092f1f679691d187f1eee9427e6057beec56e
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 19:25:20 2012 +0100

    dix/gc: consolidate GC object creation in one place

    The standard GC create and scratch GC create were 90% the same really,
    and I have a need in the future for creating GC objects without the
    other bits, so wanted to avoid a third copy.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 10:24:06 2012 +0100

    xf86: add a define to denote the new non-index interfaces are being used

    This can be used by drivers to provide compatible APIs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 15:09:12 2012 +0100

    dix: make Create/Free scratch pixmaps take a ScreenPtr

    While technically an API/ABI change I doubt anyone uses it,
    but it helps in splitting screens up.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:57:55 2012 +0100

    xf86/xv: remove scrnIndexfrom xf86FindXvOptions.

    Move this interface to taking an ScrnInfoPtr.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:53:59 2012 +0100

    xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2)

    stop passing indices into this function.

    v2: drop flags argument.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 58824e414f35682435f15bfe6c4b656bd90b9235
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:48:09 2012 +0100

    xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI)

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:18:59 2012 +0100

    xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2)

    Instead of passing an index, pass the actual ScreenPtr. This allows
    more moving towards not abusing xf86Screens + screenInfo.

    v2: drop the blockData/wakeupData args as per ajax's suggestion.,
    fix docs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 790d003de20fb47674420a24dadd92412d78620d
Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Apr 11 09:53:14 2012 +0100

    xf86/common: remove some more pScrn->pScreen uses

    remove some more conversions that appeared after api cleanups.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:34:53 2012 +0100

    ddc: change API to take ScrnInfoPtr (v2)

    This removes all xf86Screens usage from ddc code,
    it modifies the API for some functions to avoid taking indices.

    v2: address Alan's comments about dropping DDC2Init parameter.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit fe3f57b6eaf6860a33876a54f9439f69578f03a5
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:31:26 2012 +0100

    vbe: don't use index for VBEInterpretPanelID (API)

    Remove use of xf86screens from vbe module.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit abf1965f4ed91529036d3fdb470d6a3ce6f29675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:25:11 2012 +0100

    int10/vbe: don't use xf86Screens. (ABI) (v3)

    Pass the ScrnInfoPtr instead of the index in the int10 struct.

    This saves us using it to dereference xf86Screens.

    v2: address Alan's comment to fix struct alignment.

    v3: squash in all the int10 fixes, test the vm86 code builds,
    after comments by Keith.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 23cca612b4fb5efc33683c7624b803b457387e3d
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:30:18 2012 +0100

    xserver: drop index argument to ScreenInit (ABI/API) (v2)

    This drops the index argument, its the same as pScreen->myNum,
    and its the last major index abuse I can find.

    v2: address Alan's review - update docs, fix xwin/xnest/darwin

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:23:01 2012 +0100

    xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API)

    This migrates PointerMoved from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:20:46 2012 +0100

    xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API)

    This migrates the PMEvent from index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:18:30 2012 +0100

    xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API)

    This migrates the SetDGAMode callback from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit baf5e4818a74f2b68c3dfdcc56f54322351039a0
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:14:11 2012 +0100

    xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2)

    This migrates the ChangeGamma interface to avoid passing a index.

    v2: fix xf86RandR12.c + xf86cmap.c call

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 51e5f90ada929d6b23176090badbb42fdb3fa550
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:11:09 2012 +0100

    xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API)

    The EXA interface migrates to ScreenPtr,
    and the xf86 interface migrated to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 94f1f21d17e86f96d4a54292a399160950087675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:02:11 2012 +0100

    xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API)

    This migrates the ValidMode to passing a ScrnInfoPtr instead
    of an index.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3f8f18198fed4f39ec805b508a3482e91eea26b2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:59:46 2012 +0100

    xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2)

    This migrate the SwitchMode interface to take a ScrnInfoPtr
    instead of an index.

    v2: drop flags.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d06a038a5c49328ab3a8d969d24f9fcd22c63202
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:50:37 2012 +0100

    xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2)

    This converts AdjustFrame code paths to passing a ScrnInfoPtr
    instead of an integer index.

    v2: drop flags args.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:41:27 2012 +0100

    xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2)

    Another index->pScrn conversion.

    v2: drop flags arg.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:35:41 2012 +0100

    xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2)

    This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr
    instead of an index into xf86Screens. This allows dropping more
    public dereferences of the xf86Screens and screenInfo.

    v2: drop flags args as suggested by Keith, fix docs.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 06729dbbc804a20242e6499f446acb5d94023c3c
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:04:59 2012 +0100

    xserver: remove index from CloseScreen (API/ABI breakage)

    This drops the index from the CloseScreen callback,
    its always been useless really, since the pScreen contains it.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 13:22:18 +01:00
Jeremy Huddleston
acdc4f54ee XQuartz: Avoid a race in initialization of darwinPointer
http://xquartz.macosforge.org/trac/ticket/579

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:32:06 -07:00
Jeremy Huddleston
f5fc533411 XQuartz: Provide fls implementation for Tiger
Regression-from: 30623d6ff7
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Jeremy Huddleston
e0097ce971 XQuartz: Tiger build fix
http://trac.macports.org/ticket/34364

Regression-from: 662d41acdd

Reported-by: Peter Dyballa <Peter_Dyballa@Freenet.DE>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Jeremy Huddleston
4acbaa3027 XQuartz: Workaround an SDK bug on Leopard/x86_64
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Jeremy Huddleston
93d6ba5b71 XQuartz: Make sure we tell startx the correct server binary to use in our fallback path
With multiple servers installed, we can't be certain if X is Xorg or Xquartz

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-26 21:25:38 -07:00
Jeremy Huddleston
e34519e525 XQuartz: darwinPointer now sends both absolute and relative motion
This should hopefully help out wine clients that were continuing to
have issues after the earlier changes.

http://xquartz.macosforge.org/trac/ticket/548

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:42 -07:00
Jeremy Huddleston
662d41acdd XQuartz: Add a hack to better handle clicky wheel scroll mice
We loose information from AppKit being in our way.  Before adopting
smooth scrolling, we always rounded-up the number of scroll button
clicks per NSEvent.  Now, the scroll value is accumulated in the
dix, and clicky scroll wheels with legacy X11 clients are seeing
an accumulation of error due to so many translations (button press
to smooth scrolling value in AppKit, passed to the dix, and then
synthesized into a button press).  This attempts to make the
situation better.

http://xquartz.macosforge.org/trac/ticket/562

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Jeremy Huddleston
eda85290ae XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Jeremy Huddleston
b99586c908 XQuartz: Separate out tablet and mouse event delivery into separate functions
This should have no immediate impact aside from fake mouse buttons no longer
working with tablets (where they aren't needed or desired anyways).  This
prepares us for future changes.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Jeremy Huddleston
30623d6ff7 XQuartz: Correct calculation of the size of our file descriptor array in console_redirect
Reported-by: Joe Rohde <joer@valvesoftware.com>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Jeremy Huddleston
b4c4c65a35 XQuartz: Fix a deadlock in pre-dispatch code
The fact that this has been in place so long makes me really wonder if
anybody cares about this running in Tiger or Leopard.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-23 20:20:41 -07:00
Jeremy Huddleston
e9d3848d7b XQuartz: Automatically start our virtual tablet devices
Fixes: https://bugs.launchpad.net/inkscape/+bug/972914
Regression introduced by: 7790dc8638

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-05 14:03:35 -07:00
Jeremy Huddleston
6cb83b78c4 XQuartz: Tiger build fix
Fixes: https://trac.macports.org/ticket/33818

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-30 14:42:11 -07:00
Jeremy Huddleston
31646d8fa9 XQuartz: Use scrolling valuators
This lets use send more accurate data to Xi clients and uses dix
for legacy scroll buttons rather than reinventing the wheel.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-26 10:23:10 -07:00
Jeremy Huddleston
7790dc8638 XQuartz: Use AllocDevicePair to allocate our keyboard and mouse at the same time
Also correct isMaster to FALSE while we're here.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-26 10:23:07 -07:00
Jeremy Huddleston
74fb534bf1 XQuartz: Call update_desktop_dimensions() after updating our screen coordinates
Fixes: http://xquartz.macosforge.org/trac/ticket/555
Regression from: 8bebb4b489

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-26 10:22:55 -07:00
Jeremy Huddleston
41a46546e9 XQuartz: Formatting cleanup for sendX11NSEvent
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-25 23:35:06 -07:00
Jeremy Huddleston
5324557c7b XQuartz: Source formatting cleanup
indent butchered Objective-C formatting.  This patch was created by:

1) Reverting the indent changes in hw/xquartz
2) Editing X11Application.m and chaning some #ifdef logic to work
   with uncrustify
3) Hand edited some (c) notifications
4) Opened all XQuartz sources in XCode and re-indented (^I)
5) Ran uncrustify with this configuration
   (as close to the indent rules as I could get):

tok_split_gte=false
utf8_byte=true
utf8_force=true
indent_cmt_with_tabs=false
indent_align_string=false
indent_braces=false
indent_braces_no_func=false
indent_braces_no_class=false
indent_braces_no_struct=false
indent_brace_parent=false
indent_namespace=false
indent_extern=false
indent_class=false
indent_class_colon=false
indent_else_if=false
indent_var_def_cont=false
indent_func_call_param=false
indent_func_def_param=false
indent_func_proto_param=false
indent_func_class_param=false
indent_func_ctor_var_param=false
indent_template_param=false
indent_func_param_double=false
indent_relative_single_line_comments=false
indent_col1_comment=false
indent_access_spec_body=false
indent_paren_nl=false
indent_comma_paren=false
indent_bool_paren=false
indent_first_bool_expr=false
indent_square_nl=false
indent_preserve_sql=false
indent_align_assign=true
sp_balance_nested_parens=false
align_keep_tabs=false
align_with_tabs=false
align_on_tabstop=false
align_number_left=false
align_func_params=false
align_same_func_call_params=false
align_var_def_colon=true
align_var_def_attribute=true
align_var_def_inline=true
align_right_cmt_mix=false
align_on_operator=false
align_mix_var_proto=false
align_single_line_func=false
align_single_line_brace=false
align_nl_cont=false
align_left_shift=true
align_oc_decl_colon=true
nl_collapse_empty_body=true
nl_assign_leave_one_liners=true
nl_class_leave_one_liners=true
nl_enum_leave_one_liners=true
nl_getset_leave_one_liners=true
nl_func_leave_one_liners=true
nl_if_leave_one_liners=true
nl_multi_line_cond=false
nl_multi_line_define=false
nl_before_case=true
nl_after_case=true
nl_after_return=false
nl_after_semicolon=true
nl_after_brace_open=true
nl_after_brace_open_cmt=false
nl_after_vbrace_open=false
nl_after_vbrace_open_empty=false
nl_after_brace_close=false
nl_after_vbrace_close=false
nl_define_macro=false
nl_squeeze_ifdef=false
nl_ds_struct_enum_cmt=false
nl_ds_struct_enum_close_brace=false
nl_create_if_one_liner=false
nl_create_for_one_liner=false
nl_create_while_one_liner=false
ls_for_split_full=false
ls_func_split_full=false
nl_after_multiline_comment=false
eat_blanks_after_open_brace=false
eat_blanks_before_close_brace=false
mod_full_brace_if_chain=false
mod_pawn_semicolon=false
mod_full_paren_if_bool=false
mod_remove_extra_semicolon=false
mod_sort_import=false
mod_sort_using=false
mod_sort_include=false
mod_move_case_break=false
mod_remove_empty_return=false
cmt_indent_multi=true
cmt_c_group=false
cmt_c_nl_start=false
cmt_c_nl_end=false
cmt_cpp_group=false
cmt_cpp_nl_start=false
cmt_cpp_nl_end=false
cmt_cpp_to_c=false
cmt_star_cont=false
cmt_multi_check_last=true
cmt_insert_before_preproc=false
pp_indent_at_level=false
pp_region_indent_code=false
pp_if_indent_code=false
pp_define_at_level=false
indent_columns=4
indent_brace=0
indent_switch_case=0
align_struct_init_span=2
align_pp_define_gap=0
align_pp_define_span=2
align_oc_msg_colon_span=16
nl_end_of_file_min=1
nl_func_var_def_blk=0
code_width=78
nl_max=2
newlines=auto
indent_with_tabs=0
sp_arith=force
sp_assign=force
sp_assign_default=force
sp_before_assign=force
sp_after_assign=force
sp_enum_assign=force
sp_enum_before_assign=force
sp_enum_after_assign=force
sp_pp_stringify=add
sp_bool=force
sp_compare=force
sp_inside_paren=remove
sp_paren_paren=remove
sp_paren_brace=force
sp_before_ptr_star=ignore
sp_before_unnamed_ptr_star=force
sp_before_byref=force
sp_before_unnamed_byref=force
sp_after_byref=remove
sp_after_type=force
sp_before_sparen=force
sp_inside_sparen=remove
sp_inside_sparen_close=remove
sp_after_sparen=force
sp_sparen_brace=force
sp_special_semi=force
sp_before_semi=remove
sp_after_semi=force
sp_after_semi_for=force
sp_after_semi_for_empty=remove
sp_before_square=remove
sp_inside_square=remove
sp_after_comma=force
sp_before_comma=remove
sp_paren_comma=force
sp_before_ellipsis=force
sp_after_class_colon=force
sp_before_class_colon=force
sp_before_case_colon=remove
sp_after_cast=remove
sp_inside_paren_cast=remove
sp_sizeof_paren=remove
sp_inside_braces_enum=force
sp_inside_braces_struct=force
sp_inside_braces=force
sp_inside_braces_empty=remove
sp_func_proto_paren=remove
sp_func_def_paren=remove
sp_inside_fparens=remove
sp_inside_fparen=remove
sp_square_fparen=remove
sp_fparen_brace=force
sp_func_call_paren=remove
sp_func_call_paren_empty=remove
sp_return_paren=force
sp_attribute_paren=remove
sp_defined_paren=remove
sp_macro=force
sp_macro_func=force
sp_else_brace=force
sp_brace_else=force
sp_brace_typedef=force
sp_not=remove
sp_inv=remove
nl_start_of_file=remove
nl_end_of_file=force
nl_assign_square=remove
nl_after_square_assign=remove
nl_fcall_brace=remove
nl_enum_brace=remove
nl_struct_brace=remove
nl_union_brace=remove
nl_if_brace=remove
nl_brace_else=force
nl_elseif_brace=remove
nl_else_brace=remove
nl_else_if=remove
nl_for_brace=remove
nl_do_brace=remove
nl_brace_while=remove
nl_switch_brace=remove
nl_case_colon_brace=force
nl_func_type_name=force
nl_func_type_name_class=force
nl_func_proto_type_name=force
nl_func_paren=remove
nl_func_def_paren=remove
nl_func_decl_start=remove
nl_func_def_start=remove
nl_func_decl_args=remove
nl_func_decl_end=remove
nl_func_def_end=remove
nl_func_decl_end_single=remove
nl_func_def_end_single=remove
nl_func_decl_empty=remove
nl_func_def_empty=remove
nl_fdef_brace=force
nl_return_expr=remove
nl_before_if=ignore
nl_after_if=ignore
nl_before_for=ignore
nl_after_for=ignore
nl_before_while=ignore
nl_after_while=ignore
nl_before_switch=ignore
nl_after_switch=ignore
nl_before_do=ignore
nl_after_do=ignore
pp_space=remove

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:06 -07:00
Jeremy Huddleston
3505e1faad XQuartz: Detect FatalErrors on startup to prevent tight crash loops
If a FatalError occurs before the server finishes launching, it will
not have drained the launchd-owned DISPLAY socket, so launchd will
just relaunch it.  This can cause the server to crash in a tight loop
which will spam the user with CrashReporter windows that claim focus on
appearance.

This allows users stuck in this loop to "deal" with the problem without
popping up a crash report every 10 seconds.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:05 -07:00
Jeremy Huddleston
a818b30598 os: Pass the FatalError message to OsVendorFatalError
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-03-24 01:07:05 -07:00
Jeremy Huddleston
0bb8a2566d XQuartz: Add a defaults option to disable the RENDER extension
RENDER has some ugly issues on XQuartz, so add an option to disable RENDER.

Enables workaround for: https://bugs.freedesktop.org/show_bug.cgi?id=26124

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:05 -07:00
Jeremy Huddleston
5ff46d651a XQuartz: Use doubles for input valuators
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:05 -07:00
Jeremy Huddleston
cd84c0949a XQuartz: Xi: darwinPointer is now Relative
There is really no real reason why this should be necessary, but wine
developers are stuborn, so doing this to try to work around this wine
issue:

http://bugs.winehq.org/show_bug.cgi?id=29732

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:05 -07:00
Jeremy Huddleston
87939bf831 XQuartz: Move our logs into an X11 subdirectory
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-24 01:07:04 -07:00
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Jeremy Huddleston
cb6a32da27 XQuartz: Short-circuit activateX:
This also avoids a deadlock when calling activateX: before the server
thread has initialized

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22 21:15:10 -08:00
Jeremy Huddleston
1562c4a1ca XQuartz: Actually install the new locales
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-22 21:15:09 -08:00
Jeremy Huddleston
d53235af85 XQuartz: Build fix for possible conflict of BOOL type
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-02-13 23:06:07 -08:00
Jeremy Huddleston
85cecd9811 XQuartz: Release all buttons and keys when deactivating
http://xquartz.macosforge.org/trac/ticket/486

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-30 14:23:08 -08:00
Jeremy Huddleston
47b457541b XQuartz: Toggle off fullscreen mode when XQuartz is hidden
http://xquartz.macosforge.org/trac/ticket/478

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Jeremy Huddleston
c2ba3f339f XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-29 14:27:09 -08:00
Jeremy Huddleston
bafedb7e9b XQuartz: Bump bundle version to 2.7.2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01-27 21:33:50 -08:00
Keith Packard
d9eeede52f Revert "dix: Pull client-is-local flag up to the ClientRec"
This reverts commit 49d38b75c8.

ABI change pended for 1.13
2012-01-12 12:09:59 -08:00
Keith Packard
0b113f7cdf Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' 2012-01-09 13:07:25 -08:00
Jeremy Huddleston
a97252db24 XQuartz: GL: Buildfix for recent GLX changes
dispatch.h was leftover from an earlier implementation and is no longer
needed, so remove it since including it causes a build failure due to
conflicts between GL/gl.h and OpenGL/gl.h

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-08 23:23:14 -08:00
Adam Jackson
49d38b75c8 dix: Pull client-is-local flag up to the ClientRec
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-01-06 13:29:53 -05:00
Jeremy Huddleston
511beddffa XQuartz: Provide in-tree implementation of strndup(3) if needed
This function was added to Mac OS X 10.7, so we need to provide it
for earlier releases.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-19 21:43:29 -08:00
Alan Coopersmith
6e6d732bac Convert strncpy/strncat to strlcpy/strlcat
As long as we're carrying around a compatibility copy in os/strl*.c,
might as well use them.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:05 -08:00
Jeremy Huddleston
dc054fefc5 XQuartz: appledri: Correct byte swapping in event notifications
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-26 00:42:19 -07:00
Jeremy Huddleston
d5fee2b638 XQuartz: applewm: Correct byte swapping in event notifications
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-26 00:42:04 -07:00
Jeremy Huddleston
fb55f8f790 XQuartz: Fix the filename of our log file
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-24 16:45:36 -07:00
Jeremy Huddleston
1c8bda798b XQuartz: appledri: Allow byte swapped requests
Even though it's only valid when local, it is possible for a local
client and the server to not match endianness, such as when running
a ppc application under Rosetta.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21 10:34:36 -07:00
Jeremy Huddleston
14205ade0c XQuartz: appledri: Fix byte swapping in replies
Even though it's only valid when local, it is possible for a local
client and the server to not match endianness, such as when running
a ppc application under Rosetta.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21 10:29:56 -07:00
Jeremy Huddleston
2ba0ac202a XQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmap
http://xquartz.macosforge.org/trac/ticket/508

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21 10:29:56 -07:00
Jeremy Huddleston
e4f257748b XQuartz: appledri: Change whitespace in appledristr.h to match mesa
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-21 10:29:56 -07:00
Jeremy Huddleston
fae7ed62ad XQuartz: pbproxy: Add missing AM_OBJCFLAGS
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-04 21:40:41 -07:00
Jeremy Huddleston
38e9e28ba2 XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-09-28 13:31:48 -07:00
Matt Turner
2c7c520cfe Use internal temp variable for swap macros
Also, fix whitespace, mainly around
	swaps(&rep.sequenceNumber)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Pelle Johansson
ac2c307f47 XQuartz: Initialize darwin pointer valuators
This fixes a regression introduced by: 633b81e8ba

http://xquartz.macosforge.org/trac/ticket/498

Signed-off-by: Pelle Johansson <pelle@morth.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-08-14 17:47:02 -07:00
Julien Cristau
e87adcc9e0 Xquartz: include new localization files in the tarball
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-31 16:45:55 -07:00
Jeremy Huddleston
a1bb5062c7 XQuartz: xpr: Don't FatalError if xp_unlock_window fails
We added the FatalError in 5d1d9d9ae3 but
it caused a regression http://xquartz.macosforge.org/trac/ticket/482

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-31 16:44:56 -07:00
Jeremy Huddleston
c319f7b5b3 XQuartz: Use CFSTR to avoid implicit cast warning of NSString * to CFStringRef
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-31 16:44:55 -07:00
Keith Packard
b8f61c11c9 Merge remote-tracking branch 'whot/for-keith' 2011-07-29 14:58:58 -07:00
Peter Hutterer
f51e42f583 Terminate the log with one last message.
Instead of just closing the log when everything is done, put one more
message in stating that we're actually terminating. Users or scripts that
look at the Xorg.log will then know that a) the server has terminated
properly and b) why the server terminated (to some degree, given that most
real-world errors will be caused by AbortServer()).

Acked-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-27 09:31:02 +10:00
Jeremy Huddleston
73864a87aa XQuartz: Localization updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-19 20:04:17 -07:00
Jeremy Huddleston
d2463df84d XQuartz: Add english NIB changes for scroll_in_device_direction
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-19 20:04:17 -07:00
Jeremy Huddleston
e36e7ad631 XQuartz: Add GUI controls to toggle scroll_in_device_direction
Also cleaned up the wording for fullscreen_menu.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-19 20:01:11 -07:00
Jeremy Huddleston
ac43984215 XQuartz: Add a scroll_in_device_direction preference
This preference allows users to override the related option in Mac OS X's
Mouse/Trackpad preferences.  This effectively lets the user determine
which "context" all of X11 fits into for context-based scrolling until
such API exists within X11 itself to pass along to X11 clients.

This is applicable to Mav OS X 10.7+

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-19 20:00:27 -07:00
George Staplin
ec95a9c829 XQuartz: Add diagnostic error checking to xp_destroy_surface.
This occurred to me in hindsight after the last commit.  If the
original developer had done this, we would have noticed the
problem sooner.
(cherry picked from commit aa0a57996f)
2011-07-19 19:49:48 -07:00
George Staplin
4fe7df2653 XQuartz: Fix a memory leak with surfaces that a new test found.
xp_destroy_surface was called with a surface id of 0, due to some
premature cleanup that set it to 0.  This means the surfaces
weren't being destroyed until the window was.

The code that did that was: pDRIDrawablePriv->sid = 0;

In long running applications this leak may or may not have been
harmful.  With the old libGL the surfaces weren't destroyed until
the context was destroyed or a new context created.  In the new
libGL they are reference counted, and released much sooner, so we
ran into a resource leak more noticeably with some tests.

Make the Apple DRI code dispatch events to the client(s) for
destroyed surfaces, when a resource is destroyed.  This seems to
work in my tests, however this clearly wasn't working for a while,
so bugs may result in the future if it enables some new (unexpected)
side effects.

Also add a few helpful comments to aid in understanding the code
in the future.

Tested with the test suite, Pymol, and various Mesa demos.
(cherry picked from commit bede83eb19)
2011-07-19 19:49:47 -07:00
Jeremy Huddleston
0ebe45a717 XQuartz: DRI: Dead code removal
Also add some comments that weren't merged in from server-1.4-apple's
99babae132

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-19 19:49:45 -07:00
Jeremy Huddleston
88ad050f3c XQuartz: Add some sanity checking and a fallback for the bundle id.
This way we'll print an error and still mostly work rather than crashing if
someone installs XQuartz.app incorrectly or tries running the server within
the build system rather than the installed system.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-18 22:54:21 -07:00
Jeremy Huddleston
89bfa0c633 XQuartz: DarwinEQFini doesn't return Bool
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-15 10:40:12 -07:00
Jon TURNEY
42bc198775 glx: Remove a few lingering traces of __GLXscreen.GLXVersion
The GLXversion member of the __GLXscreen struct
is just cruft since commit ad5c0d9efa,
when we started returning the minimum GLX version supported by all
of the screens on the display, rather than the maximum version supported
by the server.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2011-07-07 18:09:21 +01:00
Keith Packard
d4096abb59 Merge remote-tracking branch 'whot/for-keith' 2011-07-01 15:45:45 -07:00
Peter Hutterer
87d4f90bfc input: free the EQ allocated memory on shutdown (#38634)
mieqFini() already does the right thing, but it needs to be called by the
various DDXs and the XTest Extension.

X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-01 08:46:28 +10:00
Jeremy Huddleston
bea57392c7 XQuartz: Fix Makefile dependencies
automake generates _DEPENDENCIES from _LIBADD, but it strips out variables.
This resulted in not relinking if some components were rebuilt (like
libdix, libos, etc).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-28 13:07:20 -07:00
Jeremy Huddleston
c8b80a82d9 XQuartz: Make a call to activateIgnoringOtherApps in our NSApplicationActivatedEventType handler
In addition, this change will not call into the X11 activation unless an X11
window was active when we deactivated.  We can't rely on the event and current
key windows because the key window will be nil until activated, and the event
will only reference the window if the window was clicked (whereas it will be
nil if we activated via dock or cmd-tab).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-28 13:07:19 -07:00
Jeremy Huddleston
778309fd0e XQuartz: GLX: Fix a -Wformat-security compilation warning
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 14:00:52 -07:00
Jeremy Huddleston
34e2598f0a XQuartz: GLX: Use _glapi_create_table_from_handle to create out dispatch table
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 14:00:52 -07:00
Jeremy Huddleston
c3df4df407 XQuartz: Add missing include for <pthread.h>
BuildFix for Leopard and earlier.

https://trac.macports.org/ticket/29717

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-15 08:17:26 -07:00
Jeremy Huddleston
feab04397d XQuartz: AIGLX: Remove unnecessary includes in indirect.c
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Jeremy Huddleston
3fa5d27e46 XQuartz: AIGLX: Setup dispatch table based on runtime capabilities rather than buildtime
This will allow XQuartz built on older systems to pickup capabilities on
newer systems and prevent runtime failures when building on newer systems and
running on older ones.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Jeremy Huddleston
dd5d91fc95 XQuartz: Remove explicit link against libGL
This was indented to force a link against OpenGL.framework's libGL, but it
actually resulted in linking against mesa's libGL due to the ordering of -L

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-03 16:01:18 -04:00
Jeremy Huddleston
48b4b778f6 XQuartz: xpbproxy: Correct NSUInteger format strings
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:57:52 -07:00
Jeremy Huddleston
971193b275 XQuartz: ASL: Use xpbproxy subsystem for logging xpbproxy messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:57:52 -07:00
Jeremy Huddleston
7dfd65705c XQuartz: ASL: Use GLXAqua subsystem for logging GLXAqua messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:18:47 -07:00
Jeremy Huddleston
19020b23ef XQuartz: ASL: Use xpr subsystem for logging xpr messages
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:18:44 -07:00
Jeremy Huddleston
a66400f8db XQuartz: ASL: Update logging to support differnet levels and subsystems
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 21:07:56 -07:00
Jeremy Huddleston
c0077b41b4 XQuartz: Add a semicolon after DEBUG_LOG
Don't rely on the macro to provide it

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 20:56:18 -07:00
Jeremy Huddleston
fbc8aae8e9 XQuartz: Move -lXplugin to LDFLAGS from LDADD
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-01 20:41:11 -07:00
Jeremy Huddleston
38df706c6b XQuartz: GLX: Create a new dispatch table rather than modifying the existing one
Fixes regression introduced by b0c665ac0f

0   X11.bin                       	0x0000000100118293 __glXAquaScreenCreateContext + 684
1   X11.bin                       	0x00000001001315b0 DoCreateContext + 163
2   X11.bin                       	0x000000010013509f __glXDispatch + 211
3   X11.bin                       	0x00000001000c7dad Dispatch + 785
4   X11.bin                       	0x00000001000b97e5 dix_main + 1022
5   X11.bin                       	0x00000001000122bc server_thread + 50
6   libSystem.B.dylib             	0x00007fff836554f6 _pthread_start + 331
7   libSystem.B.dylib             	0x00007fff836553a9 thread_start + 13

http://lists.apple.com/archives/X11-users/2011/May/msg00045.html

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-06-01 20:41:11 -07:00
Jeremy Huddleston
1fb501ad15 XQuartz: Don't crash if CG increases our display resolution
miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was
sized for the old resolution.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
60af79e35e XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays
If CG reports no displays when launching, we could crash in RandR.  Instead, just
provide a fake 800x600 display until we are notified about displays being attached.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
f25ca898c5 XQuartz: Mark functions _X_NORETURN
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
7413886d65 XQuartz: Silence clang warnings about shadow declarations
X11Application.m:1272:26: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
                xp_error e;
                         ^
X11Application.m:1098:36: note: previous declaration is here
- (void) sendX11NSEvent:(NSEvent *)e {
                                   ^
1 warning generated.

bundle-main.c:648:36: warning: declaration shadows a local variable [-Wshadow,Semantic Issue]
                    int max_files, i;
                                   ^
bundle-main.c:594:9: note: previous declaration is here
    int i;
        ^
1 warning generated.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
96ac4e61f4 XQuartz: Update DEBUG_LOG to report to ASL
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-22 11:17:59 -07:00
Jeremy Huddleston
384eb45b94 XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:27 -07:00
Jeremy Huddleston
25191648b8 XQuartz: Don't call mieqEnqueue during server shutdown
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:27 -07:00
Jeremy Huddleston
fd5f630bc4 XQuartz: Fix an array-index-out-of-bounds crasher
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-14 19:15:26 -07:00
Keith Packard
ba5540221f Merge remote-tracking branch 'whot/for-keith' 2011-05-13 13:59:36 -07:00
Jeremy Huddleston
f144fb771f XQuartz: Don't circumvent NDEBUG
If someone wants to turn off asserts with NDEBUG, let them.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-13 09:10:42 -07:00
Jeremy Huddleston
f46835a096 XQuartz: Redirect stdout/stderr to asl
In order to improve logging in XQuartz, stdout and stderr should be redirected
to asl (syslog).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 20:19:40 -07:00
Jeremy Huddleston
5bc05d96f8 XQuartz: Add a LOGGING section to our man page
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 19:28:32 -07:00
Jeremy Huddleston
c18b7165f9 XQuartz: stub: Log directly to ASL rather than stdout/stderr
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 19:28:32 -07:00
Jeremy Huddleston
d694601591 Fix a typo: laucnd instead of launchd
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-12 18:31:14 -07:00
Jeremy Huddleston
c89a6f824e XQuartz: Don't call into CoreFoundation after fork() and before exec()
After fork()ing, we should just limit ourselves to setting up
the environment, file descriptors, and exec()ing.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-10 23:55:19 -07:00
Peter Hutterer
20fb07f436 input: remove DDX event list handling
The current approach to event posting required the DDX to request the event
list (allocated by the DIX) and then pass that list into QueuePointerEvent
and friends.

Remove this step and use the DIX event list directly. This means that
QueuePointerEvent is not reentrant but it wasn't before anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer
8670c46bdf input: replace EventListPtr with InternalEvent array
EventListPtr is a relic from pre-1.6, when we had protocol events in the
event queue and thus events of varying size.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:36 +10:00
Peter Hutterer
e7150db535 input: Provide Queue{Button|Keyboard|Proximity}Event helpers
Don't require every caller to use GPE + mieqEnqueue, provide matching
Queue...Event functions instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-11 14:27:33 +10:00
Jeremy Huddleston
3ac220d6cc XQuartz: prefs_copy_url and prefs_get_copy return retained objects
No functional change.  This just annotates the return policy.

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-03 10:54:09 -07:00
Jeremy Huddleston
bac8d12555 XQuartz: Ensure that {CF,NS}_RETURNS{,_NOT}_RETAINED are defined
These will be used in subsequent patches to denote proper retain counts in XQuartz

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-03 10:39:31 -07:00
Jeremy Huddleston
0fc7ec6dd5 XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4
Ok, this time for sure... how many brown bags can I fit over my face?

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-29 11:06:18 -07:00
Jeremy Huddleston
29d471663e XQuartz: Use a rwlock instead of a mutex to protect window_hash in the pthread case
Concurrent reads are acceptable, so using an rwlock should be better.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-29 11:04:42 -07:00
Jeremy Huddleston
0f284f0f42 XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4
This fixes a regression introduced by d79cc14a51

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-27 22:12:59 -07:00
Jeremy Huddleston
6f29dbf5e3 XQuartz: Use ErrorF rather than fprintf to log errors
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 22:00:41 -07:00
Jeremy Huddleston
cb083b05c4 XQuartz: stub: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 21:25:10 -07:00
Emanuele Giaquinta
72ed7551f4 XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4
http://xquartz.macosforge.org/trac/ticket/476

Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
0a60192a85 XQuartz: Enable logging to a file for better debugging
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
de4023f194 XQuartz: Rename launchd-id-prefix to bundle-id-prefix
It's used many other places than just for launchd.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
e466745109 XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -07:00
Jeremy Huddleston
f1d867c0a1 XQuartz: Silence clang static analyzer
Call to 'malloc' has an allocation size of 0 bytes.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
913223e9dd XQuartz: xpr: Dead code removal
Assigned value is always the same as the existing value.

Found by clang static analyzer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
d0caa0e4cd XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
9244a3a24f XQuartz: xpr: Use a serial queue rather than pthread mutexes for window_hash
Additionally removes some dead code and fixes double-locking in
xprIsX11Window.  xprIsX11Window doesn't need to do any locking because
those resources are protected by the called functions themselves.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel A. Steffen <dsteffen@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
bac34a54f7 XQuartz: xpr: Initialize window_hash in xprInit
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:03 -07:00
Jeremy Huddleston
1596ea72d6 XQuartz: Use a lighter spinlock instead of a pthread_mutex_t in QuartzScreenSaver
Currently, we only end up here through a call to QuartzShowFullscreen, and
this is always on the same thread.  Future changes (such as further
incorporating libdispatch) may allow this to change, but contention will
remain minimal since the call is infrequent and it is short held.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel A. Steffen <dsteffen@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
3e253c603b XQuartz: Remove the threadSafety dead-ish code
It's been a few years now since we've needed this to debug thread
boundaries, so punt it out to clean up the namespace polution.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
a52c8078c9 XQuartz: Use xorg_backtrace() instead of spewCallStack()
xorg_backtrace() has been in os for two years now, we might as well
start using it.

Ref: 94ed0ba1b5

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
d79cc14a51 XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4
xprAppleWM.c:143: warning: initialization from incompatible pointer type
xprAppleWM.c:144: warning: initialization from incompatible pointer type

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00
Jeremy Huddleston
6128544fd5 XQuartz: Bump bundle version to 2.7.0
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:02 -07:00
Nicolas Kaiser
c270cfc30c hw/xquartz: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-24 19:46:07 -07:00
Keith Packard
918a9c99cf Merge remote-tracking branch 'jeremyhu/master' 2011-04-22 11:20:16 -07:00
Jeremy Huddleston
5f496bc919 XQuartz: Do translation and handoff of NSEvent to X11 in a separate serial queue
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-22 02:20:59 -07:00
Jeremy Huddleston
72bd232b11 XQuartz: Send tablet proximity events with tilt and pressure
<rdar://problem/6257569>

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-22 01:24:44 -07:00
Jeremy Huddleston
034538ea9b XQuartz: Use dispatch_async to handoff the FD
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-21 23:56:18 -07:00
Jeremy Huddleston
3960115dbc XQuartz: Fix prototypes for thread functions
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-21 23:56:18 -07:00
Jeremy Huddleston
7524dbd061 XQuartz: Make the DarwinProcessFDAdditionQueue_thread wait 3 seconds to allow xinitrc to catch up
Previously, we weren't always waiting the full three seconds.  This should
be better, but is still sub-optimal.  We really want to start processing
these once a WM has been started.

http://xquartz.macosforge.org/trac/ticket/416

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-21 23:56:18 -07:00
Peter Hutterer
071a6ac4d0 input: remove GetKeyboardValuatorEvents, this is now unnecessary.
GetKeyboardValuatorEvents handles NULL valuator masks already, so the
GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-18 13:05:46 +10:00
Adam Jackson
c327d07cc6 glx: Remove ->forceCurrent from the context vtable
All the implementations of makeCurrent and forceCurrent are identical,
so just use makeCurrent everywhere.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28 12:46:38 -04:00
Adam Jackson
b0c665ac0f glx: Remove noop dispatch table
We can never hit this, because the indirect GLX dispatch code always
forces a current context and checks that it's non-NULL before calling
into the dispatch table.  If it's _not_ null, then _glapi_set_context
will call into the driver, which is responsible for calling
_glapi_set_dispatch to make sure the dispatch table is non-NULL.

Also remove _glapi_set_warning_func and friends, since we can no longer
call them even from dead code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28 12:46:38 -04:00
Keith Packard
a095a6d4e8 Merge remote-tracking branch 'airlied/pwin-cleanup' 2011-03-27 20:06:29 -07:00
Keith Packard
a22486f848 Merge remote-tracking branch 'whot/for-keith' 2011-03-27 18:27:10 -07:00
Dave Airlie
eb9266c717 consolidate SetRootClip (v2)
each DDX has its own copy, I've taken the darwin one,
though I'm not sure why it needs the pOldClip piece that nobody
else has and the commit msg is like an "Updates from magic land"
type message.

This removes the main uses of pWin->winSize from the DDXen.

v2: drop old clip like ajax suggests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-03-28 10:06:32 +10:00
Simon Thum
633b81e8ba xserver: remove AbsoluteClassRec keeping the ABI
This removes the struct, but keeps InitAbsoluteClassDeviceStruct as
a no-op and preserves related struct layout.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-24 09:52:51 +10:00
Simon Thum
9eaecb1bfe xquartz: simplify ChangeDeviceControl
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-24 09:52:12 +10:00
Jeremy Huddleston
cb5d4b416a XQuartz: applewm: Don't check if requested window level is < 0 because it is unsigned (-Wtautological-compare)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-23 12:10:15 -07:00
Jeremy Huddleston
c116e32dc2 XQuartz: Put ifdef guards around have_depth label (-Wunused-label)
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-23 12:07:36 -07:00
Jeremy Huddleston
1a583f7940 XQuartz: Properly comment extra tokens (-Wextra-tokens) after endif
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-23 12:05:05 -07:00
Jeremy Huddleston
69a9171dbb XQuartz: pbproxy: Protect against possible collision between Cocoa and X11 Cursor types
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-01 20:02:46 -08:00
Jeremy Huddleston
0343aed1f0 XQuartz: Don't use deprecated CoreGraphics API on SL and Lion
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 16:19:50 -08:00
Jeremy Huddleston
8cf3348e90 XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configs
We now support using RandR to set the resolution of the primary display (and
place a shielding window on other displays) in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 15:46:22 -08:00
Jeremy Huddleston
968652983f XQuartz: RandR: Provide an alert box when entering a RandR mode for the first time.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 15:46:22 -08:00
Jeremy Huddleston
13578b852b XQuartz: RandR: Capture the display when switching modes with RandR
This will prevent native windows from resizing as we change resolutions.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-27 15:46:22 -08:00
Jeremy Huddleston
b17fc99cb9 XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-24 19:24:35 -08:00
Jeremy Huddleston
59850630fe XQuartz: Add LSApplicationCategoryType key to Info.plist
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-02-24 19:18:35 -08:00
Jeremy Huddleston
8c1f75a1d4 XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-28 21:13:38 -08:00
Jeremy Huddleston
effaf9459c XQuartz: Use the default signal handler
This allows better interaction with CrashTracer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-23 22:39:44 -08:00
Jeremy Huddleston
418bb57a39 XQuartz: Call RRScreenSizeNotify after handling externally-generated XP_EVENT_DISPLAY_CHANGED
We get an XP_EVENT_DISPLAY_CHANGED event when our display configuration is
changed.  If this change was caused by hotplugging a monitor or Mac Display
Preferences changes by the user, we need to call RRScreenSizeNotify in order
to ensure new connections get the correct screen size.

http://xquartz.macosforge.org/trac/ticket/460

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-23 22:39:14 -08:00
Jeremy Huddleston
6f52b10b9e XQuartz: Bump version string to 2.6.1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-23 22:38:47 -08:00
Jeremy Huddleston
1cfb96dd61 XQuartz: Update copyright dates in bundle's plist
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-23 22:38:46 -08:00
Gaetan Nadon
65ceaadbf0 Xquartz: rename man page directory from doc to man
Following the convention makes it easier to locate man pages,
user's or developer's documentation and specifications.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:11:18 -08:00
Gaetan Nadon
885a333009 man: refactor common code in the man pages makefiles
Create a manpages.am makefile snippet in the root dir.
Each man page makefile includes manpages.am.

Now all man pages in xserver are generated the same way
using the same method as all of other xorg modules.
All ".man.pre" files in git are ".man" now.
Links are no longer created between different file types.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:11:10 -08:00
Gaetan Nadon
57ca20d266 Xquartz: strip the man page code from cpprules.in
This is dead code which will not be used in the future.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:10:13 -08:00
Gaetan Nadon
c06c46acdc Xquartz: build Xquartz man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor
Using standard file extensions (.man)
Use standard directory and makefile

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:10:08 -08:00
Jeremy Huddleston
f641e4b34a XQuartz GL: Add $(GL_CFLAGS) to CFLAGS
This fixes a build failure I found on tinderbox.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 22:58:12 -08:00
Jeremy Huddleston
883039e07b XQuartz: Just NSBeep() for XBell()
The CoreAudio path uses deprecated API and has reported crashes that
aren't worth fixing (4e8bf12b13 fixed
one and introduced another).  NSBeep() does the job just fine.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-08 13:57:19 -08:00
Jeremy Huddleston
714b68d9e5 XQuartz: RandR: Fix mode changing for multi-monitor configurations.
This just fixes the regression whereby we couldn't switch between the legacy
fullscreen mode and rootless on multi-monitor configurations.  This was
happening because ref wasn't being set in these cases (since we don't ever
actually change CG modes), so we failed a CFEqual.  Setting the references
fixes this regression and places us one step closer to more mode RandR
mode switching in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 17:30:53 -08:00
Jeremy Huddleston
14f00449eb XQuartz: Cleanup some compiler warnings
Mark __crashreporter_info__ as __attribute__((__used__))

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:45 -08:00
Jeremy Huddleston
14aec8b82a XQuartz: Remove one more backing store leftover
See: c4c4676e68

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:46:44 -08:00
Jeremy Huddleston
ca431371a2 XQuartz: Disable the Mac OS X screensaver when in full screen mode
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-12-03 16:23:04 -08:00
Adam Jackson
c4c4676e68 dix: Remove the backing store leftovers
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:08 -05:00
Adam Jackson
a80780a763 glx: Remove swap barrier and hyperpipe support
Never implemented in any open source driver.  The implementation
assumed explicit DDX driver knowledge of how the client-side driver
worked, since at the time the server's GL renderer was not a DRI driver.
But now, it is, so any implementation of these should be done with
additional DRI driver API, like the swap control extension.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 12:54:47 -05:00
Jeremy Huddleston
e074f745a8 XQuartz: Remove unused CloseInputDevice stub
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-24 01:47:16 -05:00
Jeremy Huddleston
97b9bb1e2c XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:44:11 -08:00
Jeremy Huddleston
f9fbafa1a0 XQuartz: Remove existing localization files on install to avoid conflicts
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:44:11 -08:00
Jeremy Huddleston
6eed13ad59 XQuartz dri: Don't check CoreGraphics version
The version check is hackish, and I highly doubt anyone using this code is on
a version of OS X that predates this support (10.2 has support for it).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 20:27:23 -08:00
Jeremy Huddleston
a4698754c1 XQuartz: Add pointer debugging
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-22 19:14:51 -08:00
Jeremy Huddleston
c5975722a9 XQuartz: Fix make distcheck
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2010-11-14 10:25:58 -08:00
Jeremy Huddleston
965e709f2b XQuartz: Build-fixes for XQuartz for recent input API changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-12 11:49:49 +10:00
Chase Douglas
65c0fc81eb Add support for per-axis valuator modes (Relative/Absolute)
The XI2 protocol supports per-axis modes, but the server so far does
not. This change adds support in the server.

A complication is the fact that XI1 does not support per-axis modes.
The solution provided here is to set a per-device mode that defines the
mode of at least the first two valuators (X and Y). Note that initializing
the first two axes to a different mode than the device mode will fail.

For XI1 events, any axes following the first two that have the same mode
will be sent to clients, up to the first axis that has a different mode.
Thus, if a device has relative, then absolute, then relative mode axes,
only the first block of relative axes will be sent over XI1.

Since the XI2 protocol supports per-axis modes, all axes are sent to the
client.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 13:37:57 +10:00
Peter Hutterer
675f4a8525 Abstract valuator masks through a set of APIs.
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.

The new calls for drivers are:
    valuator_mask_new()     /* to allocate a valuator mask */
    valuator_mask_zero()    /* to reset a mask to zero */
    valuator_mask_set()     /* to set a valuator value */

The new interface to the server is
    xf86PostMotionEventM()
    xf86PostButtonEventM()
    xf86PostKeyboardEventM()
    xf86PostProximityEventM()

all taking a mask instead of the valuator array.

The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.

For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.

This patch was initially written by Chase Douglas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:48 +10:00
Peter Hutterer
eaf0b6a4d8 Merge branch 'master' into input-api
Conflicts:
	config/udev.c
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86Module.h
	hw/xfree86/common/xf86Xinput.h
	hw/xfree86/os-support/linux/lnx_init.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-15 13:46:59 +10:00