Commit Graph

6497 Commits

Author SHA1 Message Date
Jeremy Huddleston
12a59c44cb XQuartz: Fixed threading issue with TSM.
(cherry picked from commit 93ab4e0071)
2008-09-26 12:31:21 -07:00
Jeremy Huddleston
ee87c9b024 XQuartz: pbproxy: Removed stray SPI include.
(cherry picked from commit 2fb2bc77b8)
2008-09-26 12:31:18 -07:00
George Peter Staplin
591cc57627 XQuartz: pbproxy: Fix 3 paths that could leak memory.
2 of the paths leaked, when INCR transfers were done.  Now we
are leak free according to the leaks program for all transfers
I have tried so far.
(cherry picked from commit aa98db576b)
2008-09-26 12:31:12 -07:00
George Peter Staplin
586fbc91df XQuartz: pbproxy: Fix NSObject memory leaks by properly using the
NSAutoreleasePool.   Now the usage is consistent.  In x_input_run()
we create a pool, and release it after processing the XEvents.

Add some getpid() output to main for debugging.  It needs a bit more
testing before the next release.

Don't retain the NSPasteboard as the old code did.  That may have
contributed to the leak, and it made it so that we needed the
NSAutoreleasePool created in main().

Remove the _known_types, and _pasteboard instance variables from
the x_selection class.  They aren't needed anymore.

The leaks program now indicates 0 leaks after some usage.  I want
to test further, but this seems much better, and my memory usage
graph indicates it's not growing.
(cherry picked from commit b245d84a72)
2008-09-26 12:31:06 -07:00
George Peter Staplin
238999cfc9 XQuartz: pbproxy: Add a comment to pbproxy.h about how the DB()
macro causes a leak (according to the leaks program).

Attempt to fix several other leaks with release method calls.
For some reason the process still grows more than it should...

I will need to use some better methods than leaks, and malloc_history
I suspect.  Whatever is leaking, it's hard to find.  I need to isolate
the cases more.

Add a missing image/jpeg branch.

Remove read_prop_32 - it's not used.
(cherry picked from commit 63a680354d)
2008-09-26 12:31:01 -07:00
Peter Hutterer
106eb37e02 Require inputproto 1.9.99.5
Pull and rebuild your input drivers, while you're at it.
2008-09-26 13:32:13 +09:30
Peter Hutterer
fbd09486c6 Push server-known properties into xserver-properties.h. 2008-09-26 13:32:11 +09:30
Peter Hutterer
a2d83b9dc8 Xi: add "deletable" flag to properties, add DeleteProperty handler.
A property can only be deleted if any of the following is true:
- if a property is deletable and all handlers return Success.
- if a property is non-deleteable and the all handlers return Success AND the
  delete request does not come from a client (i.e. driver or the server).

A client can never delete a non-deletable property.
2008-09-26 13:32:08 +09:30
Peter Hutterer
22e9047268 Xi: allow Set/GetProperties to return a status, and honour this status code.
If a property handler now bails out, return the error code to the caller. This
allows to be slightly more specific with the errors.
2008-09-26 13:32:07 +09:30
Peter Hutterer
1e24e7b9df Xi: remove configure/query device property calls.
This removes all the meta-information about device properties (pending,
fromClient, range, valid_values, immutable).
2008-09-26 13:32:05 +09:30
Peter Hutterer
feaa5fa671 xfixes: realize the invisible cursor before displaying it.
AllocARGBCursor realizes the cursor but can only do so if we have devices
there already. If we don't - then the cursor needs to be realized elsewhere.
This is usually done in InitializeSprite, but since xfixes just hard-swaps the
(realized) cursor to the InvisibleCursor, we need to manually realize it
before trying to display it.
2008-09-26 09:33:39 +09:30
Peter Hutterer
e58be0f342 config: print error code if NIDR fails. 2008-09-26 09:33:39 +09:30
Peter Hutterer
30c3c13f10 xkb: squash canonical types into explicit ones on core reconstruction.
If we update key types from core, and groups 2 - n have a canonical type but
the same symbols as the explicit type of group 1, assume that it was a core
sym duplication according to Section 12.4 of the XKB Protocol Spec.
Ignore the canonical types and pretend there's only one group for the key -
with the explicit key type.

