summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/events.c b/src/events.c
index 0a5d759..816d7b7 100644
--- a/src/events.c
+++ b/src/events.c
@@ -475,7 +475,7 @@ execute_remote_command (Window w)
unsigned char *req;
status = XGetWindowProperty (dpy, w, rp_command,
- 0, 0, False, XA_STRING,
+ 0, 0, False, xa_string,
&type_ret, &format_ret, &nitems, &bytes_after,
&req);
@@ -490,7 +490,7 @@ execute_remote_command (Window w)
status = XGetWindowProperty (dpy, w, rp_command,
0, (bytes_after / 4) + (bytes_after % 4 ? 1 : 0),
- True, XA_STRING, &type_ret, &format_ret, &nitems,
+ True, xa_string, &type_ret, &format_ret, &nitems,
&bytes_after, &req);
if (status != Success || req == NULL)
@@ -573,10 +573,10 @@ receive_command (Window root)
else
result = NULL;
if (result)
- XChangeProperty (dpy, w, rp_command_result, XA_STRING,
+ XChangeProperty (dpy, w, rp_command_result, xa_string,
8, PropModeReplace, (unsigned char *)result, strlen (result));
else
- XChangeProperty (dpy, w, rp_command_result, XA_STRING,
+ XChangeProperty (dpy, w, rp_command_result, xa_string,
8, PropModeReplace, NULL, 0);
free (result);
cmdret_free (cmd_ret);
@@ -733,16 +733,13 @@ selection_request (XSelectionRequestEvent *rq)
CARD32 target_list[4];
Atom target;
static Atom xa_targets = None;
- static Atom xa_compound_text = None;
- static Atom xa_text = None;
+ static Atom xa_text = None; /* XXX */
XTextProperty ct;
XICCEncodingStyle style;
char *cl[4];
if (xa_text == None)
xa_text = XInternAtom(dpy, "TEXT", False);
- if (xa_compound_text == None)
- xa_compound_text = XInternAtom(dpy, "COMPOUND_TEXT", False);
if (xa_targets == None)
xa_targets = XInternAtom(dpy, "TARGETS", False);
@@ -756,7 +753,7 @@ selection_request (XSelectionRequestEvent *rq)
if (rq->target == xa_targets) {
target_list[0] = (CARD32) xa_targets;
- target_list[1] = (CARD32) XA_STRING;
+ target_list[1] = (CARD32) xa_string;
target_list[2] = (CARD32) xa_text;
target_list[3] = (CARD32) xa_compound_text;
XChangeProperty(dpy, rq->requestor, rq->property, rq->target,
@@ -764,12 +761,12 @@ selection_request (XSelectionRequestEvent *rq)
(unsigned char *)target_list,
(sizeof(target_list) / sizeof(target_list[0])));
ev.xselection.property = rq->property;
- } else if (rq->target == XA_STRING
+ } else if (rq->target == xa_string
|| rq->target == xa_compound_text
|| rq->target == xa_text) {
- if (rq->target == XA_STRING) {
+ if (rq->target == xa_string) {
style = XStringStyle;
- target = XA_STRING;
+ target = xa_string;
} else {
target = xa_compound_text;
style = (rq->target == xa_compound_text) ? XCompoundTextStyle