Commit Graph

7036 Commits

Author SHA1 Message Date
George Staplin
c7e3383309 XQuartz: GL: Fix a bug with an uninitialized GLX data structure.
This was causing a crash randomly, due to random memory contents.
Use xcalloc to prevent this in the future, due to future changes or mistakes.

Set the drawableType to include GLX_PIXMAP_BIT and GLX_PBUFFER_BIT.
The new libGL supports these.

Set the max Pbuffer width/height, based on the results of a test program.
We may someday want to revisit this depending on what users need, so that
we create a CGLContextObj, make it current, and call glGetIntegerv to
gather the information at runtime.
2009-02-21 22:22:52 -07:00
George Staplin
295fe25bd8 XQuartz: Fix the new ProcAppleDRIDestroyPixmap code REQUEST_SIZE_MATCH.
It had a copy and paste mistake that I didn't notice. :/
It was using the CreatePixmapReq.

Also add a missing B16 to the end of the length for the DestroyPixmapReq struct.

Now the AppleDRIDestroyPixmap request seem to work.
2009-02-18 21:43:19 -07:00
Jeremy Huddleston
dc212ecab7 1.5.99.903-apple1 2009-02-17 23:26:02 -08:00
Jeremy Huddleston
43967514cd configure.ac: Support version strings like W.X.Y.Z-XXXXXX 2009-02-17 23:25:14 -08:00
Jeremy Huddleston
066b17028a XQuartz: Don't need GlxSetVisualConfig any more
Fixes build failure resulting from 516f8e2cad
2009-02-17 23:24:25 -08:00
Jeremy Huddleston
3384276e9d Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple 2009-02-17 22:34:30 -08:00
Keith Packard
eca523e7e7 Bump to 1.5.99.903 2009-02-17 22:17:41 -08:00
Keith Packard
a86dd529e9 Eliminate the shadow clear on transform change
When the crtc transformation changes, the entire crtc must be repainted.
This was being done by clearing the shadow and then painting the rectangle
containing the screen image; the clear being required as the screen image
may not fill the crtc. When changing the transform rapidly, this leads to
flashing. Eliminate the clear by painting the entire crtc instead of just
the screen rectangle.

(cherry picked fom commit 5394b7e662)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 21:41:42 -08:00
Keith Packard
5946d603e7 Add XkbDir to Files config file section
The XKB base directory was not configuable through the config file.

(cherry picked from commit 76f18b94bd)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:12:44 -08:00
Adam Jackson
39eb1bee84 RANDR: Fail softly on GetPanning if the screen can't do it.
Just return a zeroed-out reply in that case.  This is unambiguous, and
distinguishes "you didn't name a CRTC" from "you named a CRTC that can't
do panning".
(cherry picked from commit 1230939965)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:11:30 -08:00
Paulo Cesar Pereira de Andrade
69a2728891 Default to use standard bitmap fonts, with builtins as fallback
The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
  This should be a more reasonable solution, to "correct" the most
common Xorg FAQ (could not open default font 'fixed'), and also don't
break by default applications that use only the standard/historical
X Font rendering.
(cherry picked from commit 49b93df8a3)

    Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:10:14 -08:00
Alan Hourihane
444127f9f4 glx: fix retval checks when failures occur for drawable creation.
(cherry picked from commit a26c77ff43)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:07:52 -08:00
Keith Packard
4302a32391 Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse
Drivers not using the new hw/xfree86/modes code would crash in DRI due to
that code trying to monitor CRTC changes.

(cherry picked from commit ea309e4745)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:07:13 -08:00
Jeremy Huddleston
09cde70a6b XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard
(cherry picked from commit 8620579483)
(cherry picked from commit 0dbc356795)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:43 -08:00
Jeremy Huddleston
6bbe98f01d XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT
(cherry picked from commit e01662cadc)
(cherry picked from commit fd08be749e)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:37 -08:00
Jeremy Huddleston
519ae3a0df XQuartz: Don't need explicit Activate/EnableDevice in InitInput
(cherry picked from commit b1d2978441)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:02:28 -08:00
Alan Coopersmith
ada58b69ca x11-input.fdi: Add options needed to handle adding USB devices on Solaris
(cherry picked from commit 60bcdd6870)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:01:35 -08:00
Eric Anholt
516f8e2cad glx: Replace broken GLX visual setup with a fixed "all" mode.
With trying to match depths so that you didn't end up with a depth 24
fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth
24 X visual, which angered other applications.  But in fixing that, the
pickFBconfigs code for "minimal" also could end up breaking GLX visuals if
the same FBconfig was chosen for more than one X visual.
We have no reason to not expose as many visuals as possible, but the old
"all" mode didn't match any existing X visuals to GLX visuals, so normal
GL apps didn't work at all.

Instead, replace it with a simple combination of the two modes: Create GLX
visuals by picking unique FBconfigs with as many features as possible for
each X visual in order.  Then, for all remaining FBconfigs that are
appropriate for display, add a corresponding X and GLX visual.

