Commit Graph

13806 Commits

Author SHA1 Message Date
Keith Packard
aa47a44096 kdrive/ephyr: ddxUseMsg is supposed to return
I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but
it's not declared to exit.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:51 -08:00
Keith Packard
86d68825c2 vfb: Remove unused pXWDCmap variable
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
7353ec7cb6 xfree86: Switch int10 code to stdint types
CARD32 is not type compatible with uint32_t and ends up generating a
pile of warnings. Fix this by replacing all of the CARD* types with
stdint types.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
93b15b1a47 xfree86: Don't complain when the SDK dependency file doesn't exist yet
It won't exist until the build is complete, so don't complain about it

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
eda9356271 xkb: Make XkbWriteCountedString take a const char * input parameter
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
d0339a5c66 os: xstrtokenize takes and returns const char * now
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
c608560dbb xfree86/vbe: Make VBEValidateModes take const char **
mode names are now const

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
3835e8b0a1 xfree86/shadowfb: GCFuncs and GCOps are now const
Change GC private to match and fix resulting warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
f71de60355 xfree86/parser: make strings in xf86MatchGroup const
and fix resulting warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
2a93e75ff8 xfree86/int10: mark printk as _X_ATTRIBUTE_PRINTF
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
7fe436a7b7 xfree86/fbdevhw: Fix warnings
Unused fPtr variable. Deal with string constants.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
6990de00eb xfree86/exa: xf86GetOptValString returns const char * now
fix exaDDXDriverInit to match.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
017307f0b4 xfree86/dri: Mark DRIDrvMsg and dri_drm_debug_print _X_ATTRIBUTE_PRINTF
And fix resulting warnings.

v2: (Adam Jackson) Cast handles through uintptr_t to avoid size change warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
22592855e9 xfree86/common: handle string constants in xf86Xinput configuration
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
3a163d2af4 xfree86/common: Const GC funcs and ops in xf86VAarbiter
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
8a9aa44a45 xfree86/config: Kludge around const strings
defaultFontPath is now a const char * so that it can be initialized
from a string constant. This patch kludges around that by inserting
suitable casts to eliminate warnings. Fixing this 'correctly' would
involve inserting some new variables and conditionals to use them.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
86647e7279 config/udev: handle const strings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
b7633c6ff2 composite: Remove unused pScreen variables
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
5bc5684d4c test: Warning cleanup
const char in test/xfree86.c. Cast values to (intmax_t) for %ju format
in test/signal-logging.c.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
fecc7eb1cf xi: More warning cleanup for input
Lots more const char stuff.

