X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0fda9b750e337d876c9461db7d4426a3f0b81482..9c25330708e49ddaeb71f16a65cdc1b51be2a27d:/src/w32console.c diff --git a/src/w32console.c b/src/w32console.c index 76b7bb0b45..ee92a59330 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -1,5 +1,5 @@ /* Terminal hooks for GNU Emacs on the Microsoft Windows API. - Copyright (C) 1992, 1999, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1992, 1999, 2001-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include "lisp.h" #include "character.h" @@ -38,7 +37,7 @@ along with GNU Emacs. If not, see . */ #include "termchar.h" #include "dispextern.h" #include "w32term.h" -#include "w32heap.h" /* for os_subtype */ +#include "w32common.h" /* for os_subtype */ #include "w32inevt.h" /* from window.c */ @@ -602,7 +601,7 @@ w32_face_attributes (struct frame *f, int face_id) } void -initialize_w32_display (struct terminal *term) +initialize_w32_display (struct terminal *term, int *width, int *height) { CONSOLE_SCREEN_BUFFER_INFO info; Mouse_HLInfo *hlinfo; @@ -723,23 +722,21 @@ initialize_w32_display (struct terminal *term) || info.srWindow.Right - info.srWindow.Left < 40 || info.srWindow.Right - info.srWindow.Left > 100))) { - FRAME_LINES (SELECTED_FRAME ()) = 25; - SET_FRAME_COLS (SELECTED_FRAME (), 80); + *height = 25; + *width = 80; } else if (w32_use_full_screen_buffer) { - FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */ - SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */ + *height = info.dwSize.Y; /* lines per page */ + *width = info.dwSize.X; /* characters per line */ } else { /* Lines per page. Use buffer coords instead of buffer size. */ - FRAME_LINES (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom - - info.srWindow.Top; + *height = 1 + info.srWindow.Bottom - info.srWindow.Top; /* Characters per line. Use buffer coords instead of buffer size. */ - SET_FRAME_COLS (SELECTED_FRAME (), 1 + info.srWindow.Right - - info.srWindow.Left); + *width = 1 + info.srWindow.Right - info.srWindow.Left; } if (os_subtype == OS_NT) @@ -747,6 +744,9 @@ initialize_w32_display (struct terminal *term) else w32_console_unicode_input = 0; + /* This is needed by w32notify.c:send_notifications. */ + dwMainThreadId = GetCurrentThreadId (); + /* Setup w32_display_info structure for this frame. */ w32_initialize_display_info (build_string ("Console"));