Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29955 Details for
Bug 47018
aterm no longer processes high-ASCII pastes properly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to test selection conversion.
selection_test.patch (text/plain), 4.15 KB, created by
Michal Januszewski (RETIRED)
on 2004-04-24 07:02:48 UTC
(
hide
)
Description:
A patch to test selection conversion.
Filename:
MIME Type:
Creator:
Michal Januszewski (RETIRED)
Created:
2004-04-24 07:02:48 UTC
Size:
4.15 KB
patch
obsolete
>diff -Naur aterm-0.4.2/scripts/random_colors aterm-0.4.2-spock/scripts/random_colors >--- aterm-0.4.2/scripts/random_colors 1970-01-01 01:00:00.000000000 +0100 >+++ aterm-0.4.2-spock/scripts/random_colors 2004-04-24 14:25:29.000000000 +0200 >@@ -0,0 +1,18 @@ >+#!/bin/bash >+ >+# This script will launch aterm with different tinting color >+# every time you start it >+# I don't really know how that can be of any use at all, but some >+# folks like it - so here it is >+ >+CLRCODE=`expr $RANDOM % 6` >+ATRMPATH=$DESTDIR/usr/bin >+ >+{ [ "$CLRCODE" -eq "0" ] && CLRNAME="-tint blue -fg yellow -bg black"; } || >+{ [ "$CLRCODE" -eq "1" ] && CLRNAME="-tint red -fg white -bg black"; } || >+{ [ "$CLRCODE" -eq "2" ] && CLRNAME="-tint green -fg white -bg white"; } || >+{ [ "$CLRCODE" -eq "3" ] && CLRNAME="-tint cyan -fg white -bg white"; } || >+{ [ "$CLRCODE" -eq "4" ] && CLRNAME="-tint magenta -fg white -bg black"; } || >+{ [ "$CLRCODE" -eq "5" ] && CLRNAME="-tint yellow -fg blue -bg white"; } >+ >+exec $ATRMPATH/aterm -fg white -tr $CLRNAME $@ >diff -Naur aterm-0.4.2/src/screen.c aterm-0.4.2-spock/src/screen.c >--- aterm-0.4.2/src/screen.c 2004-04-24 15:53:02.000000000 +0200 >+++ aterm-0.4.2-spock/src/screen.c 2004-04-24 15:51:16.000000000 +0200 >@@ -2762,24 +2762,59 @@ > XTextProperty ct; > Atom actual_type; > int actual_fmt; >- int dummy_count; >+ int count, i; > char **cl; > XEvent ev; > XWindowAttributes wa; > int setpropertyevent = 0; >+ >+ Atom *targets; > >- if (prop == None) { >- prop = XInternAtom(Xdisplay, "VT_SELECTION", False); >- >- if (selection.type == 0) { >- selection.type++; >- XConvertSelection(Xdisplay, XA_PRIMARY, XA_UTF8_STRING(Xdisplay), prop, TermWin.vt,selection.request_time); >- } else if (selection.type == 1) { >- selection.type++; >- XConvertSelection(Xdisplay, XA_PRIMARY, XA_STRING, prop, TermWin.vt,selection.request_time); >+ if (prop == None) { >+ printf("Warning: selection_paste FAILED!\n"); >+ return; > } >- return; >- } >+ >+ /* meaning: get supported TARGETS list */ >+ if (selection.type == 0) { >+ >+ if ((XGetWindowProperty(Xdisplay, win, prop, 0, PROP_SIZE, >+ False, AnyPropertyType, &ct.encoding, &ct.format, >+ &ct.nitems, &bytes_after, &targets) != Success)) { >+ XFree(ct.value); >+ return; >+ } >+ >+ selection.type++; >+ count = 0; >+ >+ printf("Supported targets: "); >+ >+ for (i = 0; i < ct.nitems; i++) { >+ printf("%s ",XmuGetAtomName(Xdisplay, targets[i])); >+ >+ if (targets[i] == XA_COMPOUND_TEXT(Xdisplay)) { >+ XConvertSelection(Xdisplay, XA_PRIMARY, XA_COMPOUND_TEXT(Xdisplay), >+ prop, TermWin.vt, selection.request_time); >+ printf("\nConverting to COMPOUND_TEXT.\n"); >+ return; >+ } >+ >+ if (targets[i] == XA_STRING) { >+ count = 1; >+ } >+ } >+ >+ printf("\n"); >+ >+ if (count == 1) { >+ printf("Converting to STRING\n"); >+ XConvertSelection(Xdisplay, XA_PRIMARY, XA_STRING, prop, TermWin.vt, >+ selection.request_time); >+ } else { >+ printf("Warning: failed to convert selection!\n"); >+ } >+ } > > for (nread = 0, bytes_after = 1; bytes_after > 0; nread += nitems) { > if ((XGetWindowProperty(Xdisplay, win, prop, (nread / 4), PROP_SIZE, >@@ -2818,7 +2853,7 @@ > break; > } > else { >- if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &dummy_count) == Success && cl) { >+ if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &count) == Success && cl) { > PasteIt(cl[0], strlen(cl[0])); > XFreeStringList(cl); > } else { >@@ -2842,7 +2877,7 @@ > XDeleteProperty(Xdisplay, win, prop); > } > >- if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &dummy_count) == Success && cl) { >+ if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &count) == Success && cl) { > PasteIt(cl[0], strlen(cl[0])); > XFreeStringList(cl); > } else { >@@ -2880,7 +2915,7 @@ > } else { > prop = XInternAtom(Xdisplay, "VT_SELECTION", False); > selection.type = 0; >- XConvertSelection(Xdisplay, XA_PRIMARY, xa, prop, TermWin.vt,tm); >+ XConvertSelection(Xdisplay, XA_PRIMARY, XA_TARGETS(Xdisplay), prop, TermWin.vt,tm); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47018
: 29955