Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge sundry bugfixes from pre-0.14 #140

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Merge sundry bugfixes from pre-0.14 #140

wants to merge 10 commits into from

Conversation

hackerb9
Copy link
Collaborator

@hackerb9 hackerb9 commented Jan 1, 2023

No description provided.

Improved debugging output and error handling. Better documentation in comments.

For example, new xchandler for errors now breaks the mainloop by sending
ourselves a ClientMessage event when an error occurs. New xcchangeprop()
frontend wraps and handles errors from XChangeProperty(). Also, we now check for
NULL before using XFree, handle SELECTION_REFUSED and delete properties, allow
chunk sizes up to (almost) the maximum the X display can handle (previously was
6%).
Previous xctest was failing because, ironically, it had a bug that should have
caused xclip to fail, but xclip wasn't checking the error messages and so
reported everything was fine.
The old style cut buffer was not being correctly handled before.
Particularly, error messages were being ignored. And errors are easy
to get since BUFFERCUT can only hold 16 MiB of data and has no option
for INCRemental chunks.

The -v flag should always means -verbose, not -version. Likewise, -i,
-o and others should have fixed meanings even if we later add flags
that start with 'i', 'o', et cetera. -c is now shorthand for
"-selection clipboard", and -T is short for "-t TARGETS".

XSetSelectionOwner should *not* use CurrentTime, according to ICCCM
section 2.1. This patch doesn't fix that yet, but it makes the first
step. Added in a stub variable "ownertime" which, for now, is just
CurrentTime. TODO: Eventually xclip should append zero-length to a
property and get the timestamp from the server's PropertyNotify event.

Added some sanity tests to make sure we never get in a strange state
with sloop.
Uses groff to make a pdf.

Also:

Create a 'watch' target so that we can see the pdf change while editing
the manpage every time xclip.1 is saved.

Add a 'test' target so make test runs xctest.

Make sure the 'dist' target actually includes all the files, including xctest.
@quartzjer
Copy link
Collaborator

Hi @hackerb9, I recently volunteered to help @astrand with maintenance of xclip, but from the looks of this PR it seems like you should certainly be also!

I've merged a couple small things that now conflict, are you interested in updating your PR?

There looks like a /ton/ of great fixes in here, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants