diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/src/xterm.c b/src/xterm.c index cf7ec09cf46..ef469a2b82e 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -572,9 +572,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 572 | output_cursor.vpos, | 572 | output_cursor.vpos, |
| 573 | output_cursor.x, output_cursor.y); | 573 | output_cursor.x, output_cursor.y); |
| 574 | 574 | ||
| 575 | x_draw_vertical_border (w); | 575 | if (draw_window_fringes (w, 1)) |
| 576 | 576 | x_draw_vertical_border (w); | |
| 577 | draw_window_fringes (w); | ||
| 578 | 577 | ||
| 579 | UNBLOCK_INPUT; | 578 | UNBLOCK_INPUT; |
| 580 | } | 579 | } |
| @@ -3389,12 +3388,14 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3389 | Alt keysyms are on. */ | 3388 | Alt keysyms are on. */ |
| 3390 | { | 3389 | { |
| 3391 | int row, col; /* The row and column in the modifier table. */ | 3390 | int row, col; /* The row and column in the modifier table. */ |
| 3391 | int found_alt_or_meta; | ||
| 3392 | 3392 | ||
| 3393 | for (row = 3; row < 8; row++) | 3393 | for (row = 3; row < 8; row++) |
| 3394 | { | ||
| 3395 | found_alt_or_meta = 0; | ||
| 3394 | for (col = 0; col < mods->max_keypermod; col++) | 3396 | for (col = 0; col < mods->max_keypermod; col++) |
| 3395 | { | 3397 | { |
| 3396 | KeyCode code | 3398 | KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; |
| 3397 | = mods->modifiermap[(row * mods->max_keypermod) + col]; | ||
| 3398 | 3399 | ||
| 3399 | /* Zeroes are used for filler. Skip them. */ | 3400 | /* Zeroes are used for filler. Skip them. */ |
| 3400 | if (code == 0) | 3401 | if (code == 0) |
| @@ -3412,33 +3413,44 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3412 | { | 3413 | { |
| 3413 | case XK_Meta_L: | 3414 | case XK_Meta_L: |
| 3414 | case XK_Meta_R: | 3415 | case XK_Meta_R: |
| 3416 | found_alt_or_meta = 1; | ||
| 3415 | dpyinfo->meta_mod_mask |= (1 << row); | 3417 | dpyinfo->meta_mod_mask |= (1 << row); |
| 3416 | break; | 3418 | break; |
| 3417 | 3419 | ||
| 3418 | case XK_Alt_L: | 3420 | case XK_Alt_L: |
| 3419 | case XK_Alt_R: | 3421 | case XK_Alt_R: |
| 3422 | found_alt_or_meta = 1; | ||
| 3420 | dpyinfo->alt_mod_mask |= (1 << row); | 3423 | dpyinfo->alt_mod_mask |= (1 << row); |
| 3421 | break; | 3424 | break; |
| 3422 | 3425 | ||
| 3423 | case XK_Hyper_L: | 3426 | case XK_Hyper_L: |
| 3424 | case XK_Hyper_R: | 3427 | case XK_Hyper_R: |
| 3425 | dpyinfo->hyper_mod_mask |= (1 << row); | 3428 | if (!found_alt_or_meta) |
| 3429 | dpyinfo->hyper_mod_mask |= (1 << row); | ||
| 3430 | code_col = syms_per_code; | ||
| 3431 | col = mods->max_keypermod; | ||
| 3426 | break; | 3432 | break; |
| 3427 | 3433 | ||
| 3428 | case XK_Super_L: | 3434 | case XK_Super_L: |
| 3429 | case XK_Super_R: | 3435 | case XK_Super_R: |
| 3430 | dpyinfo->super_mod_mask |= (1 << row); | 3436 | if (!found_alt_or_meta) |
| 3437 | dpyinfo->super_mod_mask |= (1 << row); | ||
| 3438 | code_col = syms_per_code; | ||
| 3439 | col = mods->max_keypermod; | ||
| 3431 | break; | 3440 | break; |
| 3432 | 3441 | ||
| 3433 | case XK_Shift_Lock: | 3442 | case XK_Shift_Lock: |
| 3434 | /* Ignore this if it's not on the lock modifier. */ | 3443 | /* Ignore this if it's not on the lock modifier. */ |
| 3435 | if ((1 << row) == LockMask) | 3444 | if (!found_alt_or_meta && ((1 << row) == LockMask)) |
| 3436 | dpyinfo->shift_lock_mask = LockMask; | 3445 | dpyinfo->shift_lock_mask = LockMask; |
| 3446 | code_col = syms_per_code; | ||
| 3447 | col = mods->max_keypermod; | ||
| 3437 | break; | 3448 | break; |
| 3438 | } | 3449 | } |
| 3439 | } | 3450 | } |
| 3440 | } | 3451 | } |
| 3441 | } | 3452 | } |
| 3453 | } | ||
| 3442 | } | 3454 | } |
| 3443 | 3455 | ||
| 3444 | /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ | 3456 | /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ |
| @@ -5052,9 +5064,15 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5052 | /* Compute the left edge of the scroll bar. */ | 5064 | /* Compute the left edge of the scroll bar. */ |
| 5053 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5065 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5054 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5066 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5055 | sb_left = left + width - sb_width - (width - sb_width) / 2; | 5067 | sb_left = (left + |
| 5068 | (WINDOW_RIGHTMOST_P (w) | ||
| 5069 | ? width - sb_width - (width - sb_width) / 2 | ||
| 5070 | : 0)); | ||
| 5056 | else | 5071 | else |
| 5057 | sb_left = left + (width - sb_width) / 2; | 5072 | sb_left = (left + |
| 5073 | (WINDOW_LEFTMOST_P (w) | ||
| 5074 | ? (width - sb_width) / 2 | ||
| 5075 | : width - sb_width)); | ||
| 5058 | #else | 5076 | #else |
| 5059 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5077 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5060 | sb_left = left + width - sb_width; | 5078 | sb_left = left + width - sb_width; |
| @@ -5107,19 +5125,20 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5107 | width); | 5125 | width); |
| 5108 | #else /* not USE_GTK */ | 5126 | #else /* not USE_GTK */ |
| 5109 | 5127 | ||
| 5110 | /* Since toolkit scroll bars are smaller than the space reserved | ||
| 5111 | for them on the frame, we have to clear "under" them. */ | ||
| 5112 | if (width > 0 && height > 0) | ||
| 5113 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5114 | left, top, width, height, False); | ||
| 5115 | /* Move/size the scroll bar widget. */ | 5128 | /* Move/size the scroll bar widget. */ |
| 5116 | if (mask) | 5129 | if (mask) |
| 5130 | { | ||
| 5131 | /* Since toolkit scroll bars are smaller than the space reserved | ||
| 5132 | for them on the frame, we have to clear "under" them. */ | ||
| 5133 | if (width > 0 && height > 0) | ||
| 5134 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5135 | left, top, width, height, False); | ||
| 5117 | XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), | 5136 | XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), |
| 5118 | sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, | 5137 | sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, |
| 5119 | top, | 5138 | top, |
| 5120 | sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, | 5139 | sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, |
| 5121 | max (height, 1), 0); | 5140 | max (height, 1), 0); |
| 5122 | 5141 | } | |
| 5123 | #endif /* not USE_GTK */ | 5142 | #endif /* not USE_GTK */ |
| 5124 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 5143 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 5125 | 5144 | ||
| @@ -10918,7 +10937,7 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 10918 | x_update_window_end, | 10937 | x_update_window_end, |
| 10919 | x_cursor_to, | 10938 | x_cursor_to, |
| 10920 | x_flush, | 10939 | x_flush, |
| 10921 | #ifndef XFlush | 10940 | #ifdef XFlush |
| 10922 | x_flush, | 10941 | x_flush, |
| 10923 | #else | 10942 | #else |
| 10924 | 0, /* flush_display_optional */ | 10943 | 0, /* flush_display_optional */ |