Commit Graph

6519 Commits

Author SHA1 Message Date
Jeremy Huddleston Sequoia
f70a8bf371 XQuartz: Don't sleep forever on exit if usleep() returns an error
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10 11:40:27 -08:00
Jeremy Huddleston Sequoia
ebcc1c214c XQuartz: Update Info.plist copyright years
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10 11:26:49 -08:00
Andreas Schwab
ab4b1fb38a ARM64: Add support for aarch64
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-06 16:41:49 -08:00
Keith Packard
f348935e7d Link with xshmfence, reference miSyncShmScreenInit in sdksyms
This gets the server to link with xshmfence again, and also ensures
that the miSyncShm code is linked into the server with the reference
from sdksyms.

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-05 18:37:12 -08:00
Keith Packard
903a058370 hw/xfree86: Link libdri3 only when DRI3 is defined
Don't attempt to link non-existant libraries...

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-04 19:01:26 -08:00
Egbert Eich
2aa5092b88 DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away
A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to
crash when xf86SetViewport() which does not check if the hardware is
accessible.
Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31 18:36:17 -07:00
Egbert Eich
508e05777a DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch()
When enabling/disabling input handlers in xf86VTSwitch() we treat Input-
and GeneralHandlers equally. The result is that after a VT switch the
masks for EnabledDevices and AllSockets are equal and the distiction
between both types is lost.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31 18:35:03 -07:00
Egbert Eich
0cb33ce340 DDX/modes: Add a sanity check when using screen sizes from EDID
EDID sometimes lies about screen sizes. Since the screen size is used
by clients to determine the DPI a wrong ration will lead to terrible
looking fonts.
Add a sanity check for the h/v ratio cutting off at 2.4. This would
still accept the cinemascope aspect ratio as valid.
Also add message suggesting to add a quirk table entry.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31 18:33:54 -07:00
Egbert Eich
41d4beb261 DDX/DPMS: Call dixSaveScreens() also when screen is turned on
DMPS calls dixSaveScreens() when turned off but not when turned
on. In most cases this is irrelevant as DPMS is done when a
key is hit in which case dixSaveScreens() will be called to
unblank anyhow. This isn't the case if we use xset (or the
DPMS extension directly) to unblank.
Check screenIsSaved to make sure the state needs to be changed
before calling dixSaveScreens().

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-31 18:31:18 -07:00
Søren Sandmann Pedersen
623c414765 ephyr: Ensure stride of private framebuffer is multiple of 4
The fb layer of X can't deal with strides that are not a multiple of
4, so when Xephyr allocates its own framebuffer it should make sure to
align it.

This fixes crashes and rendering corruption when Xephyr runs in a
depth that is different from the host X server and its screen size is
not a multiple of 4 / depth. (This is particularly easy to trigger if
you use the -resizeable option).

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 18:24:33 -07:00
Søren Sandmann Pedersen
97cf53cc2a ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line
When the depth of the Xephyr server matches that of the host X server,
Xephyr simply uses the buffer associated with the XImage as its
framebuffer. In this case, it is correct to get the bits_per_pixel and
bytes_per_line values returned from hostx_screen_init() from the XImage.

However, when the depth doesn't match the host, Xephyr uses a private
framebuffer that is periodically copied to the XImage. In this case,
the returned values of bits_per_pixel and bytes_per_line should be
those of the private framebuffer, not those of the XImage.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 18:24:27 -07:00
Søren Sandmann Pedersen
55246b67b7 xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo
After fc3ab84d the pVideo field in DevToConfig[i] is no longer
initialized, so it's always NULL. This causes the duplicate finding
algorithm in the beginning of the function to not work anymore as it
is based on this field.

The symptom of this bug is that X -configure reports

    Number of created screens does not match number of detected devices.
      Configuration failed.
    Server terminated with error (2). Closing log file.

rather than producing a working config file.

This patch fixes that bug by initializing the field before calling
xf86PciConfigureNewDev().

Cc: tvignatti@gmail.com
Signed-off-by: Soren Sandmann <ssp@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 18:23:03 -07:00
Keith Packard
95bf478b78 Merge remote-tracking branch 'jeremyhu/master' 2013-10-31 18:18:19 -07:00
Keith Packard
5c5c1b7798 present: Add Present extension
Provides both a software implementation using timers and driver hooks
to base everything on vblank intervals.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:59:18 -07:00
Keith Packard
5631382988 dri3: Add DRI3 extension
Adds DRM compatible fences using futexes.
Uses FD passing to get pixmaps from DRM applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:58:30 -07:00
Jeremy Huddleston Sequoia
bb745f2b45 XQuartz: Bump bundle version to 2.7.6
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-31 08:50:57 -07:00
Adam Jackson
902ff0b349 xfree86: Bump video/input/extension ABIs for 1.15
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-30 14:02:59 -07:00
Keith Packard
899451ae59 kdrive/ephyr: Don't discard one-time driver structure at server reset
KdScreenInfo is constructed at server startup time, and not
re-generated at server reset time. Freeing the 'driver' element at
reset time means this information is lost, and the server crashes
pretty quickly afterwards.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-30 09:11:56 -07:00
Michal Srb
a9ca93dcf9 randr: send RRResourceChangeNotify event
Send RRResourceChangeNotify event when provider, output or crtc was created or
destroyed. I.e. when the list of resources returned by RRGetScreenResources and
RRGetProviders changes.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-30 08:09:27 -07:00
Keith Packard
1470c0a132 Merge remote-tracking branch 'whot/for-keith' 2013-10-29 21:00:13 -07:00
Peter Hutterer
e16dea72d6 dmx: queue button events with a flags of 0
Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set
the flags to 0 so we don't generate any motion on a button event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-30 07:41:20 +10:00
Connor Behan
04ab07ca19 xfree86: Find primary entity when bus types are nominally different
As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as
their primary bus type. However, drivers not implementing a
platformProbe function will still create entities of type BUS_PCI. We
need to account for this when checking for the primary entity.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Acked-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-29 09:49:01 -07:00
Keith Packard
b32a4c91cc Merge remote-tracking branch 'idr/glx-float-fbconfig' 2013-10-29 09:37:30 -07:00
Adam Jackson
8aacf47e17 glx: Remove DRI1 AIGLX (v2)
Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and
three releases ago.  The main reason to have wanted DRI1 AIGLX was to
get a GLX compositor working, but DRI1's (lack of) memory management API
meant that the cost of a GLX compositor was breaking direct GLX apps,
which isn't a great tradeoff.

Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose
some functionality here, since it and only it has support for
NV_texture_rectangle.  Since that's required for every extant GLX
compositor I know of, I conclude that anybody with a savage, say, would
probably not notice AIGLX going away, since they wouldn't be running a
GLX compositor in the first place.