This gets all applications (even ones that aren't smart enough to do FBconfigs)
get all the options to get the visual configuration they want.  The only
potential downside is that the composite ARGB visual is unique and gets a
nearly full-featured GLX visual (except that the root visual might have taken
the tastiest FBconfig), which means that a dumb compositing manager could
waste resources. Write compositing managers using FBconfigs instead, please.
(cherry picked from commit c40bad88475debf7a1774e22dce835577ad32154)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:00:41 -08:00
Eric Anholt
8b967b2469 glx: Don't match fbconfigs to visuals with mismatched channel masks.
This fixes at least one known bug, where the depth 32 visual would end up
with a depth 24 fbconfig attached, angering compiz.
(cherry picked from commit 5100d829a4)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 19:00:30 -08:00
Keith Packard
7fdaca6446 mi: force the paired kbd device before CopyKeyClass. (#19574)
Some multi-media keyboards send the key events for multimedia keys through
the device file used by the mouse. Sending a key event through the VCP
however will fail. The VCP doesn't have a key class so the server crashes or
(with an appropriate fix) the event is simply swallowed.

Thus, for key events if the master does not have a key class, get the device
paired with the master (i.e. the VCK) before processing the event any
further.

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

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 18:57:13 -08:00
Peter Hutterer
a9dd41de7e mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668
In Xinerama all windows hang off the first root window. Crossing the screens
must not reset the spriteTrace, otherwise picking fails and events are sent to
the root window.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9fe9b6e4ef)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 18:52:31 -08:00
Keith Packard
536748aa88 Merge branch 'panning-for-server-1.6' into server-1.6-branch 2009-02-17 18:52:04 -08:00
Paulo Cesar Pereira de Andrade
8c6ddbf754 Correct static symbol XkmReadTOC and first pass on compile warning fixes.
The warnings corrected were only the ones that should correct
real problems. The most common one is 64 bit integers as
"printf %l" arguments.
  Note that there is a patch related to this at:
http://bugs.freedesktop.org/show_bug.cgi?id=18204

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 16b11cd03d)
2009-02-17 15:49:06 -08:00
Peter Hutterer
0c9db0ea10 xfree86: always force RAW mode under linux.
The previous check for AEI on left us with the possibility that AEI is forced
off in the config, but devices are added through evdev nonetheless. A keyboard
added this way can CTRL+C the server. Even when we use kbd, we can set the
mode to RAW, so it's safer alround to to so.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b339052340)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:49:50 -08:00
Alan Coopersmith
3284b03dca Check for and report errors writing xorg.conf.new from Xorg -configure
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit ac470dfb4f)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:48:19 -08:00
Alan Coopersmith
caf503aef1 Correct error message if specified config file is not found
By making the "Unable to open config file" header a warning, it was
not appearing with the filename when a config file was specified and
not found.   Now we make it an error message again, but only issue
the error if a filename was specified - if none was specified, then
we don't even issue a warning, just the "Using autoconfig" info message.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit bd713794ce)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:47:43 -08:00
Keith Packard
791c6eccee Handle the combination of panning and crtc transforms
This patch gets the shadow scanout buffer repainted on panning area changes.
It does not, however, track the mouse correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7968823cbc)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:43:25 -08:00
Keith Packard
099d74a127 Damage re-used shadow scanout buffer using new transforms.
When the shadow scanout buffer can be re-used, the underlying framebuffer
area must be damaged so that the scanout will be repainted. This patch
delays the addition of that damaged area until after the transform in the
crtc has been updated, otherwise the old transform would have been used and
the wrong area repainted.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 763df9eec7)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:43:25 -08:00
Keith Packard
4992c31e6c Handle matrix computation overflow in RRTransformCompute
If the computation of the composite fixed-point transform for RandR
overflows at any point, take the resulting floating point transform and
scale that back to fit in a fixed point matrix. This ensures that a matrix
will always be available, although perhaps at reduced precision. Someday we
should add floating point matrices to Render.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 62fc98cb88)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-17 14:43:25 -08:00
George Staplin
7e99b55651 XQuartz: Add driWrap.h that I missed in the last commit.
This should complete the GLXPixmap commits for now.
2009-02-16 17:33:19 -07:00
George Staplin
630518766b XQuartz: Add support for GLXPixmaps to the AppleDRI.
This involved wrapping some GCOps to get the proper behavior
when using X11 raster ops mixed with OpenGL (see driWrap.c).

This extends the AppleDRI protocol with create and destroy pixmap
functions.

The dri.c code has been extended quite a bit to enable this, and
to initialize the wrapping of CreateGC for GCOps.

This has been tested with tests/glxpixmap and proven to work with
the new libGL.  Existing applications seem to work fine too. Redraws
all appear to be correct.

There may be some bugs lurking that I haven't found yet.  I plan
to drive them out by extending the libGL test suite.
2009-02-16 17:22:18 -07:00
Aaron Plattner
660c2a7d4c Query the DDX in ProcRRGetScreenInfo.
This is the RandR 1.1 version of GetScreenResources and needs to re-query the
DDX to see if the mode pool changed.