The protocol spec does not cover this case, so we have to guess here.
2008-09-26 09:33:39 +09:30
Peter Hutterer
ae986d1c73 xkb: fix core keyboard map generation. #14373
According to Section 12.4 of the XKB Protocol Spec, if a key only has a single
group but the keyboard has multiple groups defined, the core description of
the key is a duplication of the single group across all symbols. i.e.
G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4

The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to
"invented" groups when the process is reversed.

Note that this creates wrong key types on reconstruction from core to xkb,
i.e. any single-group key with a key type that is not one of the canonical
four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type
for the other gruops.

X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373>
2008-09-26 09:33:39 +09:30
Dave Airlie
5bf3f0fd4e exa: make sure pixmap devPrivate.ptr is NULL at create time 2008-09-26 08:59:30 +10:00
Ian Romanick
82f150d73c GLX: Make sure GLX_SGI_make_current_read is enabled when possible 2008-09-24 16:56:45 -07:00
Adam Jackson
8d9defe8c2 Fix un-suppressing the initial cursor.
The intended behaviour was "show as soon as someone calls
XDefineCursor".  What you actually got was, uh, slightly less well
defined, since the screen's ChangeWindowAttributes hook would run after
DIX handled the cursor change.  Oops.

The trivial way to turn the cursor on is:
% xsetroot -cursor_name gumby

Refer to /usr/include/X11/cursorfont.h for cursor names.

Thanks to anholt for catching this.
2008-09-24 10:21:35 -04:00
Keith Packard
a39377cbcb Revert "Render: Use built-in SHA1 library"
This reverts commit d3bd31fddf.

X.org should not be providing a custom SHA1 implementation.
2008-09-23 09:22:07 -07:00
Keith Packard
10a9bac025 Revert "Update COPYING for SHA1 code"
This reverts commit 64387c8573.

X.org should not be providing a custom SHA1 implementation.
2008-09-23 09:21:37 -07:00
Daniel Stone
64387c8573 Update COPYING for SHA1 code 2008-09-23 19:05:14 +03:00
John Tapsell
d3bd31fddf Render: Use built-in SHA1 library
Getting an external library for SHA1 is a mess, so just use our own,
regrettably.  Public domain implementation.
2008-09-23 18:56:32 +03:00
Adam Jackson
991ed2949b Rename SaveSetMap() to SaveSetShouldMap().
Avoids preprocessor collision with xfixeswire.h
2008-09-23 10:22:22 -04:00
Owen Taylor
ca9fae0079 Change 'remap' to 'map' in saveset functions/macros
Now that the code has been fixed so that Unmap means unmap and not "don't
remap", 'remap' was confusing to have in the function names/parameters, so
change it to simple 'map'.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-22 12:43:30 -07:00
Adam Jackson
ad14239a35 Upgrade GLX Public License 1.0 to FreeB 2.0.
According to the press release:

    Previous SGI contributions to the free and open source community
    are now available under the new license. These contributions
    include the SGI® OpenGL® Sample Implementation, the GLX™ API and
    other GLX extensions.

    [...]

    "SGI has been one of the most ardent commercial supporters of free
    and open source software, so it was important to us that we continue
    to support the free software development community by releasing our
    earlier OpenGL-related contributions under this new license," said
    Steve Neuner, director of Linux, SGI. "This license ensures that all
    existing user communities will benefit, and their work can proceed
    unimpeded. Both Mesa and the X.org Project can continue to utilize
    this code in free software distributions of GNU/Linux. Now more than
    ever, software previously released by SGI under earlier GLX and SGI
    Free Software License B is free."

"The GLX API" is here read to include the original GLX source release
from:

http://www.sgi.com/products/software/opensource/glx/download.html
ftp://ftp.sgi.com/sgi/opengl/glx/glx1_2.1.tgz