In the future we'd like to use GL in the server in a more natural way,
as just another EGL client, including in the GLX implementation itself.
Since there's no EGL implemented for DRI1 drivers, this would already
doom AIGLX on DRI1 (short of entirely forking the GLX implementation,
which I'm not enthusiastic about).

v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt]

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29 10:30:43 -04:00
Daniel Czarnowski
ccc8bb1153 glx: Handle float config types in glxConvertConfigs
Replaces old use of floatMode attribute with new, extended range of
values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the
float modes support requires it. Enables support for not only float
configs, but packed float configs as well.

v2 (idr): Whitespace and formatting fixes.  Refactor render type
vs. pbuffer checking to a separate function that includes a quote from
the spec.  Re-write commit message.  Fix compiler warnings:

glxdricommon.c: In function 'glxConvertConfigs':
glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign]
glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *'
glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign]
glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *'

Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-24 11:47:42 -07:00
Daniel Czarnowski
4e5eb15b4c glx: Correctly set render type enum
The type specified is bits, but the context wants an enum.

v2 (idr): Fix various whitespace and formatting problems.  Rename
convFBconfRenderTypeBits2CtxRenderType to
renderTypeBitsToRenderTypeEnum.  Re-write commit message.

Signed-off-by: Daniel Czarnowski <daniel.czarnowski@intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-10-24 11:16:30 -07:00
Strake
83bb366e71 unbreak KdEnableInput
pi = ki = 0 here, so not follow them.

Signed-off-by: Strake <strake888@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-21 14:08:06 +10:00
Alan Coopersmith
8afe20d4e3 Update GLX dependencies now that DRI & DRI2 are builtins, not modules
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-10-14 17:56:44 -07:00
Alan Coopersmith
2704bdb24a DMX glxproxy: Don't allocate & copy data just to free it unused
Two functions in the DMX glxproxy code loop over all the backend
screens, starting at the highest numbered and counting down to
the lowest.

Previously, for each screen, the code would allocate a buffer
large enough to read the reply from the backend, copy that reply
into the buffer, and then if it wasn't the final screen, free it.
Only the buffer from the final screen is used, to pass on to the
client in the reply.

This modifies it to just immediately discard the responses from
the screens as we loop through it, only doing the allocate & copy
work for the one buffer we pass back to the client.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alex Deucher <aleander.deucher@amd.com>
2013-10-14 17:56:44 -07:00
Michele Baldessari
93a27b2dd0 Xephyr: restore cursor visibility
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388