Fixes Launchpad bug #325115.
Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-02-13 12:39:35 -08:00
Jeremy Huddleston
eea42726b1 XQuartz: Fix copyright info in Info.plist to be prettier when viewed in Finder
(cherry picked from commit 8b607c9c50)
2009-02-12 15:45:23 -08:00
George Staplin
58c4116c47 XQuartz: xpr: The dri.c code for pixmaps was wrong in several ways. They weren't
being exported correctly by Xplugin.

This should fix a bug with the surface for a window, when an export fails.
Before the export could fail and leave behind an invalid (freed) pointer in the dix privates.

I have an idea of how to fix the GLXPixmaps now without using CGLSetOffScreen.

This work is a step towards that.  The Xplugin will need a small patch to fix an
issue that this change brought forth.
2009-02-06 12:55:09 -07:00
Jeremy Huddleston
0d5dd1501a XQuartz: Accept bundle version 2.1.6 to work with our startup method
(cherry picked from commit 7f29665573)
2009-02-03 10:04:18 -08:00
Paulo Cesar Pereira de Andrade
34724f4551 Work around inclusion of <X11/extensions/panoramiXext.h>
The X Server build only needs the macros PANORAMIX_MAJOR_VERSION
and PANORAMIX_MINOR_VERSION from that header.
  Addition of extra prototypes to <X11/extensions/panoramiXext.h>
caused a X Server build failure.
2009-02-03 09:30:48 -08:00
Jeremy Huddleston
0dbc356795 XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard
(cherry picked from commit 8620579483)
2009-02-02 12:34:49 -08:00
Jeremy Huddleston
fd08be749e XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT
(cherry picked from commit e01662cadc)
2009-02-01 15:12:50 -08:00
Keith Packard
1f729b42d5 Version to 1.5.99.902 2009-01-30 21:12:17 -08:00
Eric Anholt
56f6fb8c86 randr: Avoid re-querying the configuration on everything but GetScreenResources.
The new path should only re-query on the other requests when we haven't
gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).

Bug #19037.
(cherry picked from commit 317f2b4a9f)
2009-01-30 20:34:07 -08:00
Keith Packard
6d928aa227 RandR crtcs not fetched correctly when primary output is set.
Primary outputs may not have a CRTC.
Loops fetching CRTCs respecting primary output were broken.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4de5705545)
2009-01-30 20:22:04 -08:00
Keith Packard
759ed0679a RandR SetOutputPrimary should work with or without a crtc connected
The test was inverted from the protocol spec, and besides, the test is bogus
anyways.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c1f2be1f3f)
2009-01-30 19:16:15 -08:00
Jeremy Huddleston
d4414649f2 Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple 2009-01-30 17:53:05 -08:00
Thomas Jaeger
b893dc59da Don't release grabs unless all buttons are up
Previously, only buttons <= 5 would count here, but the core protocol
allows for 255 buttons.

http://lists.freedesktop.org/archives/xorg/2009-January/042092.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 717a961528)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 17:26:09 -08:00
Thomas Jaeger
191161a24a Count the number of logically down buttons in buttonsDown
This fixes the following bug.  Assuming your window manager grabs
Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping,
then press the physical button 3 (this shouldn't have any effect), press
Alt and then button 1.  The press event is delivered to the application
instead of firing the grab.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f7f85f6965)
2009-01-30 17:25:24 -08:00
Peter Hutterer
fe0abdceb4 mi: ensure chained button mappings from SD -> MD (#19282)
After copying the master event, flip the detail field to the mapped button of
the SD, not the physical button. This way if the SD has a mapping 1:3 and the
MD has a mapping of 3:4, a press on button 1 on the SD results in a core event
on button 4.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 17:22:15 -08:00
Thomas Jaeger
3441917008 Don't alter device button maps in DoSetPointerMapping
Currently, if a device map differs from the core pointer map, then the
request may return MappingBusy, even though all the affected core
buttons are in the up state.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3d549438c2)
2009-01-30 17:13:28 -08:00
Thomas Jaeger
364bcbea48 Xext: Send out correct events in ProcXTestFakeInput
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b2756a71a4)
2009-01-30 17:12:41 -08:00
Peter Hutterer
e789789196 xkb: fix typo - missing negation when checking button state.
Introduced with a85f0d6b98.

Reported by Thomas Jaeger.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 515ce3e4ba)
2009-01-30 17:12:17 -08:00
Peter Hutterer
ebb3872925 Xi: fix use of button->down - bitflags instead of int arrays.
The device's button down state array was changed to use DOWN_LENGTH and thus
bitflags for each button in cfcb3da7.

Update the DBSN events to copy this bit-wise state.
Update xkb and Xi to check for the bit flag instead of the array value.

Reported by ajax.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit a85f0d6b98)
2009-01-30 17:11:44 -08:00