Commit Graph

102 Commits

Author SHA1 Message Date
Peter Hutterer
c0b0a9bce9 dix: add dtrace probes to input API
For driver debugging, it is helpful to know whether the driver has actually
submitted an event to the server. dtrace hooks can help here.

Note that GetPointerEvents and friends may also be triggered by the server
for other emulated devices, some care must be taken when analysing the
results.

Additional difficulty: proximity events have a run-time assigned type, so
this may make automatic detection a tad harder. If in doubt, go for any
event > 64 since the only two that can have that value are ProximityIn and
ProximityOut.

An example systemtap script is below:

  # Compile+run with
  #       stap -g xorg.stp /usr/bin/Xorg
  #

  function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{
          int i;
          unsigned char *mask = (unsigned char*)THIS->mask_in;
          double *valuators = (double*)THIS->valuators_in;
          char str[128] = {0};
          char *s = str;

  #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7)))

          s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators);
          for (i = 0; i < THIS->nvaluators; i++)
          {
                  s += sprintf(s, "	%d: ", i);
                  if (BitIsSet(mask, i))
                      s += sprintf(s, "%d", (int)valuators[i]);
          }

          sprintf(THIS->__retvalue, "%s", str);
  %}

  probe process(@1).mark("input__event")
  {
      deviceid = $arg1
      type = $arg2
      detail = $arg3
      flags = $arg4
      nvaluators = $arg5

      str = print_valuators(nvaluators, $arg6, $arg7)
      printf("Event: device %d type %d detail %d flags %#x %s\n",
              deviceid, type, detail, flags, str);
  }

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-22 11:33:42 +10:00
Alan Coopersmith
05f589d464 Fix gcc -Wwrite-strings warnings in various extensions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:07 -08:00
Gaetan Nadon
922c1d8170 docs: spell "X Server Version" consistently in titles. Add where missing.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-21 10:34:23 -08:00
Jeremy Huddleston
09dbfcb0ad os: Remove Error()
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-11 21:23:46 -07:00
Gaetan Nadon
466e4b3f17 Xserver-spec: use appropriate copyright markup
Use docbook copyright markup for year and holder.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-03 12:19:58 -07:00
Gaetan Nadon
62940bf38f Xserver-spec: re-order markup to follow outpout order
No content change, no layout/ordering change.
It is easier to find <title> at the top.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-03 12:19:56 -07:00
Gaetan Nadon
365bc2f5b1 Xserver-spec: add release information
It has been added in all docs (X Version 11, Release 7.6)

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-03 12:19:54 -07:00
Gaetan Nadon
2f09f6e3f6 Xinput: use appropriate copyright markup for a multi licensed doc
Removed a duplicate paragraph.

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-03 12:02:42 -07:00
Gaetan Nadon
597348e969 Xinput: replace hard coded X11 version with X server version
Which is more useful.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-03 12:02:32 -07:00
Gaetan Nadon
46d5ae5b55 dtrace: fix typo in title
The word provider should be capitalized.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-23 16:46:22 -07:00
Gaetan Nadon
6cae622499 dtrace: use docbook copyright markup for copyright holder
No content change to copyright text.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-23 16:46:22 -07:00
Alan Coopersmith
58d3d46d6c Assign ids to more tags in Xserver-Dtrace.xml
Keeps xsltproc from adding random-number id tags to html output so that
it's easier to see real changes vs. different random numbers.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Dew <marcoz@osource.org>
2011-09-22 15:42:23 -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
Gaetan Nadon
acf2173b32 Install xml versions of specs even if HAVE_XMLTO is false
DocBook/XML input source is also a useful output format that can be viewed
with an XML viewer or editor and by some O/S help system.

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-20 08:41:52 +10:00
Gaetan Nadon
0e7f61d72c doc: use devbook.am for developers documentation
Relocate the docs under the doc subdir.
Remove redundant xml subdir.
The xmlrules set of makefiles are no longer used.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-14 11:22:29 -07:00
Gaetan Nadon
96c65be39b doc: relocate xserver.ent in the package root directory
This is the appropriate location for reusable configuration and/or
makefile artifacts as opposed to picking one of the subdirs where
it is used.

It shields them from future doc reorg as every subdir
will refer to the root package which never changes location.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-14 11:22:26 -07:00
Gaetan Nadon
dbe26634e4 doc: add external doc references support to Xserver-DTrace
This makefile is used to build the 60+ docbooks in xorg.
Dtrace is a user document and should be located under doc subdir.

This user document can now refer to external user/specs docs
or can be referred to by such documnets.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-14 11:22:17 -07:00
Gaetan Nadon
221507e3bf man: relocate manual pages in the man subdir outside doc
The convention is to have the manual pages in a man subdir
which is not under a doc dir. The doc dir contains users docs.
This will move man pages out of the way for upcoming DocBook patches.

