Mercurial > emacs
comparison src/xterm.c @ 83213:d83f49cefda3
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-593
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-594
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-595
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-596
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-597
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-598
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-599
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-600
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-601
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-602
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-603
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-42
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-43
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-44
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-253
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 07 Oct 2004 16:52:19 +0000 |
parents | 4df500c93e1d 3bce830e4b33 |
children | 4f2f1522636c |
comparison
equal
deleted
inserted
replaced
83212:f70dc61a797f | 83213:d83f49cefda3 |
---|---|
3378 | 3378 |
3379 /* Scan the modifier table to see which modifier bits the Meta and | 3379 /* Scan the modifier table to see which modifier bits the Meta and |
3380 Alt keysyms are on. */ | 3380 Alt keysyms are on. */ |
3381 { | 3381 { |
3382 int row, col; /* The row and column in the modifier table. */ | 3382 int row, col; /* The row and column in the modifier table. */ |
3383 int found_alt_or_meta; | |
3383 | 3384 |
3384 for (row = 3; row < 8; row++) | 3385 for (row = 3; row < 8; row++) |
3386 { | |
3387 found_alt_or_meta = 0; | |
3385 for (col = 0; col < mods->max_keypermod; col++) | 3388 for (col = 0; col < mods->max_keypermod; col++) |
3386 { | 3389 { |
3387 KeyCode code | 3390 KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; |
3388 = mods->modifiermap[(row * mods->max_keypermod) + col]; | |
3389 | 3391 |
3390 /* Zeroes are used for filler. Skip them. */ | 3392 /* Zeroes are used for filler. Skip them. */ |
3391 if (code == 0) | 3393 if (code == 0) |
3392 continue; | 3394 continue; |
3393 | 3395 |
3401 | 3403 |
3402 switch (sym) | 3404 switch (sym) |
3403 { | 3405 { |
3404 case XK_Meta_L: | 3406 case XK_Meta_L: |
3405 case XK_Meta_R: | 3407 case XK_Meta_R: |
3408 found_alt_or_meta = 1; | |
3406 dpyinfo->meta_mod_mask |= (1 << row); | 3409 dpyinfo->meta_mod_mask |= (1 << row); |
3407 break; | 3410 break; |
3408 | 3411 |
3409 case XK_Alt_L: | 3412 case XK_Alt_L: |
3410 case XK_Alt_R: | 3413 case XK_Alt_R: |
3414 found_alt_or_meta = 1; | |
3411 dpyinfo->alt_mod_mask |= (1 << row); | 3415 dpyinfo->alt_mod_mask |= (1 << row); |
3412 break; | 3416 break; |
3413 | 3417 |
3414 case XK_Hyper_L: | 3418 case XK_Hyper_L: |
3415 case XK_Hyper_R: | 3419 case XK_Hyper_R: |
3416 dpyinfo->hyper_mod_mask |= (1 << row); | 3420 if (!found_alt_or_meta) |
3421 dpyinfo->hyper_mod_mask |= (1 << row); | |
3422 code_col = syms_per_code; | |
3423 col = mods->max_keypermod; | |
3417 break; | 3424 break; |
3418 | 3425 |
3419 case XK_Super_L: | 3426 case XK_Super_L: |
3420 case XK_Super_R: | 3427 case XK_Super_R: |
3421 dpyinfo->super_mod_mask |= (1 << row); | 3428 if (!found_alt_or_meta) |
3429 dpyinfo->super_mod_mask |= (1 << row); | |
3430 code_col = syms_per_code; | |
3431 col = mods->max_keypermod; | |
3422 break; | 3432 break; |
3423 | 3433 |
3424 case XK_Shift_Lock: | 3434 case XK_Shift_Lock: |
3425 /* Ignore this if it's not on the lock modifier. */ | 3435 /* Ignore this if it's not on the lock modifier. */ |
3426 if ((1 << row) == LockMask) | 3436 if (!found_alt_or_meta && ((1 << row) == LockMask)) |
3427 dpyinfo->shift_lock_mask = LockMask; | 3437 dpyinfo->shift_lock_mask = LockMask; |
3438 code_col = syms_per_code; | |
3439 col = mods->max_keypermod; | |
3428 break; | 3440 break; |
3429 } | 3441 } |
3430 } | 3442 } |
3431 } | 3443 } |
3432 } | 3444 } |
3445 } | |
3433 } | 3446 } |
3434 | 3447 |
3435 /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ | 3448 /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ |
3436 if (! dpyinfo->meta_mod_mask) | 3449 if (! dpyinfo->meta_mod_mask) |
3437 { | 3450 { |
5048 sb_width = width; | 5061 sb_width = width; |
5049 | 5062 |
5050 /* Compute the left edge of the scroll bar. */ | 5063 /* Compute the left edge of the scroll bar. */ |
5051 #ifdef USE_TOOLKIT_SCROLL_BARS | 5064 #ifdef USE_TOOLKIT_SCROLL_BARS |
5052 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5065 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
5053 sb_left = left + width - sb_width - (width - sb_width) / 2; | 5066 sb_left = (left + |
5067 (WINDOW_RIGHTMOST_P (w) | |
5068 ? width - sb_width - (width - sb_width) / 2 | |
5069 : 0)); | |
5054 else | 5070 else |
5055 sb_left = left + (width - sb_width) / 2; | 5071 sb_left = (left + |
5072 (WINDOW_LEFTMOST_P (w) | |
5073 ? (width - sb_width) / 2 | |
5074 : width - sb_width)); | |
5056 #else | 5075 #else |
5057 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5076 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
5058 sb_left = left + width - sb_width; | 5077 sb_left = left + width - sb_width; |
5059 else | 5078 else |
5060 sb_left = left; | 5079 sb_left = left; |
5103 max (height, 1), | 5122 max (height, 1), |
5104 left, | 5123 left, |
5105 width); | 5124 width); |
5106 #else /* not USE_GTK */ | 5125 #else /* not USE_GTK */ |
5107 | 5126 |
5108 /* Since toolkit scroll bars are smaller than the space reserved | |
5109 for them on the frame, we have to clear "under" them. */ | |
5110 if (width > 0 && height > 0) | |
5111 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | |
5112 left, top, width, height, False); | |
5113 /* Move/size the scroll bar widget. */ | 5127 /* Move/size the scroll bar widget. */ |
5114 if (mask) | 5128 if (mask) |
5129 { | |
5130 /* Since toolkit scroll bars are smaller than the space reserved | |
5131 for them on the frame, we have to clear "under" them. */ | |
5132 if (width > 0 && height > 0) | |
5133 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | |
5134 left, top, width, height, False); | |
5115 XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), | 5135 XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), |
5116 sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, | 5136 sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, |
5117 top, | 5137 top, |
5118 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, | 5138 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, |
5119 max (height, 1), 0); | 5139 max (height, 1), 0); |
5120 | 5140 } |
5121 #endif /* not USE_GTK */ | 5141 #endif /* not USE_GTK */ |
5122 #else /* not USE_TOOLKIT_SCROLL_BARS */ | 5142 #else /* not USE_TOOLKIT_SCROLL_BARS */ |
5123 | 5143 |
5124 /* Clear areas not covered by the scroll bar because of | 5144 /* Clear areas not covered by the scroll bar because of |
5125 VERTICAL_SCROLL_BAR_WIDTH_TRIM. */ | 5145 VERTICAL_SCROLL_BAR_WIDTH_TRIM. */ |