which includes glxext.c as included in XFree86, from which our copies
in glx/ and hw/dmx/glxProxy/ are derived.
2008-09-22 11:26:49 -04:00
Owen W. Taylor
722c51960d Don't remap windows for SaveSetUnmap
Since ReparentWindow() does a unmap/map pair for windows that are already
mapped, for saveset windows with SaveSetUnmap, we must unmap the window
before calling ReparentWindow() to avoid the generation of MapRequest
events, and so forth.
2008-09-22 11:04:26 -04:00
Adam Jackson
0bb317a78b Default to -br. Add -retro option for the nostalgic.
-retro also reverts to the classic cursor display behavior, meaning,
the cursor will be visible before anyone calls XDefineCursor().
2008-09-22 10:51:51 -04:00
Julien Cristau
ab17f88506 Don't use our version of ffs() if the system has one 2008-09-22 02:49:15 +02:00
Jeremy Huddleston
af0d5e2ef7 XQuartz: 64bit crash fix ... don't pass pointers through xe.
(cherry picked from commit 5f1265b82e)
2008-09-21 17:40:42 -07:00
George Peter Staplin
852a0b0dde XQuartz: pbproxy: Add an X error handler that returns 0.
Move the struct atom_list into the x-selection class, so that it's
no longer a global variable named atoms.  This may ease pthread
integration and reduce the chances of symbols conflicting.
(cherry picked from commit c1403c713c)
2008-09-21 17:40:42 -07:00
George Peter Staplin
7fa6fc5ad0 XQuartz: pbproxy: Fix a bug that occured when a PICT format was available.
We may need another branch to convert a PICT to a PNG or JPEG.  For now
TIFF works well in all of the test image copying apps when converted to
PNG or JPEG with an NSBitmapImageRep class.
(cherry picked from commit adf339d8f9)
2008-09-21 17:40:41 -07:00
George Peter Staplin
f67490ceb5 XQuartz: pbproxy: Make the proxy handle copy request races, and PRIMARY
INCR transfers mixed with a CLIPBOARD change.

Fix a bug with some UTF-8 transfers.  I can only guess that my UTF-8
tests before were inadequate.  I can now copy/paste any characters between
uxterm and Textedit.app.
(cherry picked from commit 7ca1532e8e)
2008-09-21 17:40:41 -07:00
Jeremy Huddleston
b666ffd781 XQuartz: "Disable" the text when syncing is disabled.
(cherry picked from commit 7713d7ab66)
2008-09-21 17:40:41 -07:00
Jeremy Huddleston
dba290ec23 XQuartz: Added a preferences UI for pbproxy options.
(cherry picked from commit d76cca5e1e)
2008-09-21 17:40:35 -07:00
George Peter Staplin
a928cae57b XQuartz: pbproxy: Add a missing include of Xutil.h. Another header
seems to have done this before, but correctness matters.
(cherry picked from commit 1b4987e779)
2008-09-21 17:40:16 -07:00
George Peter Staplin
749bdf19b2 XQuartz: pbproxy: Add COMPOUND_TEXT handling. Do misc. cleanups with testing
to verify that the behavior didn't change.

main.m: XInternAtom compound_text, and atom_pair.

pbproxy.h: Add compound_text and atom_pair to the struct atom_list.

x-selection.m: Add an #include of Xutil.h.  Refactor the reply struct
initialization to be done in a common place.  Add send_reply: to simplify
the code a bit more.  Add send_compound_text: which handles the
COMPOUND_TEXT type.  Add the beginnings of a send_multiple:.  Change
handle_image:extension: to handle_image:.  The extension: message isn't
needed anymore.
(cherry picked from commit 1e9460abdf)
2008-09-21 17:40:16 -07:00
George Peter Staplin
00bfbee59f XQuartz: pbproxy: pbproxy now responds to selection request events.
We can now copy and paste images to and from X11.  Text copying and
pasting works as well.

