summaryrefslogtreecommitdiff
path: root/hw/xnest
AgeCommit message (Collapse)AuthorFilesLines
2010-06-10Fix a couple more possible errors with input-only windowsKeith Packard1-1/+1
Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov3-4/+4
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-06Remove more superfluous if(p) checks around free(p)Mikhail Gusarov1-5/+3
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-05Clean up after removal of screen parameters from region macros.Jamey Sharp1-12/+6
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-06-05Register Xnest colormap screen private keyKeith Packard1-0/+3
This key is used to store the currently installed colormap and must be registered before we can use it. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard9-23/+24
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-05Rename region macros to eliminate screen argumentKeith Packard5-38/+38
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-02Only deal with input code when changing the input shape.Pierre-Loup A. Griffais2-3/+3
Propagate the shape kind all the way to SetShape to avoid performing non-input operations such as revalidating the tree and generating exposures when only changing a window's input shape. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Acked-by: Aaron Plattner<aplattner@nvidia.com> Reviewed-by: Daniel Stone<daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-25xnest: Don't ignore errors from DeviceCursorInitialize.Jamey Sharp1-2/+1
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-20Replace screen->rgf scratch GC flags with a bit in each GC.Jamey Sharp1-1/+0
This eliminates a poorly-named, poorly-documented field from the ScreenRec, using a previously-unused flag bit in each GC instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-14mi: removed unused PointerNonInterestBox functions.Oliver McFadden1-1/+0
Please note this patch breaks the ABI. Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov8-40/+40
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-04-23fb: track screens' installed colormaps as screen privates.Jamey Sharp1-13/+9
Several DDXes allow each screen to have at most one (or in some cases, exactly one) installed colormap. These all use the same pattern: Declare a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by screen number. This patch converts most of those to use screen privates instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-03-22Fix .man.N targets for AM_SILENT_RULESYaakov Selkowitz1-2/+2
Add $(AM_V_GEN) for sed-based rules so they appear as expected with automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm commands which are not prone to fail. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22Fix relink targets for silent rulesYaakov Selkowitz1-1/+1
Add $(AM_V_at) to all relink make targets to silence them when automake silent rules are in use. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22Use EXEEXT in relink rules for portable DDXsYaakov Selkowitz1-1/+1
On Cygwin and MinGW, executables use the .exe suffix. Autoconf and automake set EXEEXT on these platforms, and leave it empty on others where no suffix is used. $(EXEEXT) must be appended to executable names in custom rules for portability: http://www.gnu.org/software/automake/manual/html_node/EXEEXT.html Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-02-15dix: move config_init into the DDX.Peter Hutterer1-0/+5
The only DDX currently using hotplugging is the xfree86 one and it looks like it'll stay that way for a bit. Move the initialization to the DDX, since Xephyr, Xnest, and friends don't need HAL or udev notifications. Add CloseInput (counterpart to InitInput) to be able to clean up the config initialization from the DDX as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2009-11-11.gitignore: use common defaults with custom section #24239Gaetan Nadon1-2/+3
Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-09Xnest: set the default pointer accel to the host's values (#10013)Peter Hutterer1-0/+4
The defaultPointerControl holds compile-time defaults for pointer acceleration. If an Xnest instance is started, it resets the hosts pointer accel values to these built-in defaults instead of using the host values. This patch queries the host for the values before initializing the device, thus leaving the host values untouched. X.Org Bug 10013 <http://bugs.freedesktop.org/show_bug.cgi?id=10013> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05xnest: restore xnestUpdateModifierStatePeter Hutterer1-16/+5
The meat of xnestUpdateModifierState was ifdef'd out in 6ef46c40e62def4841a4cff4e0b443516a2ed782. This resulted in stuck modifiers when a modifier key release event wasn't sent to Xnest (e.g. Alt-Tab away). See X.Org Bug 3664 <https://bugs.freedesktop.org/show_bug.cgi?id=3664> for the original bug report. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05xnest: include exevents.h for XIGetKnownProperty.Peter Hutterer1-0/+1
Silences compiler warning. Pointer.c: In function ‘xnestPointerProc’: Pointer.c:64: warning: implicit declaration of function ‘XIGetKnownProperty’ Pointer.c:64: warning: nested extern declaration of ‘XIGetKnownProperty’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05xnest: use AllocDevicePair for Xnest device initalizationPeter Hutterer1-5/+10
All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them up nicely with the name assigned etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03xnest: fix up parameters to InitKeyboardDeviceStruct.Peter Hutterer1-1/+1
IKDS takes a DeviceIntPtr as first argument, and an RMVLO struct as second. The keysyms stuff is long gone now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-03xnest: silence compiler warnings by typecasing properly.Peter Hutterer1-5/+5
Events.c: In function ‘xnestQueueKeyEvent’: Events.c:112: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c: In function ‘xnestCollectEvents’: Events.c:141: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:150: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:160: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:193: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7Peter Hutterer1-2/+18
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh2-12/+19
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-04-17input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct.Peter Hutterer1-8/+1
Virtually all callers use XkbGetRulesDefault(&rmlvo); InitKeyboardDeviceStruct(..., rmlvo); Let's save them the trouble and accept NULL as a hint to take the default RMLVO. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-04-14xnest: remove unused variable 'names'.Peter Hutterer1-2/+0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Constify atom name stringsAlan Coopersmith1-2/+2
Changes MakeAtom to take a const char * and NameForAtom to return them, since many callers pass pointers to constant strings stored in read-only ELF sections. Updates in-tree callers as necessary to clear const mismatch warnings introduced by this change. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-25Update xnest keyboard code to match xephyr/kdrive.Paulo Cesar Pereira de Andrade1-12/+26
Xnest was not updated in the last batch of xkb changes. This patch is basically cut&paste from hw/kdrive/src/kinput.c and hw/kdrive/ephyr/ephyr.c, and appears to generate a Xnest as functional as before the xkb changes.
2009-01-22Input: Remove modifierMap from coreDaniel Stone1-18/+4
We already have modmap (in the exact same format!) in XKB, so just use that all the time, instead of duplicating the information. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Make XKB mandatoryDaniel Stone1-42/+34
No more #ifdef XKB, because you can't disable the build, and no more noXkbExtension either. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-21Update xorg-server.h.in & Xnest to use new XKB default #definesAlan Coopersmith1-28/+5
2009-01-22XNest: Fix the build caused by __XKBDEFRULES__ -> XKB_DFLT_RULES in ↵Benjamin Close1-1/+1
23862ede59a9ce11a06ec5151bde460fb836c603
2009-01-11xnest: only define ddxBeforeReset if neededJulien Cristau1-0/+2
2009-01-11xnest: ANSI cleanupsJulien Cristau3-6/+6
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer2-2/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-11-25Warning fixAdam Jackson1-1/+1
Pixmap.c: In function ‘xnestPixmapToRegion’: Pixmap.c:93: warning: ‘Box.x1’ may be used uninitialized in this function
2008-11-04xnest: I'm sure xfree works fine, even if we're 64 bit.Peter Hutterer1-4/+0
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-10-26Nuke unused variablesJulien Cristau1-1/+0
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky4-4/+8
TODO: static indices can be made just an int; some indices can be combined.
2008-08-27Add an array of integers for use as per-screen cursor private keys.Eamon Walsh1-3/+3
Replaces the use of the screen pointer itself as the key, which was nice but won't work now that an array index is being stored.
2008-08-28Don't need to request space for Xnest pixmap private.Eamon Walsh1-2/+0
2008-07-24Shape extension is built-in and mandatory.Adam Jackson3-16/+0
2008-07-23Unifdef AIX.Adam Jackson1-5/+0
2008-06-11xnest: wrap the xnest cursor sprite funcs around the mi funcs.Peter Hutterer3-4/+47
Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering engine, then take the pointers, store it in a xnest-local variable, and put the xnest-specific sprite funcs in place. In the xnest sprite funcs, call through to the mi sprite funcs after doing xnest-specific stuff.
2008-06-08xnest: fix up sprite funcs to stop compiler warnings.Peter Hutterer3-9/+22
2008-06-08xnest: switch to using EventList rather than xEvents.Peter Hutterer2-11/+10
2008-06-08xnest: call miDCInitialize rather than miPointerInitialize.Peter Hutterer1-2/+1
This unfortunately gives us a lots of artefacts, so cursor rendering cannot be assumed complete. But it's better than crashing.
2008-05-26Merge branch 'master' into mpxPeter Hutterer2-10/+1