summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2009-08-21 16:50:52 +0000
committerKim Woelders <kim@woelders.dk>2009-08-21 16:50:52 +0000
commit07e0c8b22bb1924bff90886de5bcc8ff8b43d94b (patch)
tree860c2c51e5553b7bfa8e101f6b0660b6891bfa81
parent05997662cdbb74d8d6dba5ae042656967b38be9f (diff)
Yet another attempt to fix selection issues on 64 bit systems.
SVN revision: 41918
-rw-r--r--src/screen.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/screen.c b/src/screen.c
index e93a858..1aac33c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3292,13 +3292,6 @@ selection_rotate(int x, int y)
3292} 3292}
3293 3293
3294/* 3294/*
3295 * On some systems, the Atom typedef is 64 bits wide. We need to have a type
3296 * that is exactly 32 bits wide, because a format of 64 is not allowed by
3297 * the X11 protocol.
3298 */
3299typedef CARD32 Atom32;
3300
3301/*
3302 * Respond to a request for our current selection 3295 * Respond to a request for our current selection
3303 * EXT: SelectionRequest 3296 * EXT: SelectionRequest
3304 */ 3297 */
@@ -3306,7 +3299,7 @@ void
3306selection_send(XSelectionRequestEvent * rq) 3299selection_send(XSelectionRequestEvent * rq)
3307{ 3300{
3308 XEvent ev; 3301 XEvent ev;
3309 Atom32 target_list[2]; 3302 long target_list[2];
3310 3303
3311 ev.xselection.type = SelectionNotify; 3304 ev.xselection.type = SelectionNotify;
3312 ev.xselection.property = None; 3305 ev.xselection.property = None;
@@ -3317,10 +3310,10 @@ selection_send(XSelectionRequestEvent * rq)
3317 ev.xselection.time = rq->time; 3310 ev.xselection.time = rq->time;
3318 3311
3319 if (rq->target == props[PROP_SELECTION_TARGETS]) { 3312 if (rq->target == props[PROP_SELECTION_TARGETS]) {
3320 target_list[0] = (Atom32) props[PROP_SELECTION_TARGETS]; 3313 target_list[0] = props[PROP_SELECTION_TARGETS];
3321 target_list[1] = (Atom32) XA_STRING; 3314 target_list[1] = XA_STRING;
3322 XChangeProperty(Xdisplay, rq->requestor, rq->property, rq->target, 3315 XChangeProperty(Xdisplay, rq->requestor, rq->property, rq->target,
3323 (8 * sizeof(target_list[0])), PropModeReplace, (unsigned char *) target_list, 3316 32, PropModeReplace, (unsigned char *) target_list,
3324 (sizeof(target_list) / sizeof(target_list[0]))); 3317 (sizeof(target_list) / sizeof(target_list[0])));
3325 ev.xselection.property = rq->property; 3318 ev.xselection.property = rq->property;
3326#if defined(MULTI_CHARSET) && defined(HAVE_X11_XMU_ATOMS_H) 3319#if defined(MULTI_CHARSET) && defined(HAVE_X11_XMU_ATOMS_H)