Reviewed-by Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-13 14:08:17 -07:00
Alan Coopersmith
c6029246dd Move Xinput server API documentation from libXi to doc/xml
Documentation is quite out of date but still fits better here than
in the client library.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by:  Peter Hutterer <peter.hutterer@who-t.net>
2011-05-01 10:19:35 -07: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
Ville Syrjälä
0998574699 Call SourceValidate even if src == dst
The extra SourceValidate calls from damageCopyArea and damageCopyPlane
can be removed.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:56:42 -08:00
Ville Syrjälä
e41e907b3c Add subWindowMode parameter to SourceValidate
Pass the subWindowMode from the GC/source Picture to SourceValidate.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:56:28 -08:00
Gaetan Nadon
79870dbf72 config: build Xserver man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor
Using standard file exentions (.man) means no need for .gitignore
Use standard directory and makefile
Fix man page whitespace issues

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Dew <matt@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-06 19:30:19 -08:00
Alan Coopersmith
92cde0b84c Xserver-spec: Update discussion of font library
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:27 -08:00
Alan Coopersmith
c1e7692500 Xserver-spec: Update location of log functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:16 -08:00
Alan Coopersmith
deae18f3ca Xserver-spec: Fix assorted typos
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:12 -08:00
Alan Coopersmith
a410bf5379 Xserver-spec: Update lists of macros
LOOKUP_DRAWABLE & VERIFY_GC are no longer in dix.h, but
WriteReplyToClient & WriteSwappedDataToClient are.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:08 -08:00
Alan Coopersmith
de518c8f37 Xserver-spec: Remove CreateCallbackList
The function is defined as a static, so can't be called by anyone
but AddCallback.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:17:03 -08:00
Alan Coopersmith
f6c880b257 Xserver-spec: Replace deprecated resource id lookup functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:16:57 -08:00
Alan Coopersmith
922806a5aa Xserver-spec: Update Memory Management functions
Xalloc, Xrealloc, & Xfree are deprecated now
ALLOCATE_LOCAL is removed due to stack overflow issues

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-30 16:16:14 -08:00
Alan Coopersmith
903e0f6f0f Xserver-spec: Delete DBE Idioms section
The code has been gone for a while

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30 13:17:24 -08:00
Gaetan Nadon
7250f078c1 doc: refactor Makefile and xmlrules.in code for reusability
A different approach which requires less variables setting
and internal knowledge of the reused code.
Changing from "install" to "not install" is very easy now.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:35 -08:00
Gaetan Nadon
f33512b70c xmlrules.in: use $(top_srcdir) rather than ../../../ [...]
Relative paths don't always work in distcheck when srcdir not = builddir
include $(top_srcdir)/doc/xml/xmlrules.in

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:25 -08:00
Gaetan Nadon
c25b407f22 xmlrules.in: specify the xserver entities depedencies on the target
The generated docs will rebuild when the xserver.ent file changes.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:08 -08:00
Gaetan Nadon
73841074eb xmlrules.in: use pattern rules to enable dependencies
This will allow a dependency to be specified as done in libX11:

%.html: %.xml $(dist_spec_DATA)
	$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:44:00 -08:00
Gaetan Nadon
97e307dda2 xmlrules.in: no need to setup xmlto flags when configuring --without-xmlto
The AM conditional HAVE_XMLTO should wrap more statements.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:43:53 -08:00
Gaetan Nadon
1a7b14d118 xmlrules.in: remove unrequired "@rm -f $@" from doc targets
Unable to find a purpose for this, not used anywhere else
but in the font module.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:43:04 -08:00
Gaetan Nadon
d3c523bd12 doc: HTML file generation: use the installed copy of xorg.css
Currently the xorg.css file is copied in each location
where a DocBook/XML file resides. This produces about
70 copies in the $(docdir) install tree for all of xorg.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-24 11:42:48 -08:00
Tiago Vignatti
bfe9cdd11b dix: delete logo hack screen saver
Protocol doesn't mention about screen saver with logo being required and
people are already using more intelligent ways to draw screen saver themes. So
consider -logo as deprecated option, deleting its code.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-11 23:20:35 +02:00
Peter Hutterer
88cb61e1e5 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts:
	dix/getevents.c
	hw/xfree86/common/xf86Xinput.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 12:54:46 +10:00
Jeremy Huddleston
291c39dfef DOC: Only build dtrace documentation with --enable-docs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 16:20:52 -08: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
Jamey Sharp
402942cdbc Introduce per-object per-screen privates.
This replaces dixCreatePrivateKey and the only uses, which were in
midispcur.

Commit by Jamey Sharp and Josh Triplett.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-09-18 11:17:18 +02: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
Gaetan Nadon
35c0dbe4b0 doc: add missing .gitignore for Xserver-DTrace
The dtrace doc was recently added in commit
9c171d4aee

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-08-09 21:17:53 -07:00
Alan Coopersmith
05c4fe83fd Check HAVE_XMLTO_TEXT before trying to use xmlto to make text files
Reported-by: Matt Turner <mattst88@gmail.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-08-09 21:17:37 -07:00
Alan Coopersmith
a6fb7829ed Xserver-spec: Update ChangeGC prototype, add ChangeGCXIDs
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-08-09 21:09:56 -07:00
Alan Coopersmith
a817271d46 Update Xserver-spec for new devPrivates API
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
2010-08-09 21:09:56 -07:00
Alan Coopersmith
9c171d4aee Add documentation of the Xserver DTrace probes
Mostly pulled together from posts to my blog and the docs posted
at http://people.freedesktop.org/~alanc/dtrace/ and converted to
DocBook.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
2010-07-23 12:41:59 -07:00
Alan Coopersmith
6b912b08ce Add name argument to CreateNewResourceType documentation
Reflects API change made in commit 895f40792a during Xorg 1.8 development

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
2010-07-23 12:41:52 -07:00