aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog.multi-tty7
-rw-r--r--src/term.c23
-rw-r--r--src/w32fns.c16
3 files changed, 43 insertions, 3 deletions
diff --git a/src/ChangeLog.multi-tty b/src/ChangeLog.multi-tty
index 75a6e2e272b..8fdbaa8aa59 100644
--- a/src/ChangeLog.multi-tty
+++ b/src/ChangeLog.multi-tty
@@ -1,3 +1,10 @@
12007-05-17 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * term.c (init_tty): Better initialize ttys in windows.
4 * w32fns.c (Fx_create_frame): Set the default minibuffer frame,
5 window_system and the rest of the frame parameters following what
6 is done in X11.
7
12007-05-17 Jason Rumney <jasonr@gnu.org> 82007-05-17 Jason Rumney <jasonr@gnu.org>
2 9
3 * w32term.h (x_output): Remove foreground_pixel and background_pixel. 10 * w32term.h (x_output): Remove foreground_pixel and background_pixel.
diff --git a/src/term.c b/src/term.c
index 82b30b18af0..04d5f74fc2c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2424,6 +2424,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
2424 "Unknown terminal type", 2424 "Unknown terminal type",
2425 "Unknown terminal type"); 2425 "Unknown terminal type");
2426 2426
2427#ifndef WINDOWSNT
2427 if (name == NULL) 2428 if (name == NULL)
2428 name = "/dev/tty"; 2429 name = "/dev/tty";
2429 if (!strcmp (name, "/dev/tty")) 2430 if (!strcmp (name, "/dev/tty"))
@@ -2437,7 +2438,8 @@ init_tty (char *name, char *terminal_type, int must_succeed)
2437 terminal = get_named_tty (name); 2438 terminal = get_named_tty (name);
2438 if (terminal) 2439 if (terminal)
2439 return terminal; 2440 return terminal;
2440 2441#endif
2442
2441 terminal = create_terminal (); 2443 terminal = create_terminal ();
2442 tty = (struct tty_display_info *) xmalloc (sizeof (struct tty_display_info)); 2444 tty = (struct tty_display_info *) xmalloc (sizeof (struct tty_display_info));
2443 bzero (tty, sizeof (struct tty_display_info)); 2445 bzero (tty, sizeof (struct tty_display_info));
@@ -2451,6 +2453,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
2451 tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm)); 2453 tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm));
2452 Wcm_clear (tty); 2454 Wcm_clear (tty);
2453 2455
2456#ifndef WINDOWSNT
2454 set_tty_hooks (terminal); 2457 set_tty_hooks (terminal);
2455 2458
2456 { 2459 {
@@ -2497,19 +2500,33 @@ init_tty (char *name, char *terminal_type, int must_succeed)
2497 tty->input = file; 2500 tty->input = file;
2498 tty->output = file; 2501 tty->output = file;
2499 } 2502 }
2500 2503
2501 tty->type = xstrdup (terminal_type); 2504 tty->type = xstrdup (terminal_type);
2502 2505
2503 add_keyboard_wait_descriptor (fileno (tty->input)); 2506 add_keyboard_wait_descriptor (fileno (tty->input));
2504 2507
2508#endif
2509
2505 encode_terminal_bufsize = 0; 2510 encode_terminal_bufsize = 0;
2506 2511
2507#ifdef WINDOWSNT 2512#ifdef WINDOWSNT
2508 initialize_w32_display (); 2513 initialize_w32_display ();
2509 2514
2515 /* XXX Can this be non-null? */
2516 if (name)
2517 {
2518 tty->name = xstrdup (name);
2519 terminal->name = xstrdup (name);
2520 }
2521 tty->type = xstrdup (terminal_type);
2522
2523 /* XXX not sure if this line is correct. If it is not set then we
2524 crash in update_display_1. */
2525 tty->output = stdout;
2526
2510 Wcm_clear (tty); 2527 Wcm_clear (tty);
2511 2528
2512 area = (char *) xmalloc (2044); 2529 area = (char *) xmalloc (2044); /* XXX this seems unused. */
2513 2530
2514 { 2531 {
2515 struct frame *f = XFRAME (selected_frame); 2532 struct frame *f = XFRAME (selected_frame);
diff --git a/src/w32fns.c b/src/w32fns.c
index 7c46615478a..0dbe2131e7f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4430,6 +4430,22 @@ This function is an internal primitive--use `make-frame' instead. */)
4430 /* Must have been Qnil. */ 4430 /* Must have been Qnil. */
4431 ; 4431 ;
4432 } 4432 }
4433
4434 /* Initialize `default-minibuffer-frame' in case this is the first
4435 frame on this terminal. */
4436 if (FRAME_HAS_MINIBUF_P (f)
4437 && (!FRAMEP (kb->Vdefault_minibuffer_frame)
4438 || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
4439 kb->Vdefault_minibuffer_frame = frame;
4440
4441 /* All remaining specified parameters, which have not been "used"
4442 by x_get_arg and friends, now go in the misc. alist of the frame. */
4443 for (tem = parameters; !NILP (tem); tem = XCDR (tem))
4444 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
4445 f->param_alist = Fcons (XCAR (tem), f->param_alist);
4446
4447 store_frame_param (f, Qwindow_system, Qw32);
4448
4433 UNGCPRO; 4449 UNGCPRO;
4434 4450
4435 /* Make sure windows on this frame appear in calls to next-window 4451 /* Make sure windows on this frame appear in calls to next-window