Commit Graph

112 Commits

Author SHA1 Message Date
Adam Jackson
89a9927b1e include: Remove now-empty site.h 2019-10-30 16:17:04 +00:00
Adam Jackson
3c78d63755 global: Remove BUILD_DATE and BUILD_TIME
All this does is make reproducible builds impossible.
2019-08-15 16:38:22 +00:00
Jon Turney
b4ed20c4f1 Promote file containing date & time build was configured to top-level
Promote the generated file containing the date & time build was
configured to top-level.

Rename it from xf86Build.h to buildDateTIme.h.

Use it as well in XQuartz, stringize BUILD_DATE when needed.
2019-05-02 15:42:58 +00:00
Jon Turney
f013979507 xquartz: Add stub ddxInputThread()
Omitted from 4ad21c32
2019-04-28 22:38:51 +00:00
Adam Jackson
a23eba2a91 dix: Merge AbortDDX into ddxGiveUp
These are so close to identical that most DDXes implement one in terms
of the other. All the relevant cases can be distinguished by the error
code, so merge the functions together to make things simpler.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:12 -04:00
Adam Jackson
d78ac2f159 mi: Factor out miSaveScreen
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:01 -04:00
Adam Jackson
d8ec33fe05 glx: Use vnd layer for dispatch (v4)
The big change here is MakeCurrent and context tag tracking. We now
delegate context tags entirely to the vnd layer, and simply store a
pointer to the context state as the tag data. If a context is deleted
while it's current, we allocate a fake ID for the context and move the
context state there, so the tag data still points to a real context. As
a result we can stop trying so hard to detach the client from contexts
at disconnect time and just let resource destruction handle it.

Since vnd handles all the MakeCurrent protocol now, our request handlers
for it can just be return BadImplementation. We also remove a bunch of
LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already
allocated its tracking resource on that XID.

v2: Update to match v2 of the vnd import, and remove more redundant work
like request length checks.

v3: Add/remove the XID map from the vendor private thunk, not the
backend. (Kyle Brenneman)

v4: Fix deletion of ghost contexts (Kyle Brenneman)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:44 -05:00
Daniel Martin
d5379b350f Use ARRAY_SIZE all over the tree
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-30 13:45:20 -04:00
Jeremy Huddleston Sequoia
81493d3098 XQuartz: Remove X11ApplicationFatalError
AppKit handles crashes on app launch with their own dialog now, so we shouldn't need to do this ourselves.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:02 -07:00
Jeremy Huddleston Sequoia
7def2fea30 Xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice
Regressed-in: be5a513fee
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-13 10:00:51 -07:00
Peter Hutterer
732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Jeremy Huddleston Sequoia
ad0ff649c6 XQuartz: Dead code removal (ENABLE_DEBUG_LOG)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:19 -07:00
Jeremy Huddleston Sequoia
ba4bb3bc1b XQuartz: Don't add the 15bit visual any more
Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18 01:37:27 -08: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
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
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
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
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
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
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
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
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
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
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
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
f25ca898c5 XQuartz: Mark functions _X_NORETURN
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
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
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
e466745109 XQuartz: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-25 18:57:04 -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
Keith Packard
a095a6d4e8 Merge remote-tracking branch 'airlied/pwin-cleanup' 2011-03-27 20:06:29 -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
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
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
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
0fb7a5c261 input: Purge Register*Device() functions.
RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to
RegisterOtherDevice() and obsolete.

RegisterOtherDevice() was called for all devices and the two assignments can
simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and
pretend it never happened.

*lalalalala*

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:47 +10:00
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the
devPrivates infrastructure. This will permit a new devPrivates
implementation to be layed into the server without requiring
simultaneous changes in every devPrivates user.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05 19:23:03 -07:00
Keith Packard
2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Jamey Sharp
a83cff9f4d Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the
corresponding screen pointer handy, which meant they usually looked like
"dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix declared the dixScreenOrigins array, I figure allocating a
screen private for these values is overkill.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Jamey Sharp
e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.

X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13 00:22:37 +07:00