aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 573f939d836..b79a32954c8 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -733,7 +733,12 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
733 ccl->reg[0] = charset; 733 ccl->reg[0] = charset;
734 ccl->reg[1] = cp->byte2; 734 ccl->reg[1] = cp->byte2;
735 ccl_driver (ccl, NULL, NULL, 0, 0, NULL); 735 ccl_driver (ccl, NULL, NULL, 0, 0, NULL);
736 cp->byte2 = ccl->reg[1]; 736 /* We assume that MSBs are appropriately
737 set/reset by CCL program. */
738 if (font->max_byte1 == 0) /* 1-byte font */
739 cp->byte2 = ccl->reg[1];
740 else
741 cp->byte1 = ccl->reg[1], cp->byte2 = ccl->reg[2];
737 } 742 }
738 else 743 else
739 for (cp = x_2byte_buffer; cp < x_2byte_buffer + len; cp++) 744 for (cp = x_2byte_buffer; cp < x_2byte_buffer + len; cp++)
@@ -741,7 +746,12 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
741 ccl->reg[0] = charset; 746 ccl->reg[0] = charset;
742 ccl->reg[1] = cp->byte1, ccl->reg[2] = cp->byte2; 747 ccl->reg[1] = cp->byte1, ccl->reg[2] = cp->byte2;
743 ccl_driver (ccl, NULL, NULL, 0, 0, NULL); 748 ccl_driver (ccl, NULL, NULL, 0, 0, NULL);
744 cp->byte1 = ccl->reg[1], cp->byte2 = ccl->reg[2]; 749 /* We assume that MSBs are appropriately
750 set/reset by CCL program. */
751 if (font->max_byte1 == 0) /* 1-byte font */
752 cp->byte2 = ccl->reg[1];
753 else
754 cp->byte1 = ccl->reg[1], cp->byte2 = ccl->reg[2];
745 } 755 }
746 } 756 }
747 else if (fontp->encoding[charset]) 757 else if (fontp->encoding[charset])
@@ -3825,19 +3835,28 @@ XTread_socket (sd, bufp, numchars, expected)
3825 could be the shell widget window 3835 could be the shell widget window
3826 if the frame has no title bar. */ 3836 if the frame has no title bar. */
3827 f = x_any_window_to_frame (dpyinfo, event.xclient.window); 3837 f = x_any_window_to_frame (dpyinfo, event.xclient.window);
3828 /* Since we set WM_TAKE_FOCUS, we must call
3829 XSetInputFocus explicitly. But not if f is null,
3830 since that might be an event for a deleted frame. */
3831#ifdef HAVE_X_I18N 3838#ifdef HAVE_X_I18N
3832 /* Not quite sure this is needed -pd */ 3839 /* Not quite sure this is needed -pd */
3833 if (f && FRAME_XIC (f)) 3840 if (f && FRAME_XIC (f))
3834 XSetICFocus (FRAME_XIC (f)); 3841 XSetICFocus (FRAME_XIC (f));
3835#endif 3842#endif
3843 /* Since we set WM_TAKE_FOCUS, we must call
3844 XSetInputFocus explicitly. But not if f is null,
3845 since that might be an event for a deleted frame. */
3836 if (f) 3846 if (f)
3837 XSetInputFocus (event.xclient.display, 3847 {
3838 event.xclient.window, 3848 Display *d = event.xclient.display;
3839 RevertToPointerRoot, 3849 /* Catch and ignore errors, in case window has been
3840 event.xclient.data.l[1]); 3850 iconified by a window manager such as GWM. */
3851 int count = x_catch_errors (d);
3852 XSetInputFocus (d, event.xclient.window,
3853 RevertToPointerRoot,
3854 event.xclient.data.l[1]);
3855 /* This is needed to detect the error
3856 if there is an error. */
3857 XSync (d, False);
3858 x_uncatch_errors (d, count);
3859 }
3841 /* Not certain about handling scroll bars here */ 3860 /* Not certain about handling scroll bars here */
3842 } 3861 }
3843 else if (event.xclient.data.l[0] 3862 else if (event.xclient.data.l[0]