Fix @direntry, add @dircategory.
[bpt/emacs.git] / src / w32inevt.c
index 2a2cf63..1b2b662 100644 (file)
@@ -49,6 +49,9 @@ extern void reinvoke_input_signal (void);
 /* from dispnew.c */
 extern int change_frame_size (FRAME_PTR, int, int, int, int);
 
+/* from w32console.c */
+extern int w32_use_full_screen_buffer;
+
 /* from w32fns.c */
 extern Lisp_Object Vw32_alt_is_meta;
 extern unsigned int map_keypad_keys (unsigned int, unsigned int);
@@ -107,7 +110,7 @@ fill_queue (BOOL block)
 static FRAME_PTR 
 get_frame (void)
 {
-  return selected_frame;
+  return SELECTED_FRAME ();
 }
 
 /* Translate console modifiers to emacs modifiers.  
@@ -498,9 +501,7 @@ w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state)
 /* Mouse position hook.  */
 void 
 w32_console_mouse_position (FRAME_PTR *f,
-#ifndef MULE
                            int insist,
-#endif
                            Lisp_Object *bar_window,
                            enum scroll_bar_part *part,
                            Lisp_Object *x,
@@ -509,14 +510,12 @@ w32_console_mouse_position (FRAME_PTR *f,
 {
   BLOCK_INPUT;
 
-#ifndef MULE  
   insist = insist;
-#endif
 
   *f = get_frame ();
   *bar_window = Qnil;
   *part = 0;
-  selected_frame->mouse_moved = 0;
+  SELECTED_FRAME ()->mouse_moved = 0;
   
   *x = movement_pos.X;
   *y = movement_pos.Y;
@@ -532,7 +531,7 @@ mouse_moved_to (int x, int y)
   /* If we're in the same place, ignore it */
   if (x != movement_pos.X || y != movement_pos.Y)
     {
-      selected_frame->mouse_moved = 1;
+      SELECTED_FRAME ()->mouse_moved = 1;
       movement_pos.X = x;
       movement_pos.Y = y;
       movement_time = GetTickCount ();
@@ -688,11 +687,10 @@ w32_console_read_socket (int sd, struct input_event *bufp, int numchars,
              numchars -= add;
              break;
 
-#if 0
             case WINDOW_BUFFER_SIZE_EVENT:
-             resize_event (&queue_ptr->Event.WindowBufferSizeEvent);
+             if (w32_use_full_screen_buffer)
+               resize_event (&queue_ptr->Event.WindowBufferSizeEvent);
              break;
-#endif
             
             case MENU_EVENT:
             case FOCUS_EVENT:
@@ -711,7 +709,8 @@ w32_console_read_socket (int sd, struct input_event *bufp, int numchars,
   /* We don't get told about changes in the window size (only the buffer
      size, which we no longer care about), so we have to check it
      periodically.  */
-  maybe_generate_resize_event ();
+  if (!w32_use_full_screen_buffer)
+    maybe_generate_resize_event ();
 
   UNBLOCK_INPUT;
   return ret;