Age | Commit message (Collapse) | Author | Files | Lines |
|
Commit d1107918d4626268803b54033a07405122278e7f introduced checks to
the RandR path that cause RRSetScreenConfig requests to fail if the
size is too large. Unfortunately, when RandR 1.1 rotation is enabled
it compares the rotated screen dimensions to the unrotated limits,
which causes 90- and 270-degree rotation to fail unless your screen
happens to be square:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 153 (RANDR)
Minor opcode of failed request: 2 (RRSetScreenConfig)
Value in failed request: 0x780
Serial number of failed request: 14
Current serial number in output stream: 14
Fix this by moving the check above the code that swaps the dimensions
based on the rotation.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Robert Hooker <robert.hooker@canonical.com>
Tested-by: Kent Baxley <kent.baxley@canonical.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Compare two version numbers in the major.minor form.
Switch the few users of manual version switching over to the new function.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out
events corresponding to the event mask, if there have been changes to
CRTCs or outputs. Only screen events were being generated, however.
Fixes http://bugs.freedesktop.org/21760
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Reviewd-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Confine cursor motion to within the bounds of a single CRTC, iff all the
CRTCs within a ScreenRec are reachable from each other. If not you get
the same "cursor floats within the bounding rect" behaviour you get now.
v3:
- Incorporate review feedback from Christopher James Halse Rogers
v4:
- Add mode field.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This reverts commit 66294afcab7b7a82f7dd897767e46c48a94b8ee8.
|
|
This reverts commit d94a035ea9eb3167fc4f35b2d9f0d53f8807014c.
|
|
This reverts commit 82612045e11f2b882ae132e184a9629f43f1c424.
|
|
This reverts commit afb6ebf1d5829346c40fe1053c9f50afe926e6c6.
|
|
This reverts commit a88d70fb20a2bc3152b84adff4380857e6cfadf5.
|
|
This reverts commit 752c368421c1c824752cf467fba9318d75d2ca2c.
|
|
This reverts commit b0f4bd61f0caf80f3be9a176f1f7a707bc6628d8.
|
|
This reverts commit 0d01b66df9081ef48843b3bad81c56bb2cd1ae69.
|
|
==543== Syscall param writev(vector[...]) points to uninitialised byte(s)
==543== at 0x4AB7154: writev (writev.c:51)
==543== by 0x8935B: _XSERVTransWritev (Xtrans.c:912)
==543== by 0x6C55F: FlushClient (io.c:924)
==543== by 0x6D013: FlushAllOutput (io.c:668)
==543== by 0x27A83: Dispatch (dispatch.c:453)
==543== by 0x205B7: main (main.c:291)
==543== Address 0x556dc8c is 12 bytes inside a block of size 4,096 alloc'd
==543== at 0x48334A4: calloc (vg_replace_malloc.c:467)
==543== by 0x6CE37: WriteToClient (io.c:1065)
==543== by 0x223A7: ProcEstablishConnection (dispatch.c:3685)
==543== by 0x27B7B: Dispatch (dispatch.c:432)
==543== by 0x205B7: main (main.c:291)
==543== Uninitialised value was created by a stack allocation
==543== at 0xA3350: ProcRRCreateMode (rrmode.c:289)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
|
|
==9999== Syscall param writev(vector[...]) points to uninitialised byte(s)
==9999== at 0x4AB5154: writev (writev.c:51)
==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912)
==9999== by 0x61C8B: FlushClient (io.c:924)
==9999== by 0x62743: FlushAllOutput (io.c:668)
==9999== by 0x4AA5B: Dispatch (dispatch.c:453)
==9999== by 0x205BF: main (main.c:291)
==9999== Address 0x55711b9 is 1 bytes inside a block of size 4,096 alloc'd
==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467)
==9999== by 0x62567: WriteToClient (io.c:1065)
==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685)
==9999== by 0x4AB53: Dispatch (dispatch.c:432)
==9999== by 0x205BF: main (main.c:291)
==9999== Uninitialised value was created by a stack allocation
==9999== at 0x160E78: ProcRRQueryVersion (rrdispatch.c:37)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
|
|
Return a error if the screen is configured to an invalid size.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Need to actually return a reply in this case.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
If the client sends invalid data for this request, the server
will jump to 'sendReply' and call RRFreeCrtcConfigs, passing it the
uninitialized 'configs' and 'num_configs' values.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This provides for separate sizes for the screen scanout and rendering
buffer and the application-visible screen size.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
These were getting ignored.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This bumps the supported RandR protocol version and adds the dispatch
hooks needed to call the new functions
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This adds new driver hooks to allocate scanout pixmaps and
changes the mode setting APIs to pass the new scanout pixmaps
along from DIX. DIX is responsible for reference counting the pixmaps
by tracking them through RRCrtcNotify.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This implements sprite position transformations. Sprite image
transforms are passed all the way to the DDX layer, but the images are
not yet manipulated before being passed to the drivers.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
This isn't used anywhere, not least because it's completely
nonfunctional.
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367
Currently the ddx calls xf86RandR12Init()
(-> RRScreenInit()
-> RRInit()
-> RRModeInit()
-> RRCrtcInit()
-> RROutputInit())
before RRExtensionInit() is called. This causes RRErrorBase
being 0 while setting resource type error values (resource types:
RROutput, RRMode and RRCrtc). The fix moves the setting of error
values to own functions which are called in RRExtensionInit()
to get the right RRErrorBase.
V2: With header file
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix
a cursor off by one on Intel hw, however it also move the whole crtc
into an off by one position and you could see gnom-eshell overlapping.
This commit reverts that and instead fixes the cursor hotspot
translation to work like pixman does. We add 0.5 to the cursor vector
before translating, and floor the value afterwards.
Thanks to Soeren (ssp) for pointing out where the real problem was
after explaning how pixman translates points.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Checking timestamps in post 1.1 randr requests was never a good idea,
let's ignore them and just make the configuration changes.
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|
|
Previously there was two branches of code with small discrepancies between them
(especially prop->valid_values field was not free(3)ed). Extract the common
routine and fix double-free prop->valid_values in RRDestroyOutputProperty by
the way.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
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>
|
|
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>
|
|
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)
|
|
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
TryClientEvents already did this; this commit just moves the assignment
one level down so that no event source has to worry about sequence
numbers.
...No event source, that is, except XKB, which inexplicably calls
WriteToClient directly for several events.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.
For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.
hw/xquartz/xpr/appledri.c has an interesting case: While its check for
"client == NULL" appears redundant with the test in WriteEventsToClient,
it dereferences client to get the sequence number.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
This patch was created with:
git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The event is already swapped in randr.c/SRROutputPropertyNotifyEvent, so
it should not be swapped here.
X.Org Bugzilla #26511: http://bugs.freedesktop.org/show_bug.cgi?id=26511
Tested-by: Leonardo Chiquitto <leonardo@ngdn.org>
Acked-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Signed-off-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Convert all calls of CreateNewResourceType to pass name argument
Breaks DIX ABI.
ABI versions bumped:
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
include/protocol-versions.h specifies each extension version as supported by
the server and sent back on the wire to the client.
This fixes up several issues with the server potentially reporting a higher
version of the protocol if recompiled against a newer version of the
protocol.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: RĂ©mi Cardona <remi@gentoo.org>
Acked-by: Julien Cristau <jcristau@debian.org>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
These were leaked when the property was destroyed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
All of the crts and outputs were freed, but not the arrays full of
pointers to them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Referencing a screen using a window only requires GetAttr access.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
The matrix multiply to combine rotation and projective transforms was being
done in the wrong order.
Signed-off-by: Keith Packard <keithp@keithp.com>
|