A fix for the XopenIM() errors.
This commit is contained in:
		
							parent
							
								
									c99db5b017
								
							
						
					
					
						commit
						4e14a4a97f
					
				
							
								
								
									
										14
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								st.c
									
									
									
									
									
								
							| @ -2503,9 +2503,17 @@ xinit(void) { | |||||||
| 	xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); | 	xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); | ||||||
| 
 | 
 | ||||||
| 	/* input methods */ | 	/* input methods */ | ||||||
| 	xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL); | 	if((xw.xim =  XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { | ||||||
| 	if(xw.xim == NULL) | 		XSetLocaleModifiers("@im=local"); | ||||||
| 		die("XOpenIM failed. Could not open input device.\n"); | 		if((xw.xim =  XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { | ||||||
|  | 			XSetLocaleModifiers("@im="); | ||||||
|  | 			if((xw.xim = XOpenIM(xw.dpy, | ||||||
|  | 					NULL, NULL, NULL)) == NULL) { | ||||||
|  | 				die("XOpenIM failed. Could not open input" | ||||||
|  | 					" device.\n"); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing | 	xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing | ||||||
| 					   | XIMStatusNothing, XNClientWindow, xw.win, | 					   | XIMStatusNothing, XNClientWindow, xw.win, | ||||||
| 					   XNFocusWindow, xw.win, NULL); | 					   XNFocusWindow, xw.win, NULL); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user