# HG changeset patch # User Eli Zaretskii # Date 876760824 0 # Node ID 65c394bb8b1713b8c00f93f66e0d0784b5487537 # Parent 0d4dec332d850c09cb63bb2344e81098cd72f20a (mouse_get_pos): Remove reduntant call to `int86'. Clear the mouse-moved flag for all frames. Update last mouse position. (IT_set_menu_bar_lines): Remove. (x_set_menu_bar_lines): Call `set_menu_bar_line' (from frame.c) instead of duplicating its code. (IT_set_frame_parameters): Support the `title' and `reverse' properties. diff -r 0d4dec332d85 -r 65c394bb8b17 src/msdos.c --- a/src/msdos.c Mon Oct 13 16:29:00 1997 +0000 +++ b/src/msdos.c Mon Oct 13 16:40:24 1997 +0000 @@ -157,6 +157,17 @@ } } +static void +mouse_get_xy (int *x, int *y) +{ + union REGS regs; + + regs.x.ax = 0x0003; + int86 (0x33, ®s, ®s); + *x = regs.x.cx / 8; + *y = regs.x.dx / 8; +} + void mouse_moveto (x, y) int x, y; @@ -203,17 +214,6 @@ return (regs.x.bx != 0); } -static void -mouse_get_xy (int *x, int *y) -{ - union REGS regs; - - regs.x.ax = 0x0003; - int86 (0x33, ®s, ®s); - *x = regs.x.cx / 8; - *y = regs.x.dx / 8; -} - void mouse_get_pos (f, insist, bar_window, part, x, y, time) FRAME_PTR *f; @@ -223,17 +223,18 @@ unsigned long *time; { int ix, iy; - union REGS regs; - - regs.x.ax = 0x0003; - int86 (0x33, ®s, ®s); + Lisp_Object frame, tail; + + /* Clear the mouse-moved flag for every frame on this display. */ + FOR_EACH_FRAME (tail, frame) + XFRAME (frame)->mouse_moved = 0; + *f = selected_frame; *bar_window = Qnil; mouse_get_xy (&ix, &iy); - selected_frame->mouse_moved = 0; - *x = make_number (ix); - *y = make_number (iy); *time = event_timestamp (); + *x = make_number (mouse_last_x = ix); + *y = make_number (mouse_last_y = iy); } static void @@ -783,63 +784,20 @@ { } -/* This was more or less copied from xterm.c - - Nowadays, the corresponding function under X is `x_set_menu_bar_lines_1' - on xfns.c */ - -static void -IT_set_menu_bar_lines (window, n) - Lisp_Object window; - int n; +/* set-window-configuration on window.c needs this. */ +void +x_set_menu_bar_lines (f, value, oldval) + struct frame *f; + Lisp_Object value, oldval; { - struct window *w = XWINDOW (window); - - XSETFASTINT (w->last_modified, 0); - XSETFASTINT (w->last_overlay_modified, 0); - XSETFASTINT (w->top, XFASTINT (w->top) + n); - XSETFASTINT (w->height, XFASTINT (w->height) - n); - - /* Handle just the top child in a vertical split. */ - if (!NILP (w->vchild)) - IT_set_menu_bar_lines (w->vchild, n); - - /* Adjust all children in a horizontal split. */ - for (window = w->hchild; !NILP (window); window = w->next) - { - w = XWINDOW (window); - IT_set_menu_bar_lines (window, n); - } + set_menu_bar_lines (f, value, oldval); } /* This was copied from xfns.c */ Lisp_Object Qbackground_color; Lisp_Object Qforeground_color; - -void -x_set_menu_bar_lines (f, value, oldval) - struct frame *f; - Lisp_Object value, oldval; -{ - int nlines; - int olines = FRAME_MENU_BAR_LINES (f); - - /* Right now, menu bars don't work properly in minibuf-only frames; - most of the commands try to apply themselves to the minibuffer - frame itslef, and get an error because you can't switch buffers - in or split the minibuffer window. */ - if (FRAME_MINIBUF_ONLY_P (f)) - return; - - if (INTEGERP (value)) - nlines = XINT (value); - else - nlines = 0; - - FRAME_MENU_BAR_LINES (f) = nlines; - IT_set_menu_bar_lines (f->root_window, nlines - olines); -} +extern Lisp_Object Qtitle; /* IT_set_terminal_modes is called when emacs is started, resumed, and whenever the screen is redrawn! */ @@ -1010,9 +968,21 @@ fprintf (termscript, "\n", new_color); } } - else if (EQ (prop, intern ("menu-bar-lines"))) - x_set_menu_bar_lines (f, val, 0); - + else if (EQ (prop, Qtitle)) + { + x_set_title (f, val); + if (termscript) + fprintf (termscript, "\n", XSTRING (val)->data); + } + else if (EQ (prop, intern ("reverse")) && EQ (val, Qt)) + { + unsigned long fg = FRAME_FOREGROUND_PIXEL (f); + + FRAME_FOREGROUND_PIXEL (f) = FRAME_BACKGROUND_PIXEL (f); + FRAME_BACKGROUND_PIXEL (f) = fg; + if (termscript) + fprintf (termscript, "\n"); + } store_frame_param (f, prop, val); }