]> git.eshelyaron.com Git - emacs.git/commitdiff
* term.c (init_tty): Better initialize ttys in windows.
authorDan Nicolaescu <dann@ics.uci.edu>
Thu, 17 May 2007 13:17:56 +0000 (13:17 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Thu, 17 May 2007 13:17:56 +0000 (13:17 +0000)
* w32fns.c (Fx_create_frame): Set the default minibuffer frame,
window_system and the rest of the frame parameters following what
is done in X11.

src/ChangeLog.multi-tty
src/term.c
src/w32fns.c

index 75a6e2e272b6e739bc1428b784bf8d2a9d117059..8fdbaa8aa59fd8cefd027036f96da79f58a9c06f 100644 (file)
@@ -1,3 +1,10 @@
+2007-05-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * term.c (init_tty): Better initialize ttys in windows.
+       * w32fns.c (Fx_create_frame): Set the default minibuffer frame,
+       window_system and the rest of the frame parameters following what
+       is done in X11.
+
 2007-05-17  Jason Rumney  <jasonr@gnu.org>
 
        * w32term.h (x_output): Remove foreground_pixel and background_pixel.
index 82b30b18af0d47652960e4d52d6cb416fc045189..04d5f74fc2c6ddec915789b6d80fea9137f80a7b 100644 (file)
@@ -2424,6 +2424,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
                  "Unknown terminal type",
                  "Unknown terminal type");
 
+#ifndef WINDOWSNT  
   if (name == NULL)
     name = "/dev/tty";
   if (!strcmp (name, "/dev/tty"))
@@ -2437,7 +2438,8 @@ init_tty (char *name, char *terminal_type, int must_succeed)
   terminal = get_named_tty (name);
   if (terminal)
     return terminal;
-
+#endif
+  
   terminal = create_terminal ();
   tty = (struct tty_display_info *) xmalloc (sizeof (struct tty_display_info));
   bzero (tty, sizeof (struct tty_display_info));
@@ -2451,6 +2453,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
   tty->Wcm = (struct cm *) xmalloc (sizeof (struct cm));
   Wcm_clear (tty);
 
+#ifndef WINDOWSNT
   set_tty_hooks (terminal);
   
   {
@@ -2497,19 +2500,33 @@ init_tty (char *name, char *terminal_type, int must_succeed)
     tty->input = file;
     tty->output = file;
   }
-
+  
   tty->type = xstrdup (terminal_type);
 
   add_keyboard_wait_descriptor (fileno (tty->input));
 
+#endif
+
   encode_terminal_bufsize = 0;
 
 #ifdef WINDOWSNT
   initialize_w32_display ();
 
+  /* XXX Can this be non-null?  */
+  if (name)
+    {
+      tty->name = xstrdup (name);
+      terminal->name = xstrdup (name);
+    }
+  tty->type = xstrdup (terminal_type);  
+
+  /* XXX not sure if this line is correct. If it is not set then we
+     crash in update_display_1. */
+  tty->output = stdout;
+  
   Wcm_clear (tty);
 
-  area = (char *) xmalloc (2044);
+  area = (char *) xmalloc (2044); /* XXX this seems unused. */
 
   {
     struct frame *f = XFRAME (selected_frame);
index 7c46615478a565e7f49f0f918baedf6dc47dfed0..0dbe2131e7faad5fd4c5655b24b7fb7f533ace5f 100644 (file)
@@ -4430,6 +4430,22 @@ This function is an internal primitive--use `make-frame' instead.  */)
        /* Must have been Qnil.  */
        ;
     }
+
+  /* Initialize `default-minibuffer-frame' in case this is the first
+     frame on this terminal.  */
+  if (FRAME_HAS_MINIBUF_P (f)
+      && (!FRAMEP (kb->Vdefault_minibuffer_frame)
+          || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
+    kb->Vdefault_minibuffer_frame = frame;
+
+  /* All remaining specified parameters, which have not been "used"
+     by x_get_arg and friends, now go in the misc. alist of the frame.  */
+  for (tem = parameters; !NILP (tem); tem = XCDR (tem))
+    if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
+      f->param_alist = Fcons (XCAR (tem), f->param_alist);
+
+  store_frame_param (f, Qwindow_system, Qw32);
+  
   UNGCPRO;
 
   /* Make sure windows on this frame appear in calls to next-window