comparison src/w32term.c @ 21614:2624d8dcc73f

(Vw32_recognize_altgr): New variable. (dumpglyphs): Update from xterm.c. (w32_ring_bell): Flash window, don't just reset its state. (dumprectangle, show_mouse_face, x_draw_single_glyph): Use new args to dumpglyphs. (my_set_foreground_window): New function. (w32_condemn_scroll_bars): Mark all as condemned scroll bars. (w32_redeem_scroll_bar): Look through all scroll bars. (w32_judge_scroll_bars): Don't clear out condemned list. (w32_read_socket): Clip window after frame has been restored. (x_focus_on_frame, x_raise_frame): Use my_set_foreground_window. (syms_of_w32term): Define Vw32_recognize_altgr.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 17 Apr 1998 05:11:31 +0000
parents c0496e62b737
children 92c501ecca49
comparison
equal deleted inserted replaced
21613:fe4f5bfae371 21614:2624d8dcc73f
46 #include "disptab.h" 46 #include "disptab.h"
47 #include "buffer.h" 47 #include "buffer.h"
48 #include "window.h" 48 #include "window.h"
49 #include "keyboard.h" 49 #include "keyboard.h"
50 #include "intervals.h" 50 #include "intervals.h"
51 #include "coding.h"
51 52
52 #undef min 53 #undef min
53 #undef max 54 #undef max
54 #define min(x, y) (((x) < (y)) ? (x) : (y)) 55 #define min(x, y) (((x) < (y)) ? (x) : (y))
55 #define max(x, y) (((x) > (y)) ? (x) : (y)) 56 #define max(x, y) (((x) > (y)) ? (x) : (y))
146 Lisp_Object Vw32_grab_focus_on_raise; 147 Lisp_Object Vw32_grab_focus_on_raise;
147 148
148 /* Control whether Caps Lock affects non-ascii characters. */ 149 /* Control whether Caps Lock affects non-ascii characters. */
149 Lisp_Object Vw32_capslock_is_shiftlock; 150 Lisp_Object Vw32_capslock_is_shiftlock;
150 151
152 /* Control whether right-alt and left-ctrl should be recognized as AltGr. */
153 Lisp_Object Vw32_recognize_altgr;
154
151 /* The scroll bar in which the last motion event occurred. 155 /* The scroll bar in which the last motion event occurred.
152 156
153 If the last motion event occurred in a scroll bar, we set this 157 If the last motion event occurred in a scroll bar, we set this
154 so w32_mouse_position can know whether to report a scroll bar motion or 158 so w32_mouse_position can know whether to report a scroll bar motion or
155 an ordinary motion. 159 an ordinary motion.
455 glyph is a valid index into FRAME_COMPUTED_FACES (f), and the one 459 glyph is a valid index into FRAME_COMPUTED_FACES (f), and the one
456 to which we can actually apply intern_face. 460 to which we can actually apply intern_face.
457 Call this function with input blocked. */ 461 Call this function with input blocked. */
458 462
459 static void 463 static void
460 dumpglyphs (f, left, top, gp, n, hl, just_foreground) 464 dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
461 struct frame *f; 465 struct frame *f;
462 int left, top; 466 int left, top;
463 register GLYPH *gp; /* Points to first GLYPH. */ 467 register GLYPH *gp; /* Points to first GLYPH. */
464 register int n; /* Number of glyphs to display. */ 468 register int n; /* Number of glyphs to display. */
465 int hl; 469 int hl;
466 int just_foreground; 470 int just_foreground;
471 struct cmpchar_info *cmpcharp;
467 { 472 {
468 /* Holds characters to be displayed. */ 473 /* Holds characters to be displayed. */
469 char *buf = (char *) alloca (f->width * sizeof (*buf)); 474 char *buf = (char *) alloca (f->width * sizeof (*buf));
470 register char *cp; /* Steps through buf[]. */ 475 register char *cp; /* Steps through buf[]. */
471 register int tlen = GLYPH_TABLE_LENGTH; 476 register int tlen = GLYPH_TABLE_LENGTH;
478 483
479 while (n > 0) 484 while (n > 0)
480 { 485 {
481 /* Get the face-code of the next GLYPH. */ 486 /* Get the face-code of the next GLYPH. */
482 int cf, len; 487 int cf, len;
483 int g = *gp; 488 GLYPH g = *gp;
489 int ch, charset;
484 490
485 GLYPH_FOLLOW_ALIASES (tbase, tlen, g); 491 GLYPH_FOLLOW_ALIASES (tbase, tlen, g);
486 cf = FAST_GLYPH_FACE (g); 492 cf = (cmpcharp ? cmpcharp->face_work : FAST_GLYPH_FACE (g));
487 493 ch = FAST_GLYPH_CHAR (g);
494 charset = CHAR_CHARSET (ch);
495 if (charset == CHARSET_COMPOSITION)
496 {
497 struct face *face = FRAME_DEFAULT_FACE (f);
498 XFontStruct *font = FACE_FONT (face);
499 /* We must draw components of the composite character on the
500 same column */
501 cmpcharp = cmpchar_table[COMPOSITE_CHAR_ID (ch)];
502
503 /* Set the face in the slot for work. */
504 cmpcharp->face_work = cf;
505
506 dumpglyphs (f, left, top, cmpcharp->glyph, cmpcharp->glyph_len,
507 hl, just_foreground, cmpcharp);
508 left += FONT_WIDTH (font) * cmpcharp->width;
509 ++gp, --n;
510 while (gp && (*gp & GLYPH_MASK_PADDING)) ++gp, --n;
511 cmpcharp = NULL;
512 continue;
513 }
488 /* Find the run of consecutive glyphs with the same face-code. 514 /* Find the run of consecutive glyphs with the same face-code.
489 Extract their character codes into BUF. */ 515 Extract their character codes into BUF. */
490 cp = buf; 516 cp = buf;
491 while (n > 0) 517 while (n > 0)
492 { 518 {
519 int this_charset, c[2];
520
493 g = *gp; 521 g = *gp;
494 GLYPH_FOLLOW_ALIASES (tbase, tlen, g); 522 GLYPH_FOLLOW_ALIASES (tbase, tlen, g);
495 if (FAST_GLYPH_FACE (g) != cf) 523 ch = FAST_GLYPH_CHAR (g);
524 SPLIT_CHAR (ch, this_charset, c[0], c[1]);
525 if (this_charset != charset
526 || (cmpcharp == NULL && FAST_GLYPH_FACE (g) != cf))
496 break; 527 break;
497 528
498 *cp++ = FAST_GLYPH_CHAR (g); 529 if ( c[1] > 0 )
499 --n; 530 {
500 ++gp; 531 int consumed, produced;
532 /* Handle multibyte characters (still assuming user
533 selects correct font themselves for now */
534 produced = encode_terminal_code(gp, cp, 1,
535 (f->width*sizeof(*buf))-(cp-buf), &consumed);
536 /* If we can't display this glyph, skip it */
537 if (consumed == 0)
538 gp++,n--;
539 else
540 gp += consumed, n-= consumed;
541 cp += produced;
542 }
543 else
544 {
545 *cp++ = c[0];
546 ++gp, --n;
547 }
548 while (gp && (*gp & GLYPH_MASK_PADDING))
549 ++gp, --n;
501 } 550 }
502 551
503 /* LEN gets the length of the run. */ 552 /* LEN gets the length of the run. */
504 len = cp - buf; 553 len = cp - buf;
505
506 /* Now output this run of chars, with the font and pixel values 554 /* Now output this run of chars, with the font and pixel values
507 determined by the face code CF. */ 555 determined by the face code CF. */
508 { 556 {
557 int stippled = 0;
509 struct face *face = FRAME_DEFAULT_FACE (f); 558 struct face *face = FRAME_DEFAULT_FACE (f);
510 XFontStruct *font = FACE_FONT (face); 559 XFontStruct *font = FACE_FONT (face);
511 int stippled = 0;
512 COLORREF fg; 560 COLORREF fg;
513 COLORREF bg; 561 COLORREF bg;
514 562
515 /* HL = 3 means use a mouse face previously chosen. */ 563 /* HL = 3 means use a mouse face previously chosen. */
516 if (hl == 3) 564 if (hl == 3)
660 } 708 }
661 709
662 dumpglyphs (f, 710 dumpglyphs (f,
663 CHAR_TO_PIXEL_COL (f, curs_x), 711 CHAR_TO_PIXEL_COL (f, curs_x),
664 CHAR_TO_PIXEL_ROW (f, curs_y), 712 CHAR_TO_PIXEL_ROW (f, curs_y),
665 start, len, highlight, 0); 713 start, len, highlight, 0, NULL);
666 714
667 /* If we drew on top of the cursor, note that it is turned off. */ 715 /* If we drew on top of the cursor, note that it is turned off. */
668 if (curs_y == f->phys_cursor_y 716 if (curs_y == f->phys_cursor_y
669 && curs_x <= f->phys_cursor_x 717 && curs_x <= f->phys_cursor_x
670 && curs_x + len > f->phys_cursor_x) 718 && curs_x + len > f->phys_cursor_x)
753 w32_ring_bell () 801 w32_ring_bell ()
754 { 802 {
755 BLOCK_INPUT; 803 BLOCK_INPUT;
756 804
757 if (visible_bell) 805 if (visible_bell)
758 FlashWindow (FRAME_W32_WINDOW (selected_frame), FALSE); 806 FlashWindow (FRAME_W32_WINDOW (selected_frame), TRUE);
759 else 807 else
760 w32_sys_ring_bell (); 808 w32_sys_ring_bell ();
761 809
762 UNBLOCK_INPUT; 810 UNBLOCK_INPUT;
763 811
1010 1058
1011 dumpglyphs (f, 1059 dumpglyphs (f,
1012 CHAR_TO_PIXEL_COL (f, left), 1060 CHAR_TO_PIXEL_COL (f, left),
1013 CHAR_TO_PIXEL_ROW (f, y), 1061 CHAR_TO_PIXEL_ROW (f, y),
1014 line, min (cols, active_frame->used[y] - left), 1062 line, min (cols, active_frame->used[y] - left),
1015 active_frame->highlight[y], 0); 1063 active_frame->highlight[y], 0, NULL);
1016 } 1064 }
1017 1065
1018 /* Turn the cursor on if we turned it off. */ 1066 /* Turn the cursor on if we turned it off. */
1019 1067
1020 if (cursor_cleared) 1068 if (cursor_cleared)
1681 CHAR_TO_PIXEL_COL (f, column), 1729 CHAR_TO_PIXEL_COL (f, column),
1682 CHAR_TO_PIXEL_ROW (f, i), 1730 CHAR_TO_PIXEL_ROW (f, i),
1683 FRAME_CURRENT_GLYPHS (f)->glyphs[i] + column, 1731 FRAME_CURRENT_GLYPHS (f)->glyphs[i] + column,
1684 endcolumn - column, 1732 endcolumn - column,
1685 /* Highlight with mouse face if hl > 0. */ 1733 /* Highlight with mouse face if hl > 0. */
1686 hl > 0 ? 3 : 0, 0); 1734 hl > 0 ? 3 : 0, 0, NULL);
1687 } 1735 }
1688 1736
1689 /* If we turned the cursor off, turn it back on. */ 1737 /* If we turned the cursor off, turn it back on. */
1690 if (cursor_off) 1738 if (cursor_off)
1691 x_display_cursor (f, 1); 1739 x_display_cursor (f, 1);
1911 { 1959 {
1912 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, 1960 SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS,
1913 (WPARAM) hwnd, 0); 1961 (WPARAM) hwnd, 0);
1914 } 1962 }
1915 1963
1964 BOOL
1965 my_set_foreground_window (hwnd)
1966 HWND hwnd;
1967 {
1968 SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0);
1969 }
1970
1916 void 1971 void
1917 my_destroy_window (f, hwnd) 1972 my_destroy_window (f, hwnd)
1918 struct frame * f; 1973 struct frame * f;
1919 HWND hwnd; 1974 HWND hwnd;
1920 { 1975 {
2199 `*redeem_scroll_bar_hook' is applied to its window before the judgement. */ 2254 `*redeem_scroll_bar_hook' is applied to its window before the judgement. */
2200 static void 2255 static void
2201 w32_condemn_scroll_bars (frame) 2256 w32_condemn_scroll_bars (frame)
2202 FRAME_PTR frame; 2257 FRAME_PTR frame;
2203 { 2258 {
2259 /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */
2260 while (! NILP (FRAME_SCROLL_BARS (frame)))
2261 {
2262 Lisp_Object bar;
2263 bar = FRAME_SCROLL_BARS (frame);
2264 FRAME_SCROLL_BARS (frame) = XSCROLL_BAR (bar)->next;
2265 XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
2266 XSCROLL_BAR (bar)->prev = Qnil;
2267 if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
2268 XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
2269 FRAME_CONDEMNED_SCROLL_BARS (frame) = bar;
2270 }
2271 #ifdef PIGSFLY
2204 /* The condemned list should be empty at this point; if it's not, 2272 /* The condemned list should be empty at this point; if it's not,
2205 then the rest of Emacs isn't using the condemn/redeem/judge 2273 then the rest of Emacs isn't using the condemn/redeem/judge
2206 protocol correctly. */ 2274 protocol correctly. */
2207 if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame))) 2275 if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
2208 abort (); 2276 abort ();
2209 2277
2210 /* Move them all to the "condemned" list. */ 2278 /* Move them all to the "condemned" list. */
2211 FRAME_CONDEMNED_SCROLL_BARS (frame) = FRAME_SCROLL_BARS (frame); 2279 FRAME_CONDEMNED_SCROLL_BARS (frame) = FRAME_SCROLL_BARS (frame);
2212 FRAME_SCROLL_BARS (frame) = Qnil; 2280 FRAME_SCROLL_BARS (frame) = Qnil;
2281 #endif
2213 } 2282 }
2214 2283
2215 /* Unmark WINDOW's scroll bar for deletion in this judgement cycle. 2284 /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
2216 Note that WINDOW isn't necessarily condemned at all. */ 2285 Note that WINDOW isn't necessarily condemned at all. */
2217 static void 2286 static void
2218 w32_redeem_scroll_bar (window) 2287 w32_redeem_scroll_bar (window)
2219 struct window *window; 2288 struct window *window;
2220 { 2289 {
2290 struct scroll_bar *bar;
2291
2292 /* We can't redeem this window's scroll bar if it doesn't have one. */
2293 if (NILP (window->vertical_scroll_bar))
2294 abort ();
2295
2296 bar = XSCROLL_BAR (window->vertical_scroll_bar);
2297
2298 /* Unlink it from the condemned list. */
2299 {
2300 FRAME_PTR f = XFRAME (WINDOW_FRAME (window));
2301
2302 if (NILP (bar->prev))
2303 {
2304 /* If the prev pointer is nil, it must be the first in one of
2305 the lists. */
2306 if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
2307 /* It's not condemned. Everything's fine. */
2308 return;
2309 else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
2310 window->vertical_scroll_bar))
2311 FRAME_CONDEMNED_SCROLL_BARS (f) = bar->next;
2312 else
2313 /* If its prev pointer is nil, it must be at the front of
2314 one or the other! */
2315 abort ();
2316 }
2317 else
2318 XSCROLL_BAR (bar->prev)->next = bar->next;
2319
2320 if (! NILP (bar->next))
2321 XSCROLL_BAR (bar->next)->prev = bar->prev;
2322
2323 bar->next = FRAME_SCROLL_BARS (f);
2324 bar->prev = Qnil;
2325 XSETVECTOR (FRAME_SCROLL_BARS (f), bar);
2326 if (! NILP (bar->next))
2327 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
2328 }
2329 #ifdef PIGSFLY
2221 struct scroll_bar *bar; 2330 struct scroll_bar *bar;
2222 2331
2223 /* We can't redeem this window's scroll bar if it doesn't have one. */ 2332 /* We can't redeem this window's scroll bar if it doesn't have one. */
2224 if (NILP (window->vertical_scroll_bar)) 2333 if (NILP (window->vertical_scroll_bar))
2225 abort (); 2334 abort ();
2255 bar->prev = Qnil; 2364 bar->prev = Qnil;
2256 XSETVECTOR (FRAME_SCROLL_BARS (f), bar); 2365 XSETVECTOR (FRAME_SCROLL_BARS (f), bar);
2257 if (! NILP (bar->next)) 2366 if (! NILP (bar->next))
2258 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); 2367 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
2259 } 2368 }
2369 #endif
2260 } 2370 }
2261 2371
2262 /* Remove all scroll bars on FRAME that haven't been saved since the 2372 /* Remove all scroll bars on FRAME that haven't been saved since the
2263 last call to `*condemn_scroll_bars_hook'. */ 2373 last call to `*condemn_scroll_bars_hook'. */
2264 static void 2374 static void
2283 b->next = b->prev = Qnil; 2393 b->next = b->prev = Qnil;
2284 } 2394 }
2285 2395
2286 /* Now there should be no references to the condemned scroll bars, 2396 /* Now there should be no references to the condemned scroll bars,
2287 and they should get garbage-collected. */ 2397 and they should get garbage-collected. */
2398 #ifdef PIGSFLY
2399 Lisp_Object bar, next;
2400
2401 bar = FRAME_CONDEMNED_SCROLL_BARS (f);
2402
2403 /* Clear out the condemned list now so we won't try to process any
2404 more events on the hapless scroll bars. */
2405 FRAME_CONDEMNED_SCROLL_BARS (f) = Qnil;
2406
2407 for (; ! NILP (bar); bar = next)
2408 {
2409 struct scroll_bar *b = XSCROLL_BAR (bar);
2410
2411 x_scroll_bar_remove (b);
2412
2413 next = b->next;
2414 b->next = b->prev = Qnil;
2415 }
2416
2417 /* Now there should be no references to the condemned scroll bars,
2418 and they should get garbage-collected. */
2419 #endif
2288 } 2420 }
2289 2421
2290 /* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind 2422 /* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
2291 is set to something other than no_event, it is enqueued. 2423 is set to something other than no_event, it is enqueued.
2292 2424
2877 break; 3009 break;
2878 3010
2879 case WM_SIZE: 3011 case WM_SIZE:
2880 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 3012 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
2881 3013
3014 /* Inform lisp of whether frame has been iconified etc. */
3015 if (f)
3016 {
3017 switch (msg.msg.wParam)
3018 {
3019 case SIZE_MINIMIZED:
3020 f->async_visible = 0;
3021 f->async_iconified = 1;
3022
3023 bufp->kind = iconify_event;
3024 XSETFRAME (bufp->frame_or_window, f);
3025 bufp++;
3026 count++;
3027 numchars--;
3028 break;
3029
3030 case SIZE_MAXIMIZED:
3031 case SIZE_RESTORED:
3032 f->async_visible = 1;
3033 f->async_iconified = 0;
3034
3035 /* wait_reading_process_input will notice this and update
3036 the frame's display structures. */
3037 SET_FRAME_GARBAGED (f);
3038
3039 if (f->iconified)
3040 {
3041 bufp->kind = deiconify_event;
3042 XSETFRAME (bufp->frame_or_window, f);
3043 bufp++;
3044 count++;
3045 numchars--;
3046 }
3047 else
3048 /* Force a redisplay sooner or later
3049 to update the frame titles
3050 in case this is the second frame. */
3051 record_asynch_buffer_change ();
3052 break;
3053 }
3054 }
3055
2882 if (f && !f->async_iconified && msg.msg.wParam != SIZE_MINIMIZED) 3056 if (f && !f->async_iconified && msg.msg.wParam != SIZE_MINIMIZED)
2883 { 3057 {
2884 RECT rect; 3058 RECT rect;
2885 int rows; 3059 int rows;
2886 int columns; 3060 int columns;
2912 SET_FRAME_GARBAGED (f); 3086 SET_FRAME_GARBAGED (f);
2913 3087
2914 f->output_data.w32->pixel_width = width; 3088 f->output_data.w32->pixel_width = width;
2915 f->output_data.w32->pixel_height = height; 3089 f->output_data.w32->pixel_height = height;
2916 f->output_data.w32->win_gravity = NorthWestGravity; 3090 f->output_data.w32->win_gravity = NorthWestGravity;
2917 }
2918 }
2919
2920 /* Inform lisp of whether frame has been iconified etc. */
2921 if (f)
2922 {
2923 switch (msg.msg.wParam)
2924 {
2925 case SIZE_MINIMIZED:
2926 f->async_visible = 0;
2927 f->async_iconified = 1;
2928
2929 bufp->kind = iconify_event;
2930 XSETFRAME (bufp->frame_or_window, f);
2931 bufp++;
2932 count++;
2933 numchars--;
2934 break;
2935
2936 case SIZE_MAXIMIZED:
2937 case SIZE_RESTORED:
2938 f->async_visible = 1;
2939 f->async_iconified = 0;
2940
2941 /* wait_reading_process_input will notice this and update
2942 the frame's display structures. */
2943 SET_FRAME_GARBAGED (f);
2944
2945 if (f->iconified)
2946 {
2947 bufp->kind = deiconify_event;
2948 XSETFRAME (bufp->frame_or_window, f);
2949 bufp++;
2950 count++;
2951 numchars--;
2952 }
2953 else
2954 /* Force a redisplay sooner or later
2955 to update the frame titles
2956 in case this is the second frame. */
2957 record_asynch_buffer_change ();
2958 break;
2959 } 3091 }
2960 } 3092 }
2961 3093
2962 check_visibility = 1; 3094 check_visibility = 1;
2963 break; 3095 break;
3198 int highlight; 3330 int highlight;
3199 { 3331 {
3200 dumpglyphs (f, 3332 dumpglyphs (f,
3201 CHAR_TO_PIXEL_COL (f, column), 3333 CHAR_TO_PIXEL_COL (f, column),
3202 CHAR_TO_PIXEL_ROW (f, row), 3334 CHAR_TO_PIXEL_ROW (f, row),
3203 &glyph, 1, highlight, 0); 3335 &glyph, 1, highlight, 0, NULL);
3204 } 3336 }
3205 3337
3206 static void 3338 static void
3207 x_display_bar_cursor (f, on) 3339 x_display_bar_cursor (f, on)
3208 struct frame *f; 3340 struct frame *f;
3748 /* Try not to change its Z-order if possible. */ 3880 /* Try not to change its Z-order if possible. */
3749 if (x_window_to_frame (dpyinfo, GetForegroundWindow ())) 3881 if (x_window_to_frame (dpyinfo, GetForegroundWindow ()))
3750 my_set_focus (f, FRAME_W32_WINDOW (f)); 3882 my_set_focus (f, FRAME_W32_WINDOW (f));
3751 else 3883 else
3752 #endif 3884 #endif
3753 SetForegroundWindow (FRAME_W32_WINDOW (f)); 3885 my_set_foreground_window (FRAME_W32_WINDOW (f));
3754 UNBLOCK_INPUT; 3886 UNBLOCK_INPUT;
3755 } 3887 }
3756 3888
3757 x_unfocus_frame (f) 3889 x_unfocus_frame (f)
3758 struct frame *f; 3890 struct frame *f;
3811 EndDeferWindowPos (handle); 3943 EndDeferWindowPos (handle);
3812 } 3944 }
3813 } 3945 }
3814 else 3946 else
3815 { 3947 {
3816 SetForegroundWindow (FRAME_W32_WINDOW (f)); 3948 my_set_foreground_window (FRAME_W32_WINDOW (f));
3817 } 3949 }
3818 3950
3819 UNBLOCK_INPUT; 3951 UNBLOCK_INPUT;
3820 } 3952 }
3821 3953
4381 DEFVAR_LISP ("w32-capslock-is-shiftlock", 4513 DEFVAR_LISP ("w32-capslock-is-shiftlock",
4382 &Vw32_capslock_is_shiftlock, 4514 &Vw32_capslock_is_shiftlock,
4383 "Apply CapsLock state to non character input keys.\n\ 4515 "Apply CapsLock state to non character input keys.\n\
4384 When nil, CapsLock only affects normal character input keys."); 4516 When nil, CapsLock only affects normal character input keys.");
4385 Vw32_capslock_is_shiftlock = Qnil; 4517 Vw32_capslock_is_shiftlock = Qnil;
4386 } 4518
4519 DEFVAR_LISP ("w32-recognize-altgr",
4520 &Vw32_recognize_altgr,
4521 "Recognize right-alt and left-ctrl as AltGr.\n\
4522 When nil, the right-alt and left-ctrl key combination is\n\
4523 interpreted normally.");
4524 Vw32_recognize_altgr = Qt;
4525 }
4526