aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorJan Djärv2004-11-05 07:05:13 +0000
committerJan Djärv2004-11-05 07:05:13 +0000
commit9c3ad9e13b31eb85dfd4fc401cc858157aa2bce6 (patch)
treeddeee4fe31fa27060f3f9dad156839494de880b1 /src/xselect.c
parent6cc06608ad4a8d97ab0bdd10879ceeb18593f425 (diff)
downloademacs-9c3ad9e13b31eb85dfd4fc401cc858157aa2bce6.tar.gz
emacs-9c3ad9e13b31eb85dfd4fc401cc858157aa2bce6.zip
* xselect.c (TRACE3): New debug macro.
(x_reply_selection_request): Use it. (receive_incremental_selection): In call to TRACE0, the name of a symbol is in xname.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 35f4586b754..0d327da85a2 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -85,10 +85,13 @@ static void initialize_cut_buffers P_ ((Display *, Window));
85 fprintf (stderr, "%d: " fmt "\n", getpid (), a0) 85 fprintf (stderr, "%d: " fmt "\n", getpid (), a0)
86#define TRACE2(fmt, a0, a1) \ 86#define TRACE2(fmt, a0, a1) \
87 fprintf (stderr, "%d: " fmt "\n", getpid (), a0, a1) 87 fprintf (stderr, "%d: " fmt "\n", getpid (), a0, a1)
88#define TRACE3(fmt, a0, a1, a2) \
89 fprintf (stderr, "%d: " fmt "\n", getpid (), a0, a1, a2)
88#else 90#else
89#define TRACE0(fmt) (void) 0 91#define TRACE0(fmt) (void) 0
90#define TRACE1(fmt, a0) (void) 0 92#define TRACE1(fmt, a0) (void) 0
91#define TRACE2(fmt, a0, a1) (void) 0 93#define TRACE2(fmt, a0, a1) (void) 0
94#define TRACE3(fmt, a0, a1) (void) 0
92#endif 95#endif
93 96
94 97
@@ -623,6 +626,17 @@ x_reply_selection_request (event, format, data, size, type)
623 BLOCK_INPUT; 626 BLOCK_INPUT;
624 count = x_catch_errors (display); 627 count = x_catch_errors (display);
625 628
629#ifdef TRACE_SELECTION
630 {
631 static int cnt;
632 char *sel = XGetAtomName (display, reply.selection);
633 char *tgt = XGetAtomName (display, reply.target);
634 TRACE3 ("%s, target %s (%d)", sel, tgt, ++cnt);
635 if (sel) XFree (sel);
636 if (tgt) XFree (tgt);
637 }
638#endif /* TRACE_SELECTION */
639
626 /* Store the data on the requested property. 640 /* Store the data on the requested property.
627 If the selection is large, only store the first N bytes of it. 641 If the selection is large, only store the first N bytes of it.
628 */ 642 */
@@ -1445,10 +1459,10 @@ receive_incremental_selection (display, window, property, target_type,
1445 BLOCK_INPUT; 1459 BLOCK_INPUT;
1446 XSelectInput (display, window, STANDARD_EVENT_SET | PropertyChangeMask); 1460 XSelectInput (display, window, STANDARD_EVENT_SET | PropertyChangeMask);
1447 TRACE1 (" Delete property %s", 1461 TRACE1 (" Delete property %s",
1448 XSYMBOL (x_atom_to_symbol (display, property))->name->data); 1462 SDATA (XSYMBOL (x_atom_to_symbol (display, property))->xname));
1449 XDeleteProperty (display, window, property); 1463 XDeleteProperty (display, window, property);
1450 TRACE1 (" Expect new value of property %s", 1464 TRACE1 (" Expect new value of property %s",
1451 XSYMBOL (x_atom_to_symbol (display, property))->name->data); 1465 SDATA (XSYMBOL (x_atom_to_symbol (display, property))->xname));
1452 wait_object = expect_property_change (display, window, property, 1466 wait_object = expect_property_change (display, window, property,
1453 PropertyNewValue); 1467 PropertyNewValue);
1454 XFlush (display); 1468 XFlush (display);