Commit c100211034 (dix: only show the cursor
if a window defines one (#58398)) broke the default cursor behaviour in
Xephyr (unless run with -retro). Restore the default cursor visibility
so that '-retro' or '-host-cursor' are not needed to have a visible
cursor.

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

as of ba387cf21f "ephyr: Use host (HW) cursors
by default." this only applies if -sw-cursor is given on the cmdline.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14 11:07:37 +10:00
Michele Baldessari
70efc799cb Fix Xephyr compilation when DEBUG is enabled
When DEBUG is enabled Xephyr compilation fails:
ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this
function)
     EPHYR_LOG("leave. is_ok:%d\n", is_ok);

Just reemove bogus is_ok variable.

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14 11:07:37 +10:00
Jon TURNEY
44d502c6f1 hw/xwin: Fix for "glx: Remove screen number from __GLXconfig"
Fix compilation after commit c3c976f54c "glx:
Remove screen number from __GLXconfig"

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-09 14:51:53 +01:00
Jeremy Huddleston Sequoia
8aae28e3cb XQuartz: Dont't set screen on __GLXConfig
Fixes regression introduced by c3c976f54c

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-06 09:20:45 -07:00
Pino Toscano
c079b8e675 xfree86/hurd: include <hurd.h>
Needed for using get_privileged_port.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-10-05 15:26:21 +02:00
Keith Packard
f2d149b6d1 kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls
These were duplicated when GLX support was re-added on two different branches.

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 16:43:41 -07:00
Gaetan Nadon
e0a678f059 xfree86: add a comment as to why the logdir is created
Without the logdir, the xserver will write the content of the log file on the
terminal stating that it cannot be written and will stop.

Refer to https://bugs.freedesktop.org/show_bug.cgi?id=3889

Reviewed-By:  Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:39 -07:00
Gaetan Nadon
5bdbf2dba3 xfree86: Use $(MKDIR_P) for better code portability
Still true that we should not use the lower case $(mkdir_p) version.
However, remove the 2005 comment as the MKDIR_P is widely used now.

Reviewed-By:  Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:37 -07:00
Gaetan Nadon
b8cfb0dc84 Uninstall X link and CYGWIN libXorg.exe.a in local install targets
It is our duty to uninstall any files and/or directories that we installed
through install-data-local and install-exec-hook.

Currently the X symbolic link to Xorg remains on disk after running
make uninstall.

Note the exception for logdir which is usually shared by other modules.

Reviewed-By:  Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:35 -07:00
Gaetan Nadon
35a528e492 Xorg binary: use install-exec-hook rather than install-exec-local
The former was explicitly designed to execute additional code after the binary
has been installed. The latter can be executed in any order, hence it's
current dependency on install-binPROGRAMS as a workaround.

The CYGWIN libXorg.exe.a target is an installation target rather than
a post-installation one, so it should not be done as a hook. It does not depend
on the Xorg executable being installed.

Automake:
"These hooks are run after all other install rules of the appropriate type,
exec or data, have completed. So, for instance, it is possible to perform
post-installation modifications using an install hook".

"With the -local targets, there is no particular guarantee of execution order;
typically, they are run early, but with parallel make, there is no way
to be sure of that".

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:33 -07:00
Gaetan Nadon
a1d87576a3 Use $(LN_S) provided by AC_PROG_LN_S macro to create links
For better code portability.

Reviewed-By:  Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:30 -07:00
Gaetan Nadon
28c8e19107 The Xorg binary is missing the extension $(EXEEXT) in the makefile
This is not a problem on UNIX platforms, but on CYGWIN it creates a broken
link to Xorg rather than a link to Xorg.exe.

From the CYGWIN log on tinderbox, we can see that the executable Xorg.exe is
installed correctly. We can see the command used to create the link:

(cd /jhbuild/install/[...]/install/bin && rm -f X && ln -s Xorg X)

Note that the "relink" makefile target correctly appends $(EXEEXT) to Xorg.

Reviewed-By:  Matt Dew <marcoz@osource.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04 14:09:26 -07:00
Keith Packard
f3b529bf25 Merge remote-tracking branch 'anholt/ephyr-fixes' 2013-10-04 14:04:48 -07:00
Keith Packard
9ccb4a6398 Merge remote-tracking branch 'whot/for-keith' 2013-10-04 13:54:55 -07:00
Keith Packard
5d2ec6933f Merge remote-tracking branch 'ajax/xserver-next' 2013-10-04 13:50:04 -07:00
Peter Hutterer
160c2db32d dmx: provide enough space for axis mappings
relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to
axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit
set in the ABS_* range is axis 2, and so on. This requires us to actually have
enough space to have all the ABS_*/REL_* range.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-25 03:52:54 +10:00
Jeremy Huddleston Sequoia
8010d3a48b XQuartz: pbproxy: Fix build with -DDEBUG
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-09-16 07:06:57 -07:00
Jeremy Huddleston Sequoia
39c548da0c XQuartz: Fix build with moved pseudoramiX
Regression from: e716baedc4

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-09-16 07:06:48 -07:00
Adam Jackson
1d1484e9bd glx: Remove pixmapMode from __GLXconfig
This has never been filled in with anything meaningful afaict, and you
can't get to it from the client in any event.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-11 14:37:32 -04:00
Adam Jackson
f579cc85c2 glxproxy: Don't track GLCLientm{aj,in}orVersion
Basically just a port of 62f06b0d to glxproxy.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-11 14:37:31 -04:00
Adam Jackson
e549ffb5f1 dmx/glx: Remove unused __glXNop
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-11 14:37:31 -04:00
Adam Jackson
d08966227e damage: Simplify DamageUnregister
You can only register one drawable on a given damage, so there's no
reason to require the caller to specify the drawable, the damage is
enough.  The implementation would do something fairly horrible if you
_did_ pass mismatched drawable and damage, so let's avoid the problem
entirely.

v2: Simplify xf86RotateDestroy even more [anholt]

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 14:28:35 -04:00
Adam Jackson
28708a045d damage: Implicitly unregister on destroy
There's no reason not to, and it simplifies quite a few callers.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 14:28:09 -04:00
Adam Jackson
e4b15125bb mipointer: Remove deprecated miPointerCurrentScreen
The only remaining use was in some debugging code in DMX.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:29:21 -04:00
Adam Jackson
b5d66b9513 xfree86: Remove deprecated unimplemented xf86MapReadSideEffects
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:24 -04:00
Adam Jackson
dff81687f5 vbe: Don't try to load the ddc submodule
DDC is built into the server now.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:24 -04:00
Adam Jackson
e674815e0a dmx: Remove ShadowFB support
This has been listed as deprecated ever since DMX was merged.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Adam Jackson
4dca026880 mipointer: Remove EnqueueEvent from miPointerScreenFuncRec
No DDX overrode this, and we never actually called through that slot
anyway.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Adam Jackson
ad076dc6e8 mipointer: Flatten calls to mieqSwitchScreen
No DDX was overriding this.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Radek Doulik
65fca55884 xnest: Ignore GetImage() error in xnestGetImage()
When an Xnest instance is not viewable it will crash when a client in
that instance calls GetImage. This is because the Xnest server will
itself receives a BadMatch error.
This patch ignores the error. The application which has requested the
image will receive garbage - this however is fully legal according
to the specs as obscured areas will always contain garbage if there
isn't some sort of backing store as discussed in
https://bugs.freedesktop.org/show_bug.cgi?id=9488
The applied patch is a version from Dadek Doulik.

v2: Call XSync() before changing error handlers as suggested by
    Daniel Stone <daniel@fooishbar.org>.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Egbert Eich <eich@freedesktop.org>
2013-09-10 13:26:26 -04:00
Michal Srb
b902c8abb6 Xnest: Implement xnestModifyPixmapHeader
Xnest variant of ModifyPixmapHeader that creates new Pixmap in parent X
server if it's size is modified from 0x0 to anything bigger.

xnestCreatePixmap doesn't create pixmap in parent X server if it has
dimensions 0x0. If it is later resized and accessed, Xnest will be
aborted with BadDrawable error from parent X server because it will
use XID 0. This happens with ScratchPixmap, for example as used from
XaceCensorImage. Applications using XACE crash Xnest.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:26:26 -04:00
Laurent Carlier
ceffb34774 ephyr: restore GLX support
It was removed since version 1.13

Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2013-09-10 13:26:25 -04:00
Keith Packard
47ff382d1f Merge remote-tracking branch 'jturney/master' 2013-09-09 15:13:42 -07:00
Chris Clayton
1110b71e36 kdrive: fix build error on gcc 4.8 for out-of-bounds array access
I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot
of gcc-4.8:

input.c:225:43: error: array subscript is above array bounds
[-Werror=array-bounds]

This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can
be beyond the end of the array.

Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-06 07:04:17 +10:00
Sebastien Bacher
abc2bfca16 kdrive: initialize GLX for xephyr
Like commit ac1a60e7b6, re-add
initialization of GLX after it was accidentally dropped from non-Xorg
servers in 5f5bbbe543.

Signed-off-by: Sebastien Bacher <seb128@ubuntu.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 14:35:39 -07:00
Eric Anholt
aa5534ec69 ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl.
Given that the window title says "ctrl+shift", having pressing those
keys in that order not ungrab you is fairly mean.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:39 -07:00
Eric Anholt
5cc15e1c42 ephyr: Flush the X connection when updating the window title.
Otherwise when you're doing the ctrl-shift mouse grab thing, you
don't know what state you're in until the next rendering occurs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:39 -07:00
Eric Anholt
ba387cf21f ephyr: Use host (HW) cursors by default.
Unless you're working on the sw cursor rendering code, you surely want
to have real hardware cursors.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:38 -07:00
Eric Anholt
0f5a2f13dc ephyr: Garbage collect some DOA host window clipping code.
Introduced in 7978272661 but never used.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:24 -07:00
Eric Anholt
090de17d36 ephyr: Garbage collect some dead XV clipping code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:21 -07:00
Eric Anholt
347d0fa696 ephyr: Remove the helper libs for each of the optional components.
Note that EXTRA_DIST was always unnecessary, because automake notices
conditional compile of source files and includes them.

Copyright header is added because git noted that this was a 61%
rewrite.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:18 -07:00
Eric Anholt
74dff87790 ephyr: Remove the remaining bits of host/server XV split.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:14 -07:00
Eric Anholt
2f994dfe9d ephyr: Remove the host/server split of the actual XV video operations.
I suspect there's more cleanup possible in ephyrHostXVPutImage() by
sticking a bunch of the args in the port priv earlier.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:11 -07:00
Eric Anholt
0b7ce74315 ephyr: Remove another host/server split for XV image formats.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:09 -07:00
Eric Anholt
1dcc28bcb4 ephyr: Remove the host/server split for video encodings.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:06 -07:00
Eric Anholt
28a37757e1 ephyr: Remove the host/server split for XV formats.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:04 -07:00
Eric Anholt
41134d393a ephyr: Remove the host/server split for XV attributes.
v2: Fix leaks of xcb replies (caught by Julien)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:35:01 -07:00
Eric Anholt
1342a93c49 ephyr: Remove the host/server split for XV adaptors.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:59 -07:00
Eric Anholt
fad79d2e3e ephyr: Refactor XV adaptor feature detection.
This obviously wanted a helper function beforehand, but even more so
now that we have XCB.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:56 -07:00
Eric Anholt
7a9c311add ephyr: Remove some pointless indirection in the XV code.
Now that we have XCB on the server side, we don't need to split these
functions out.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:53 -07:00
Eric Anholt
46cf6bf569 ephyr: Move event processing into ephyr.c.
No more extra event structure to translate between hostx.c and
ephyr.c!

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:51 -07:00
Eric Anholt
847c856eff ephyr: Move the host screen info into the kdrive screen private.
We can include xcb bits from the same place as server headers, so
there's no need to hide them any more.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:48 -07:00
Eric Anholt
8dadc78e23 ephyr: Rename and use the proper type for what was host_screen->info.
Now that we can include server headers in talking to host X, we don't
need to hide any more.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:46 -07:00
Eric Anholt
18d836f6dd ephyr: Expose a single function for detecting extensions.
v2: Fix trying to include xcb-dri in the non-dri-build case (Noted by
    Julien)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:41 -07:00
Eric Anholt
3aacb22d64 ephyr: Drop dead ephyrHostAtomToLocal code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03 14:34:32 -07:00
Julien Cristau
4aaad0bfbc Xephyr: we're not using Xlib anymore, no need to undef _XSERVER64
Drop obsolete comments about interaction between Xlib code and that
macro, and stop undefining it.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:02:03 -07:00
Julien Cristau
0fc2f9f04a Xephyr: handle errors in event loop
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2013-09-03 11:02:03 -07:00
Julien Cristau
3309a73c82 Xephyr: drop remaining Xlib dependency
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:02:03 -07:00
Julien Cristau
7da2174cf9 Xephyr: move glx code to xcb
v2: Rebase on master, notably adding XCB for
    X_GLXvop_MakeCurrentReadSGI (anholt).
v3: Fix use-after-free (caught by Julien).

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:01:40 -07:00
Julien Cristau
19c2699b95 Xephyr: remove unused DRI1 code
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:01:00 -07:00
Julien Cristau
68b7db19e8 Xephyr: move ephyrdri over to xcb
Require new xcb-xf86dri to get fixed GetDrawableInfo.

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:01:00 -07:00
Julien Cristau
aea119cd05 Xephyr: use xcb-xv instead of libXv
v2: Massive, conflict-filled rebase.  I think I resolved everything
    right, but this host xv code makes my eyes bleed.  Touch-tested XV
    after the rebase (anholt).

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:00:59 -07:00
Julien Cristau
3ea75a59d5 Xephyr: use xcb for event handling
v2: Rebase on indentation changes, squash in a simpler variant of the
    later event compression patch, fix server hang or segfault on
    window close by reimplementing the x_io_error_handler in the new
    XCB event loop (anholt).

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:00:59 -07:00
Julien Cristau
ff26845252 Xephyr: some more hostx.c xcb-ification
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
9b55f76a26 Xephyr: move HostX.visual to xcb
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
126312fb4a Xephyr: replace XKeycodeToKeysym with xcb-keysyms
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
8543d3fdfd Xephyr: delete unused hostx_get_extension_info function
v2: Also remove the prototype (anholt)

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:00:59 -07:00
Julien Cristau
d72c11b9df Xephyr: delete unused proxy code
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
a71ea3f967 Xephyr: xcb-ify visual list construction
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
ac2b0348c0 Xephyr: xcb-ify pointer/keyboard grab
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
1f93e6b350 Xephyr: no need for XDisplayKeycodes
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
73398e5bf6 Xephyr: use xcb-shape instead of XShape*
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2013-09-03 11:00:59 -07:00
Julien Cristau
a2b73da78d Xephyr: start converting hostx.c over to xcb
v2: Dropped the hostx_load_keymap changes, now that that function is
    gutted (anholt).

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:00:59 -07:00
Julien Cristau
762606b4cd Xephyr: stop loading the host's keymap
This isn't used anywhere.

v2: Rebase to the top of the patch series (anholt)

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> (v1)
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03 11:00:59 -07:00
Marc Haesen
3752a81580 hw/xwin: Remove unnecessary and incorrect HWND casts
Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-08-30 14:22:22 +01:00
Jon TURNEY
34932cef6c hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration
/jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:08 +01:00
Jon TURNEY
2a08554a0b hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:06 +01:00
Jon TURNEY
69401f38a6 hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout()
Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual
definition immediately follows.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:03 +01:00
Jon TURNEY
9c45a1ad44 hw/xwin: Remove prototype for non-existent winDeinitClipboard()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:00 +01:00
Jon TURNEY
acc46fc217 hw/xwin: Remove unused externs from winclipboardwrappers.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:58 +01:00
Jon TURNEY
fcc7767f8c hw/xwin: Remove unused winProcQueryTreeOrig variable
Unused since 47c7b6d3e6 "Remove no-longer needed
tricks used to prevent the clipboard client from being killed"

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:56 +01:00
Jon TURNEY
8fa882a980 hw/xwin: Fix ARGB cursor conversion on x86_64
Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which
leads to ARGB cursors being vertically streched on x86_64 by interleaving blank
rows of pixels.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:54 +01:00
Jon TURNEY
4bfb2dce5e hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds
The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we
access two (black and white for a mono-color DIB).  Fix by changing to a dynamic
allocation big enough for a BITMAPINFO and a RGBQUAD.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:51 +01:00
Jon TURNEY
784c006adb hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR()
Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't
trigger an -Warray-bounds warning.

Note that the underlying storage is allocated as a BITMAPV4HEADER, so has
sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader.

wincursor.c: In function 'winSetCursor':
wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:49 +01:00
Marc Haesen
41d03c9ccc hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64
Use the correct size of a HWND on x86_64 in XChangeProperty() and
XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property.

Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-08-30 12:58:15 +01:00
Colin Harrison
390cfec10e hw/xwin: Correct winprefs.c function signatures for x64.
Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and
HandleCustomWM_COMMAND() function signatures which use unsigned long parameters,
where just a specific HWND or HMENU handle type should have been used.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:56:35 +01:00
Jon TURNEY
e716baedc4 Move pseudoramiX code where it can be shared between Xwin and Xquartz
Move pseudoramiX code to a separate top-level directory.  Link Xwin and Xquartz
with libPseudoramiX

I'm not sure moving this to a top-level directory is appropriate, but I'm not
sure where else it fits.

Future work: pseudoramiX can probably be consolidated with the rrxinerama code
(which I think provides fake xinerama data when real XINERAMA is disabled and we
only have one screen)

v2: fix distcheck

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:30 +01:00
Jon TURNEY
ce0217b982 hw/xwin: Fix winglobals.h for MinGW64 build
Include pthread.h in winglobals.h to fix build with latest MinGW64 headers

In file included from
winmultiwindowicons.c:47:0:
winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:27 +01:00
Jon TURNEY
b27756dbe6 hw/xwin: Fix inclusion of shlobj.h in MinGW64 build
Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well

In file included from InitOutput.c:51:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’
/usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:24 +01:00
Eric Anholt
e01a3f65d3 ephyr: Fix warning about XID vs unsigned long * by changing function args
There's no reason to pass the data back out to the caller, since the
caller was dropping it on the floor.  The original data is a CARD32,
so no need to mess with weird unsigned longs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:49 -07:00
Eric Anholt
f1cefe020b ephyr: Drop is_ok logging.
The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it
fixes set-but-unused compiler warnings.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:48 -07:00
Eric Anholt
77c7a2014e kdrive: Fix const cast warnings in arguments processing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:46 -07:00
Eric Anholt
7107937e47 kdrive: Fix const cast warnings in driver name handling.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:45 -07:00
Eric Anholt
56c405d46a kdrive: Fix a few easy cast warnings.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:44 -07:00
Eric Anholt
a9c48a07ee kdrive: Drop dead code.
This is unused as of the introduction of a helper in
e7150db535

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:41 -07:00
Eric Anholt
873ae962bd ephyr: Fix dead code warning.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:39 -07:00
Eric Anholt
34af2eebe1 ephyr: Fix const-cast warnings for setting window title.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:37 -07:00
Eric Anholt
7edf5066db ephyr: Fix const cast warnings in ephyrhostvideo.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:34 -07:00
Peter Hutterer
9680f6a12d xfree86: de-duplicate some AM_CPPFLAGS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:14:56 +10:00
Peter Hutterer
bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Julien Cristau
c218ba8423 xfree86: improve check for posix saved ids
Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
the _POSIX_SAVED_IDS macro.

Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-06 13:03:25 +10:00
Dave Airlie
e1ab8f239b xfree86/man: document AutoAddGPU
This at least mentions AutoAddGPU and hints at when you might
want to disable it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-01 14:45:56 +10:00
Aaron Plattner
bdd1e22cbd xfree86: detach scanout pixmaps when detaching output GPUs
Commit 8f4640bdb9 fixed a bit of a
chicken-and-egg problem by detaching GPU screens when their providers
are destroyed, which happens before CloseScreen is called.  However,
this created a new problem: the GPU screen tears down its RandR crtc
objects during CloseScreen and if one of them is active, it tries to
detach the scanout pixmap then.  This crashes because
RRCrtcDetachScanoutPixmap tries to get the master screen's screen
pixmap, but crtc->pScreen->current_master is already NULL at that
point.

It doesn't make sense for an unbound GPU screen to still be scanning
out its former master screen's pixmap, so detach them first when the
provider is destroyed.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-07-25 11:15:53 -07:00
Jon TURNEY
43ac0491e3 hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers
Numerous pieces of debug output cast a pointer to an int and then use a "%08x"
printf format.

Use "%p" format for 64-bit portability.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:44 +01:00
Colin Harrison
e95bb97073 hw/xwin: Fix possible crash in winMultiWindowGetClassHint
Fix a possible crash in winMultiWindowGetClassHint() when an application doesn't
null terminate the WM_CLASS property class name (which is an ICCCM conformance
bug in the application)

(Reported for running the contiki cooja simulator in multiwindow mode, although
it seems that many Java clients may have this problem, see [1])

Based on a patch by Marc Haesen.

v2: Avoid using strnlen() which is missing on MinGW
v3: Align with Xming patch

[1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6961123

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-07-23 23:59:41 +01:00
Jon TURNEY
4bc375aa2f hw/xwin: Remove obsolete WIN_XEVENTS_SHUTDOWN
Remove obsolete WIN_XEVENTS_SHUTDOWN.  This event is never generated.

(I think the idea was to listen for WM_DELETE_WINDOW, but that's not a very
useful thing to do for a hidden window.)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:37 +01:00
Jon TURNEY
2663203cd6 configure.ac: Check for python at configure time when building XWin with AIGLX
Check for python at configure time when building XWin with AIGLX, it's used to
generate the wrapper code for native GL functions.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:34 +01:00
Jon TURNEY
9fe360bf2b hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha()
Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in
NetWMToWinIconAlpha()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:31 +01:00
Jon TURNEY
71b5f56302 hw/xwin: Handle WM_MOUSEHWHEEL
Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll
wheel messages, to generate X button 6 and 7 presses and releases.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:27 +01:00
Jon TURNEY
cf9c777ee0 hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9
Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X
buttons 6 and 7 for tilt wheel.

Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a
dynamic allocation to a fixed one of the required size for all the labels we
use.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:24 +01:00
Jon TURNEY
c9d7b9516f hw/xwin: Remove unneeded WM_XBUTTON message defines
Remove unneeded WM_XBUTTON message defines, they have been provided by w32api
for a long time now.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:21 +01:00
Jon TURNEY
5dccfc63f9 hw/xwin: Change winTranslateKey() to return it's result as it's return value
Change winTranslateKey() to return it's result as it's return value, and change
it's uses as well.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:18 +01:00
Oliver Schmidt
9b4cec76f1 hw/xwin: Consider left and right modifier keys independently on gaining focus
Handle left and right ctrl and shift keys independently

Assume that all modifiers are cleared when all keys are released on focus lost,
as internalKeyState doesn't record which modifier key was pressed.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:14 +01:00
Jon TURNEY
235149d0b4 hw/xwin: Remove an extra '\n' from some log messages
Remove an extra '\n' from internal client IOError log messages

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:11 +01:00
Jon TURNEY
c7aa9f7578 hw/xwin: _NET_WM_STATE is ATOM[] not ATOM
_NET_WM_STATE is ATOM[] not ATOM, a list of window state hints, so check all of
the atoms, not just the first one

See EWMH specifcation, section "Application Window Properties"

v2: Actually use [] on the returned atom data

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:59:08 +01:00
Jon TURNEY
682ccac90b hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread
Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But
for the X server to exit cleanly, we also need the X server dispatch loop to be
unblocked so it can notice that DE_TERMINATE has been set and exit, removing
it's lock file and any unix domain socket.

It appears that the system will terminate the process when the last UI thread in
that process returns from processing WM_ENDSESSION for the last top-level
window.

Since WM_ENDSESSION appears to sent by the system via SendMessage()
(synchronously) and the wndproc is called to process it in the message thread
for that window (the X server thread), we can't easily terminate the X server
dispatch loop from inside the WM_ENDSESSION message processing.

So, create a messaging window, a hidden, top-level window, with a separate
thread to catch this message, and process it by calling GiveUp() and then
blocking on a mutex until the X server dispatch loop exits.

Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no
action.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:58:50 +01:00
Jon TURNEY
15febb05d7 Allow DDX to provide a main()
XQuartz already conditionally renames main() as dix_main() so it can provide
it's own main().  This isn't the ideal way of doing this, as it prevents libdix
built this way from being useful with any other DDX.

So instead, always name that function dix_main(), and also provide a stub main()
which just calls dix_main(), which can be overriden in the DDX.

Add a main() to XWin (XQuartz already has one, of course).

It's no longer neccessary to link XWin and XQuartz with libmain.

v2: Remove unneeded stub main hw/xwin/InitOutput.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-07-23 23:56:58 +01:00
Keith Packard
d5ebe20f9b Merge remote-tracking branch 'alanc/master' 2013-07-22 20:34:41 -07:00
Peter Hutterer
21ea7ebb6a dix: scale y back instead of x up when pre-scaling coordinates
The peculiar way we handle coordinates results in relative coordinates on
absolute devices being added to the last value, then that value is mapped to
the screen (taking the device dimensions into account). From that mapped
value we get the final coordinates, both screen and device coordinates.

To avoid uneven scaling on relative coordinates, they are pre-scaled by
screen ratio:resolution:device ratio factor before being mapped. This
ensures that a circle drawn on the device is a circle on the screen.

Previously, we used the ratio to scale x up. Synaptics already does its own
scaling based on the resolution and that is done by scaling y down by the
ratio. So we can remove the code from the driver and get approximately the
same behaviour here.

Minor ABI bump, so we can remove this from synaptics.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Emmanuel Benisty <benisty.e@gmail.com>
2013-07-22 14:18:30 +10:00
Thomas Klausner
33f7e60785 Fix typo in header guard.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:11:41 -07:00
Alan Coopersmith
ddc52b9cba Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData
Simplifies code and reduces risk of overflow from converting length
field in X replies from words to bytes.

One call to _XEatData is left in ephyrHostGLXGetStringFromServer where
it's already been checked for overflow, and other values have been
subtracted from it to reduce the size of data remaining to be eaten.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:41 -07:00
Alan Coopersmith
a3d43edf71 glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData
Reduces risk of overflow from converting length field in X replies
from words to bytes.   (Also seems to be what several calls were
already incorrectly passing to _XEatData.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:41 -07:00
Alan Coopersmith
87b0cabc14 glxproxy: Use _XReadPad instead of _XEatData to clean up the slop
Xlib already provides a function to eat padding bytes after the
data read, so use it instead of calculating it ourselves.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:41 -07:00
Alan Coopersmith
1cb182cbdc Xephyr: integer overflow in XF86DRIGetClientDriverName()
clientDriverNameLength is a CARD32 and needs to be bounds checked before
adding one to it to come up with the total size to allocate, to avoid
integer overflow leading to underallocation and writing data from the
network past the end of the allocated buffer.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-07-17 18:10:40 -07:00
Alan Coopersmith
20644e53b3 Xephyr: integer overflow in XF86DRIOpenConnection()
busIdStringLength is a CARD32 and needs to be bounds checked before adding
one to it to come up with the total size to allocate, to avoid integer
overflow leading to underallocation and writing data from the network past
the end of the allocated buffer.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-07-17 18:10:40 -07:00
Alan Coopersmith
c37ceda76b Xephyr: integer overflow in ephyrHostGLXGetStringFromServer()
reply.length & reply.size are CARD32s and need to be bounds checked before
multiplying or adding to come up with the total size to allocate, to avoid
integer overflow leading to underallocation and writing data from the
network past the end of the allocated buffer.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:40 -07:00
Alan Coopersmith
5fbd8c45b4 Xdmx: integer overflow in GetGLXFBConfigs()
numFBConfigs & numAttribs are CARD32s and need to be bounds checked before
multiplying by structure sizes to come up with the total size to allocate,
to avoid integer overflow leading to underallocation and writing data from
the network past the end of the allocated buffer.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:40 -07:00
Alan Coopersmith
c89bcd12f4 Xdmx: integer overflow in GetGLXVisualConfigs()
numVisuals & numProps are both CARD32 and need to be bounds checked before
multiplying by structure sizes to come up with the total size to allocate,
to avoid integer overflow leading to underallocation and writing data from
the network past the end of the allocated buffer.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-17 18:10:40 -07:00
Peter Hutterer
74469895e3 dix: allow a ConstantDeceleration between 0 and 1 (#66134)
A constant deceleration of x simply means (delta * 1/x). We limited that to
values >= 1.0f for obvious reasons, but can also allow values from 0-1.
That means that ConstantDeceleration is actually a ConstantAcceleration, but
hey, if someone needs it...

X.Org Bug 66134 <http://bugs.freedesktop.org/show_bug.cgi?id=66134>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-07-17 14:27:26 +10:00
François Tigeot
791121e006 Fix mouse header include on DragonFly and FreeBSD
*  __FreeBSD_kernel_version doesn't exist anymore

* The removed check was for FreeBSD versions from before September 2000
  which are no longer supported anyway

* Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66045

Signed-off-by: François Tigeot <ftigeot@wolfpond.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-17 14:27:26 +10:00
Eric Anholt
77e51d5bbb Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes"
This reverts commit 3209b094a3.  After a
long debug session by Paul Berry, it appears that this was the commit
that has been producing sporadic failures in piglit front buffer
rendering tests for the last several years.

GetBuffers may return fresh buffers with invalid contents at a couple
reasonable times:

- When first asked for a non-fake-front buffer.
- When the drawable size is changed, an Invalidate has been sent, and
  obviously the app needs to redraw the whole buffer.
- After a glXSwapBuffers(), GL allows the backbuffer to be undefined,
  and an Invalidate was sent to tell the GL that it should grab these
  appropriate new buffers to avoid stalling.

But with the patch being reverted, GetBuffers would also return fresh
invalid buffers when the drawable serial number changed, which is
approximately "whenever, for any reason".  The app is not expecting
invalid buffer contents "whenever", nor is it valid.  Because the GL
usually only GetBuffers after an Invalidate is sent, and the new
buffer allocation only happened during a GetBuffers, most apps saw no
problems.  But apps that do (fake-)frontbuffer rendering do frequently
ask the server for the front buffer (since we drop the fake front
allocation when we're not doing front buffer rendering), and if the
drawable serial got bumped midway through a draw, the server would
pointlessly ditch the front *and* backbuffer full of important
drawing, resulting in bad rendering.

The patch was originally to fix bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=28365
Specifically:

    To reproduce, start with a large-ish display (i.e. 1680x1050 on my
    laptop), use the patched glxgears from bug 28252 to add the
    -override option.  Then run glxgears -override -geometry 640x480
    to create a 640x480 window in the top left corner, which will work
    fine.  Next, run xrandr -s 640x480 and watch the fireworks.

I've tested with an override-redirect glxgears, both with vblank sync
enabled and disabled, both with gnome-shell and no window manager at
all, before and after this patch.  The only problem observed was that
before and after the revert, sometimes when alt-tabbing to kill my
gears after completing the test gnome-shell would get confused about
override-redirectness of the glxgears window (according to a log
message) and apparently not bother doing any further compositing.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-06-18 10:54:22 -07:00
Jon TURNEY
80054fcafb hw/xwin: Update manifest to target all architectures, not just x86
Update manifest to target all architectures, not just x86

Also: Write explicit dependencies for Xwin.rc.  XWin.exe.manifest and X.ico are
included the resource compiler output, so add a dependency on them to cause it
to be recompiled if they change.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:48:34 +01:00
Jon TURNEY
689e7ad9b0 hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type
Win32 Windows properties are of pointer type HANDLE, not an integer type, but we
use the Windows property WINDOW_WID_PROP to store the X window XID.

Add appropriate casts to show it doesn't matter that an XID is smaller than a
pointer on 64-bit build.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:48:31 +01:00
Jon TURNEY
e1a0945e8d hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr
winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is
an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:48:08 +01:00
Jon TURNEY
be201ac257 hw/xwin: Change winIconIsOverride() to take a HICON parameter
Change winIconIsOverride() to take a HICON parameter, so some unneccessary
casts, which weren't portable to 64-bit Cygwin, can be removed.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:25:44 +01:00
Jon TURNEY
fc40f9a92c hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds
Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds

dwInitParam parameter is LPARAM, not int
Return type of DLGPROC is INT_PTR, not WINBOOL

Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we
are just interested in GetLastError() if it is NULL

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:21:14 +01:00
Jon TURNEY
b542976846 hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin
The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit
cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's
path we are converting haven't existed for a while, so just remove this unused,
cygwin-specific code.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:18:26 +01:00
Jon TURNEY
5a47c6420c hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer
Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute()
to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-06-10 15:15:44 +01:00
Keith Packard
c76a1b343d Merge remote-tracking branch 'whot/touch-grab-race-condition-56578-v3' 2013-05-23 19:58:36 -06:00
Peter Hutterer
9a5ad65330 Abstract cursor refcounting
Too many callers relied on the refcnt being handled correctly. Use a simple
wrapper to handle that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-15 19:17:57 +10:00
Peter Hutterer
49521edaf8 ephyr: add -resizeable to the man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-15 09:36:00 +10:00
Peter Hutterer
7a4bbfd9f2 ephyr: fix typo in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-15 09:35:59 +10:00
Keith Packard
2746c68163 Merge remote-tracking branch 'alanc/master' 2013-05-06 10:52:40 -07:00
Keith Packard
1e6cf8ec20 Merge remote-tracking branch 'jturney/unused-but-set-variable-warning-fix' 2013-05-06 10:20:21 -07:00
Aaron Plattner
dbfeaf7062 xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
There's no point in turning on outputs connected to GPU screens during initial
configuration.  Not only does this cause them to just display black, it also
confuses clients when these screens are attached to a master screen and RandR
reports that the outputs are already on.

Also, don't print the warning about no outputs being found on GPU screens,
since that's expected.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@gmail.com>
2013-05-06 09:34:27 +10:00
Jon TURNEY
5860408a19 hw/xwin: Fix unused-but-set-variable warning in ProcWindowsWMFrameGetRect()
/jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c: In function ‘ProcWindowsWMFrameGetRect’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c:322:12: error: variable ‘ir’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:29 +01:00
Jon TURNEY
bcfd523c15 hw/xwin: Fix unused-but-set-variable warning in winMWExtWMUpdateWindowDecoration()
/jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c: In function ‘winMWExtWMUpdateWindowDecoration’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c:189:11: error: variable ‘dwStyle’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:27 +01:00
Jon TURNEY
fbf819c24d hw/xwin: Fix unused-but-set-variable warning in winHotKeyAltTabPrimaryDD()
/jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c: In function ‘winHotKeyAltTabPrimaryDD’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c:518:20: error: variable ‘rcSrc’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:25 +01:00
Jon TURNEY
7dae1e59ce hw/xwin: Fix unused-but-set-variable warning in winMinimizeWindow() when built !XWIN_MULTIWINDOWEXTWM
/jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c: In function ‘winMinimizeWindow’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c:813:20: error: variable ‘pScreenInfo’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:23 +01:00
Jon TURNEY
b284666f09 hw/xwin: Fix unused-but-set-variable warning in winClipboardProc()
/jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c: In function ‘winClipboardProc’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c:88:25: error: variable ‘atomClipboardManager’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:22 +01:00
Jon TURNEY
d414a09bb7 hw/xwin: Fix unused-but-set-variable warning in winWindowProc()
/jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c: In function ‘winWindowProc’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c:65:22: error: variable ‘s_hInstance’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:20 +01:00
Jon TURNEY
7726102671 hw/xwin: Fix unused-but-set-variable warning in winCopyWindowNativeGDI()
/jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c: In function ‘winCopyWindowNativeGDI’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c:131:15: error: variable ‘pwinRoot’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:18 +01:00
Jon TURNEY
b9a2566a6e hw/xwin: Fix unused-but-set-variable warning in winFinishScreenInitFB()
/jhbuild/checkout/xorg/xserver/hw/xwin/winscrinit.c:264:11: error: variable ‘pbits’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:16 +01:00
Jon TURNEY
c97fbd39ad hw/xwin: Fix unused-but-set-variable warning in winIsFakeCtrl_L()
/jhbuild/checkout/xorg/xserver/hw/xwin/winkeybd.c:331:17: error: variable ‘lastMessage’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:14 +01:00
Jon TURNEY
cdb74fe17d hw/xwin: Fix unused-but-set-variable warnings in windialog.c
/jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’:
/jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable]
/jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’:
/jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-05-02 15:43:12 +01:00
Dave Airlie
f2fd8ec372 gpu: call CreateScreenResources for GPU screens
I didn't think we needed this before, but after doing some more
work with reverse optimus it seems like it should be called.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-30 10:10:51 +10:00
Dave Airlie
16077b81c5 xf86crtc: don't use scrn->display for gpu screens
scrn->display is a property of the main screen really, and we don't
want to have the GPU screens use it for anything when picking modes
or a front buffer size.

This fixes a bug where when you plugged a display link device, it
would try and allocate a screen the same size as the current running
one (3360x1050 in this case), which was too big for the device. Avoid
doing this and just pick sizes based on whats plugged into this device.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-30 10:10:23 +10:00
Dave Airlie
9d26e8eaf5 randr: report changes when we disconnect a GPU slave
When we disconnect an output/offload slave set the changed bits,
so a later TellChanged can do something.

Then when we remove a GPU slave device, sent change notification
to the protocol screen.

This allows hot unplugged USB devices to disappear in clients.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-30 10:08:43 +10:00
Chris Wilson
451ba4bd41 hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails
commit 6703a7c7cf
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Jan 8 20:24:32 2013 -0800

    hw/xfree86: Require only one working CRTC to start the server.

changed the logic to try to set the mode on all connected outputs rather
than abort upon the first failure. The return error code was then
tweaked such that it reported success if it set a mode on any crtc.
However, this confuses the headless case where we never enable any crtcs
and also, importantly, never fail to set a crtc.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Also-written-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-04-29 09:10:06 -07:00
Alan Coopersmith
9878e097a7 Only call xf86platformVTProbe() when it's defined
Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only
defined in configure.ac if $CONFIG_UDEV_KMS is true.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2013-04-25 21:44:09 -07:00
Alan Coopersmith
2b361fbda5 sparcPromPathname2Node: free name when returning error, instead of leaking it
Reported with other leaks found by cppcheck in bugzilla #50281
https://bugs.freedesktop.org/show_bug.cgi?id=50281

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-24 14:22:36 -07:00
Alan Coopersmith
174ccd8493 xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error
Reported with other leaks found by cppcheck in bugzilla #50281
https://bugs.freedesktop.org/show_bug.cgi?id=50281

V2: check for malloc failure

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-24 14:22:36 -07:00
Alan Coopersmith
6bca0184d1 dmxVDLRead: if we opened a file, close it instead of leaking it
Reported with other leaks found by cppcheck in bugzilla #50281
https://bugs.freedesktop.org/show_bug.cgi?id=50281

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-24 14:22:36 -07:00
Keith Packard
7ab98bafc9 Merge remote-tracking branch 'geertu/master' 2013-04-24 14:14:45 -07:00
Keith Packard
53da26afb7 Merge remote-tracking branch 'whot/for-keith' 2013-04-24 10:27:19 -07:00
Keith Packard
5ece86e921 Merge remote-tracking branch 'airlied/for-keithp-gpu-vt-owner' 2013-04-24 10:23:51 -07:00
Jeremy White
ef0a726bc8 Eliminate the use of xf86Rename.h
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-04-24 10:22:20 -07:00
Geert Uytterhoeven
5ab260317a Xfbdev: Wire up Amiga afb4 and afb8 support
Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Keith Packard <keithp@keithp.com>
2013-04-18 13:10:26 +02:00
Geert Uytterhoeven
672bc5bb38 Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support
Add support for Atari-style interleaved bitplanes, with 2 bytes interleave
and 4 or 8 bits per pixel.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18 13:10:26 +02:00
Geert Uytterhoeven
95a3c7536c Xfbdev: Force shadowfb for frame buffers with non-packed pixels
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18 13:10:26 +02:00
Geert Uytterhoeven
0e808110df Xfbdev: Reject unsupported frame buffer types
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-18 13:10:26 +02:00