Support XA_STRING in notify request
Some programs can only deal with XA_STRING, and it makes impossible st be able of copying to them. This patch makes st answer also to XA_STRING, althought it sends utf8 strings. It is not a problem because moderm applications must support utf8.
This commit is contained in:
		
							
								
								
									
										6
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								st.c
									
									
									
									
									
								
							| @@ -1089,7 +1089,11 @@ selrequest(XEvent *e) { | |||||||
| 				XA_ATOM, 32, PropModeReplace, | 				XA_ATOM, 32, PropModeReplace, | ||||||
| 				(uchar *) &string, 1); | 				(uchar *) &string, 1); | ||||||
| 		xev.property = xsre->property; | 		xev.property = xsre->property; | ||||||
| 	} else if(xsre->target == sel.xtarget) { | 	} else if(xsre->target == sel.xtarget || xsre->target == XA_STRING) { | ||||||
|  | 		/* | ||||||
|  | 		 * xith XA_STRING non ascii characters may be incorrect in the | ||||||
|  | 		 * requestor. It is not our problem, use utf8. | ||||||
|  | 		 */ | ||||||
| 		clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); | 		clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); | ||||||
| 		if(xsre->selection == XA_PRIMARY) { | 		if(xsre->selection == XA_PRIMARY) { | ||||||
| 			seltext = sel.primary; | 			seltext = sel.primary; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user