Re: [RFC PATCH xf86-input-libinput v2] Do not crash if the device is invalid

2015-02-25 Thread Olivier Fourdan
Hi Peter, Humm, I suspect that's even more tricky actually, because once a device is disabled, it cannot be enabled again... With this patch, it won't crash anymore, but it won't re-enable either. $ xinput list ⎡ Virtual core pointer id=2[master pointer (3)] ⎜ ↳

[PATCH xf86-input-libinput v3] Ignore property changes if the device is disabled

2015-02-25 Thread Olivier Fourdan
If the device is present but disabled, the server will still call into SetProperty. We don't have a libinput device to back it up in this case, causing a null-pointer dereference. This is a bug specific to this driver that cannot easily be fixed. All other drivers can handle property changes even

Re: [PATCH:xf86-video-mga] Fix pointer cast warning.

2015-02-25 Thread Daniel Stone
Hi, On 25 February 2015 at 10:31, Tormod Volden wrote: > On Tue, Feb 24, 2015 at 7:36 AM, Mark Kettenis > wrote: >> This code makes no sense to me. exaGetPixmapFirstPixel() returns a pixel >> value. Interpreting that as a pointer to the first pixel must be wrong. > > Are you sure about this?

Re: [PATCH:xf86-video-mga] Fix pointer cast warning.

2015-02-25 Thread Mark Kettenis
> Date: Wed, 25 Feb 2015 11:31:50 +0100 > From: Tormod Volden > > On Tue, Feb 24, 2015 at 7:36 AM, Mark Kettenis > wrote: > >> cast to pointer from integer of different size > >> [-Werror=int-to-pointer-cast] > >> > >> Signed-off-by: Thomas Klausner > >> --- > >> src/mga_exa.c | 2 +- > >

[PATCH] damage: Only track extents where possible

2015-02-25 Thread Chris Wilson
For external Damage, we need only track sufficient information to satisfy the DamageReportLevel. That is if the Client only wishes to hear that the Damage is now non-empty or if the extents change, we only need to track the extents of the Damage and can discard the actual rectangles. This speeds up

[PATCH:libXfont 1/2] Set close-on-exec for font file I/O.

2015-02-25 Thread Thomas Klausner
From: Christos Zoulas Signed-off-by: Thomas Klausner --- src/fontfile/fileio.c | 5 - src/fontfile/filewr.c | 12 +++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c index 80af511..d44cecd 100644 --- a/src/fontfile/file

[PATCH:libXfont 2/2] Fix is*() usage.

2015-02-25 Thread Thomas Klausner
The argument must be an unsigned char or -1; in these cases we know it's not -1 so cast it to unsigned char. Fixes warning: array subscript is of type 'char' [-Wchar-subscripts] Signed-off-by: Thomas Klausner --- src/FreeType/ftfuncs.c | 6 +++--- src/FreeType/xttcap.c | 2 +- src/bitmap/bdfu

[PATCH 2/8] mi: miValidateTree based on paintable not viewable (v2)

2015-02-25 Thread Adam Jackson
v2: Incorporate keithp's review notes Signed-off-by: Adam Jackson --- mi/mivaltree.c | 110 ++--- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/mi/mivaltree.c b/mi/mivaltree.c index ea6889f..f8a25b8 100644 --- a/mi/mivaltree.c

[PATCH 0/8] backing store Always support, v2

2015-02-25 Thread Adam Jackson
Much the same as the previous series, with review feedback merged. This regresses xts' XMapWindow/13 and XMapSubWindows/12. XMapWindow/13 creates a WhenMapped window with one child, maps the child, and then maps the parent. The ensuing expose events for the parent clip out the region of the chil

[PATCH 6/8] dix: Switch window unmap to mark normally instead of UnmapValData (v2)

2015-02-25 Thread Adam Jackson
v2: Don't leak a valdata on every transition to unpaintable (Peter Harris) Signed-off-by: Adam Jackson --- dix/window.c | 4 ++-- mi/mivaltree.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/window.c b/dix/window.c index 3d3361e..20fad3a 100644 --- a/dix/window.c ++

[PATCH 8/8] composite: Implement backing store's Always mode (v2)

2015-02-25 Thread Adam Jackson
Keep the pixmap at unmap, always try to realize backing store, always mark them when marking, and update paintable when backed. v2: Handle allocation failure when redirecting Signed-off-by: Adam Jackson --- composite/compalloc.c | 2 +- composite/compinit.c | 29 +-- com

[PATCH 4/8] mi: Shortcut mi blits based on composite clip, not mappedness (v2)

2015-02-25 Thread Adam Jackson
v2: Rather than embed more knowledge about window states, just bail if the composite clip is empty. Signed-off-by: Adam Jackson --- mi/mibitblt.c | 5 ++--- mi/micopy.c | 7 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 7243963..70a9

[PATCH 3/8] mi: Mark/validate based on paintable not viewable

2015-02-25 Thread Adam Jackson
Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- mi/miwindow.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mi/miwindow.c b/mi/miwindow.c index a1af3a7..486c9bf 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -151,7 +151,7 @@ mi

[PATCH 7/8] composite: Factor out backing store transition

2015-02-25 Thread Adam Jackson
No functional change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- composite/compinit.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/composite/compinit.c b/composite/compinit.c index 3ac075a..f9426c7 100644 --- a/composite/compi

[PATCH 1/8] dix: Add 'paintable' bit to the window state (v2)

2015-02-25 Thread Adam Jackson
A paintable window is a window whose pixels are (potentially) modifiable by rendering commands. Right now that just means the same thing as viewable; it will soon also include unmapped windows with backing store set to Always. v2: Set paintable in dix not ddx (Keith Packard) Reviewed-by: Keith P

[PATCH 5/8] dix: Update window state based on paintable not viewable

2015-02-25 Thread Adam Jackson
Signed-off-by: Adam Jackson --- dix/window.c | 69 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/dix/window.c b/dix/window.c index 545bad7..3d3361e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1467,7 +1467,7 @@ Cha

close-on-exec

2015-02-25 Thread Thomas Klausner
I don't know what the proper way to do this portably, but this is the diff we currently have in NetBSD's xsrc for xsm to close file descriptors on exec. I see that glibc added fopen's "e" flag for 2.7 (in 2007). No idea about other operating systems, the flag was new to me too :)

[PATCH:xsm] Close file descriptors on exec.

2015-02-25 Thread Thomas Klausner
From: Christos Zoulas Signed-off-by: Thomas Klausner --- auth.c | 8 choose.c | 2 ++ lock.c | 2 +- remote.c | 2 +- restart.c | 4 ++-- saveutil.c | 6 +++--- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/auth.c b/auth.c index 5b3bcac..c380fda 100644 -

Re: close-on-exec

2015-02-25 Thread Ángel González
On 25/02/15 22:24, Thomas Klausner wrote: I don't know what the proper way to do this portably, but this is the diff we currently have in NetBSD's xsrc for xsm to close file descriptors on exec. I see that glibc added fopen's "e" flag for 2.7 (in 2007). No idea about other operating systems, the

Re: [PATCH xf86-input-libinput v3] Ignore property changes if the device is disabled

2015-02-25 Thread Peter Hutterer
On Wed, Feb 25, 2015 at 11:49:19AM +0100, Olivier Fourdan wrote: > If the device is present but disabled, the server will still call into > SetProperty. We don't have a libinput device to back it up in this case, > causing a null-pointer dereference. > > This is a bug specific to this driver that

Re: close-on-exec

2015-02-25 Thread Alan Coopersmith
On 02/25/15 01:24 PM, Thomas Klausner wrote: I don't know what the proper way to do this portably, but this is the diff we currently have in NetBSD's xsrc for xsm to close file descriptors on exec. I see that glibc added fopen's "e" flag for 2.7 (in 2007). No idea about other operating systems,

Re: [PATCH:libXfont 1/2] Set close-on-exec for font file I/O.

2015-02-25 Thread Alan Coopersmith
On 02/25/15 12:45 PM, Thomas Klausner wrote: From: Christos Zoulas Signed-off-by: Thomas Klausner --- src/fontfile/fileio.c | 5 - src/fontfile/filewr.c | 12 +++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c ind

Re: [PATCH:xf86-video-mga] Fix pointer cast warning.

2015-02-25 Thread Tormod Volden
On Wed, Feb 25, 2015 at 2:01 PM, Mark Kettenis wrote: > > That pretty much confirms the code doesn't work (before or after your > change). Probably the answer is to revert the > exaGetPixmapFirstPixel() changes you made (here and in other drivers). Oops, yes, now I see that using exaGetPixmapFirs

[PATCH xf86-input-libinput 2/2] Add properties to change the click method (#89332)

2015-02-25 Thread Peter Hutterer
X.Org Bug 89332 Signed-off-by: Peter Hutterer --- include/libinput-properties.h | 8 +++ man/libinput.man | 8 +++ src/libinput.c| 160 ++ 3 files changed, 176 insertions(

[PATCH xf86-input-libinput 1/2] Split out property init into helper functions

2015-02-25 Thread Peter Hutterer
Makes the code less messy. Only functional change is that if one property fails to initialize we'll now continue with the others. Previously the first failed property would prevent any other property init. Signed-off-by: Peter Hutterer --- src/libinput.c | 403 +--

Re: [PATCH:xf86-video-mga] Fix pointer cast warning.

2015-02-25 Thread Connor Behan
On 25/02/15 06:41 PM, Tormod Volden wrote: >> And then disable the DownloadFromScreen() implementation, or perhaps >> even disable EXA altogether. > If nobody can find the real problem that is maybe all that can be done. The fix should be: char *src = pExa->memoryBase + exaGetPixmapOffset(pSrc);