The NSPasteboard can contain TIFF or PICT images, and pbproxy will
translate to an image/png or image/jpeg request, and list those in the
TARGETS.

I added a description of the basic design at the top of x-selection.m.

I removed the request_data x_selection class struct.  It's not needed.
(cherry picked from commit 4a8daf8846)
2008-09-21 17:40:16 -07:00
George Peter Staplin
811e9f5e9e XQuartz: pbproxy: Use an NSBitmapImageRep to convert an "image/png" selection
to a TIFFRepresentation for use with NSPasteboard.

This has been tested with the Gimp and works with some minor quartz-wm changes.
The Finder clipboard shows the image updates after an Edit -> Copy.
(cherry picked from commit 12912adaee)
2008-09-21 17:40:16 -07:00
Jeremy Huddleston
d8d555bac7 XQuartz: Don't enable 8bit visuals in the TrueColor server, since it's not working yet
(cherry picked from commit 1317c8ff94)
2008-09-21 17:40:15 -07:00
George Peter Staplin
23ec8261b6 XQuartz: pbproxy: The greedy CLIPBOARD handling now works for text.
This change adds some [self own_clipboard] calls in the necessary places to get the proper greedy behavior.

UTF8_STRING and STRING properties seem to work well now with the test cases (PRIMARY, and CLIPBOARD).  I can copy from several different X apps, and have the behavior be correct when pasting.  I also verified that quartz-wm isn't doing the copying, by disabling the quartz-wm paths.
(cherry picked from commit 934669f732)
2008-09-21 17:40:15 -07:00
George Peter Staplin
7c2eb3d41a XQuartz: pbproxy: return the TARGETS list as a 32-bit list to fix a bug that was in the original.
Add TRACE() calls where appropriate to try to figure out why we are losing CLIPBOARD at times, after transferring PRIMARY to the NSPasteboard.

Use the new pbproxy_clipboard_to_pasteboard where appropriate.
(cherry picked from commit 40190675a6)
2008-09-21 17:40:15 -07:00
George Peter Staplin
81c836902d Rename reclaim_clipboard to claim_clipboard.
Convert the puts usage to use DB().

Add the initial handle_image method.

Check for nil in the NSString instantiation in various places.

Add some commentary to enhance the clarity of why I did some things.
(cherry picked from commit 37361567b6)
2008-09-21 17:40:15 -07:00
George Peter Staplin
85e23affea Add an image_jpeg Atom.
(cherry picked from commit ea9dc27977)
2008-09-21 17:40:15 -07:00
George Peter Staplin
6b42f40ff9 Rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit d333a8e2b5)
2008-09-21 17:40:15 -07:00
George Peter Staplin
2ab56981b1 Add image/jpeg type, and rename reclaim_clipboard to claim_clipboard.
(cherry picked from commit 32b175ef62)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston
cbd32645f7 XQuartz: pbproxy: Added global variables to customize how pbproxy behaves
(cherry picked from commit 21a2d0b8d0)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston
5b397642cd XQuartz: pbproxy: First round of updates to pbproxy from George.
(cherry picked from commit 5c8b956f8f)
2008-09-21 17:40:14 -07:00
Jeremy Huddleston
dac9e91870 mieq: Made custom event handlers safer for nevents >1 2008-09-21 17:33:04 -07:00
Kim Woelders
8c46505d7d xkb: fix use of uninitialized variable.
And some cosmetic changes to use stuff->change consistently.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-09-22 08:37:29 +09:30
Peter Harris
2b266eda6e Fix panoramiX request and reply swapping
Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize
2008-09-21 19:19:24 +02:00
Keith Packard
03ab8f11d2 When resizing a window with redirected descendents, don't expose them
Bit/window gravity computations need to recompute exposures to manage the
bits which are saved by gravity during the resize computation. That's easy
for non-redirected windows where the bits are all within the parent's
pixmap. For redirected windows, we don't need to deal with this at all, so
just skip the whole re-computation adventure.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-19 20:59:40 -07:00