Remove duplicate defs of CoreKeyboardProc and CorePointerProc from
test/xi2/protocol-common.c

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Keith Packard
af04cf6968 Xext: Clean up warnings in hashtable code
Make keys const void *

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
00438c9f94 exa: Clean up warnings
Declare GC ops/funcs as const.
Use 'typeof' in the 'swap' macro to capture the right type.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
6e51645b47 xkb: Clean up warnings
Add const to lots of strings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
abce3206cb os: Clean up warnings
Just const char stuff.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
a1cb69dc28 Xext: Clean up warnings
GC funcs and ops are const.
Remove unused variables.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
2f6e8eb70d damage: Clean up warnings
GC funcs and ops are const now, so all wrappers need to declare them
as such.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
c706fb0db8 Clean up warnings in mi.
A coupel of unused variables, and some debug code with mis-matching
printf format and variable types.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
d89b42bda4 Clean up warnings in DIX
As usual, mostly const char changes. However, filter_device_events had
a potentially uninitialized value, 'raw', which I added a bunch of
checks for. I suspect most of those are 'can't happen', but it's hard
to see that inside the function.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
d6da9f23cc hw/xfree86: More const declarations for strings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
644725ac5e Just remove dpms functsion from xf86.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
c85e26d599 Bunch of DMX warning fixes
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
493d992501 More warning fixes in hw/xfree86
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
c78be3a4b7 xfree86 warning reduction
This gets the easy warnings, mostly constant string problems.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
1ce15ed5ba Xext: _X_EXPORT DPMSSet and DPMSSupported
These are needed by drivers, and it's better to export them from here
rather than redefining them in hw/xfree86 and exporting them from there.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Keith Packard
1f407763be include: Make xkbrules structures all const char *
This lets them be initialized with string constants

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:48 -08:00
Keith Packard
e1e01d2e33 xfree86/common: Warning fixes. Mostly const string handling.
Also removes DPMS functiosn from Xext/dpmsproc.h

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:48 -08:00
Keith Packard
27b44949a3 hw/xfree86: Lots of constant string support
Make lots of string pointers 'const char' so that we can use constant
strings with them without eliciting warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:48 -08:00
Keith Packard
6f77e2645e hw/xfree86: Make strings in DriverRec and ScrnInfoRec const
This avoids compiler warnings when initializing with string constants.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:48 -08:00
Peter Hutterer
e819028721 ephyr: don't allow a shift+ctrl keygrab if mod1 was enabled
Xephyr wants ctrl+shift to grab the window, but that conflicts with
ctrl+alt+shift key combos. Remember the modifier state on key presses and
releases, if mod1 is pressed, we need ctrl, shift and mod1 released
before we allow a shift-ctrl grab activation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-09 15:41:22 +10:00
Carlos Garnacho
b2d5ee2e36 Xi: Ensure DeviceChanged is emitted after grabs are deactivated
When a grab on a slave device is deactivated, the master device must
be checked, just in case there were events from other devices while
the slave device was stolen away by the passive grab. This may
introduce misbehaviors on mismatching valuators and device features
later on UpdateDeviceState().

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-09 13:39:05 +10:00
Alan Coopersmith
863d2ad5c0 CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab()
CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL.
This return value is not checked, and can cause NULL pointer dereferences.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-09 13:36:29 +10:00
Alan Coopersmith
5493a67ec2 GrabDevice() needs to handle NULL return value from AllocGrab()
GrabDevice() calls AllocGrab() which can fail and return NULL.
This return value is not checked, and can cause NULL pointer dereferences.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-09 13:36:29 +10:00
Alan Coopersmith
3a113815a0 If AllocGrab() fails to set up grab, don't copy to a NULL grab
If either the initial calloc or the xi2mask_new fails, grab is NULL,
but if a src grab is passed in, it was always being written to by
CopyGrab (and if that failed, dereferenced again in teardown).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-09 13:36:29 +10:00
Keith Packard
a92c6406e7 Bump release to 1.15.99.900
The merge window for 1.16 is open

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-09 11:11:22 +08:00
Damien Lespiau
d6c8d75097 xfree86: Use the TMDS maximum frequency to prune modes
Instead of only relying on the Range section, we can do better on
HDMI to find out what is the max dot clock the monitor supports. The
HDMI CEA vendor block adds a TMDS max freq we can use.

This makes X not prune 4k resolutions on HDMI.

v2: Replace X_INFO by X_PROBED in the message that prints the max
    TMDS frequency (Chris Wilson)

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 17:24:57 +00:00
Damien Lespiau
95c2287465 xfree86: Refactor xf86MonitorIsHDMI() using xf86MonitorFindHDMIBlock()
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 17:24:51 +00:00
Damien Lespiau
a279fb3ff3 xfree86: Add a xf86MonitorFindHDMIBlock()
The HDMI CEA vendor specific block has some interesting information,
such as the maximum TMDS dot clock.

v2: Don't parse CEA blocks with invalid offsets, remove spurious
    brackets (Chris Wilson)

v3: Fix the looping through the CEA data blocks, it had a typo using the
    wrong variable coming from the code it was ported from.
    Replace x << 16 + y << 8 + z by x << 16 | y << 8 | z
    (Chris Wilson)

v4: Remove the stray ';' at the end of "if (*end == 0)".
    (Dominik Behr on IRC)

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 17:24:38 +00:00
Eric Anholt
295d41fa2a glx: unifdef swrast dri_interface.h values from Mesa 7.1.
We can't remove all the ifdefs (__DRI_TEX_BUFFER_VERSION) because
configure.ac is only checking for that version of Mesa in the absence
of dri2.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-12-30 23:10:34 -08:00
Eric Anholt
4ab1a2797b glx: unifdef for DRI2 dri_interface.h things in mesa 9.2.
Thanks to configure.ac's check, we know that we have a new enough
dri_interface.h that we don't need to conditionalize all this code.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-12-30 23:10:21 -08:00
Keith Packard
2ea973e12f Bump version to 1.15.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-12-27 09:50:55 -08:00