diff options
| author | Jim Blandy | 1991-07-19 16:05:34 +0000 |
|---|---|---|
| committer | Jim Blandy | 1991-07-19 16:05:34 +0000 |
| commit | 62c07cc72d59a0466680c0d5328aeac66c0eff99 (patch) | |
| tree | ae6f9f7a7692118a5bb3e4b31d6530890778e385 /src | |
| parent | b4da00e92a09a2ee2cfb5df2ec111636c66e1597 (diff) | |
| download | emacs-62c07cc72d59a0466680c0d5328aeac66c0eff99.tar.gz emacs-62c07cc72d59a0466680c0d5328aeac66c0eff99.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/termhooks.h | 23 | ||||
| -rw-r--r-- | src/window.c | 20 |
2 files changed, 36 insertions, 7 deletions
diff --git a/src/termhooks.h b/src/termhooks.h index aff95c7548d..bb6f29ce471 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -63,6 +63,13 @@ extern int (*read_socket_hook) (); | |||
| 63 | button releases. */ | 63 | button releases. */ |
| 64 | extern int (*mouse_tracking_enable_hook) ( /* int ENABLE */ ); | 64 | extern int (*mouse_tracking_enable_hook) ( /* int ENABLE */ ); |
| 65 | 65 | ||
| 66 | /* When reading from a minibuffer in a different screen, Emacs wants | ||
| 67 | to shift the highlight from the selected screen to the minibuffer's | ||
| 68 | screen; under X, this means it lies about where the focus is. | ||
| 69 | This hook tells the window system code to re-decide where to put | ||
| 70 | the highlight. */ | ||
| 71 | extern void (*screen_rehighlight_hook) ( /* SCREEN_PTR s */ ); | ||
| 72 | |||
| 66 | /* If nonzero, send all terminal output characters to this stream also. */ | 73 | /* If nonzero, send all terminal output characters to this stream also. */ |
| 67 | 74 | ||
| 68 | extern FILE *termscript; | 75 | extern FILE *termscript; |
| @@ -83,9 +90,13 @@ struct input_event { | |||
| 83 | enum { | 90 | enum { |
| 84 | no_event, /* nothing happened. This should never | 91 | no_event, /* nothing happened. This should never |
| 85 | actually appear in the event queue. */ | 92 | actually appear in the event queue. */ |
| 86 | ascii_keystroke, /* The ASCII code is in .code. Note that | 93 | ascii_keystroke, /* The ASCII code is in .code. |
| 87 | this includes meta-keys, and the modifiers | 94 | .screen is the screen in which the key |
| 88 | field of the event is unused. */ | 95 | was typed. |
| 96 | Note that this includes meta-keys, and | ||
| 97 | the modifiers field of the event | ||
| 98 | is unused. */ | ||
| 99 | |||
| 89 | non_ascii_keystroke, /* .code is a number identifying the | 100 | non_ascii_keystroke, /* .code is a number identifying the |
| 90 | function key. A code N represents | 101 | function key. A code N represents |
| 91 | a key whose name is | 102 | a key whose name is |
| @@ -93,7 +104,9 @@ struct input_event { | |||
| 93 | is a table in keyboard.c to which you | 104 | is a table in keyboard.c to which you |
| 94 | should feel free to add missing keys. | 105 | should feel free to add missing keys. |
| 95 | .modifiers holds the state of the | 106 | .modifiers holds the state of the |
| 96 | modifier keys. */ | 107 | modifier keys. |
| 108 | .screen is the screen in which the key | ||
| 109 | was typed. */ | ||
| 97 | mouse_click, /* The button number is in .code. | 110 | mouse_click, /* The button number is in .code. |
| 98 | .modifiers holds the state of the | 111 | .modifiers holds the state of the |
| 99 | modifier keys. | 112 | modifier keys. |
| @@ -118,10 +131,12 @@ struct input_event { | |||
| 118 | should apply to. | 131 | should apply to. |
| 119 | .timestamp gives a timestamp (in | 132 | .timestamp gives a timestamp (in |
| 120 | milliseconds) for the click. */ | 133 | milliseconds) for the click. */ |
| 134 | #if 0 | ||
| 121 | screen_selected, /* The user has moved the focus to another | 135 | screen_selected, /* The user has moved the focus to another |
| 122 | screen. | 136 | screen. |
| 123 | .screen is the screen that should become | 137 | .screen is the screen that should become |
| 124 | selected at the next convenient time. */ | 138 | selected at the next convenient time. */ |
| 139 | #endif | ||
| 125 | } kind; | 140 | } kind; |
| 126 | 141 | ||
| 127 | Lisp_Object code; | 142 | Lisp_Object code; |
diff --git a/src/window.c b/src/window.c index aa1d9b1bcdc..8c5d5fd7f26 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License | |||
| 18 | along with GNU Emacs; see the file COPYING. If not, write to | 18 | along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 19 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 20 | 20 | ||
| 21 | #include <stdio.h> | ||
| 21 | 22 | ||
| 22 | #include "config.h" | 23 | #include "config.h" |
| 23 | #include "lisp.h" | 24 | #include "lisp.h" |
| @@ -27,6 +28,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 27 | #include "commands.h" | 28 | #include "commands.h" |
| 28 | #include "indent.h" | 29 | #include "indent.h" |
| 29 | #include "termchar.h" | 30 | #include "termchar.h" |
| 31 | #include "termhooks.h" | ||
| 30 | #include "disptab.h" | 32 | #include "disptab.h" |
| 31 | 33 | ||
| 32 | Lisp_Object Qwindowp; | 34 | Lisp_Object Qwindowp; |
| @@ -350,7 +352,6 @@ window_from_coordinates (screen, x, y, modeline_p) | |||
| 350 | 352 | ||
| 351 | if (found) | 353 | if (found) |
| 352 | { | 354 | { |
| 353 | |||
| 354 | *modeline_p = (found == -1); | 355 | *modeline_p = (found == -1); |
| 355 | return tem; | 356 | return tem; |
| 356 | } | 357 | } |
| @@ -458,6 +459,8 @@ from overriding motion of point in order to display at this exact start.") | |||
| 458 | w->force_start = Qt; | 459 | w->force_start = Qt; |
| 459 | w->update_mode_line = Qt; | 460 | w->update_mode_line = Qt; |
| 460 | XFASTINT (w->last_modified) = 0; | 461 | XFASTINT (w->last_modified) = 0; |
| 462 | if (!EQ (window, selected_window)) | ||
| 463 | windows_or_buffers_changed++; | ||
| 461 | return pos; | 464 | return pos; |
| 462 | } | 465 | } |
| 463 | 466 | ||
| @@ -897,7 +900,7 @@ global minibuffer screen is in use and MINIBUF is t, all screens are used.") | |||
| 897 | return window; | 900 | return window; |
| 898 | } | 901 | } |
| 899 | 902 | ||
| 900 | DEFUN ("other-window", Fother_window, Sother_window, 1, 1, "p", | 903 | DEFUN ("other-window", Fother_window, Sother_window, 1, 2, "p", |
| 901 | "Select the ARG'th different window on this screen.\n\ | 904 | "Select the ARG'th different window on this screen.\n\ |
| 902 | All windows on current screen are arranged in a cyclic order.\n\ | 905 | All windows on current screen are arranged in a cyclic order.\n\ |
| 903 | This command selects the window ARG steps away in that order.\n\ | 906 | This command selects the window ARG steps away in that order.\n\ |
| @@ -1392,13 +1395,24 @@ before each command.") | |||
| 1392 | 1395 | ||
| 1393 | selected_window = window; | 1396 | selected_window = window; |
| 1394 | #ifdef MULTI_SCREEN | 1397 | #ifdef MULTI_SCREEN |
| 1395 | if (XSCREEN (WINDOW_SCREEN (w)) != selected_screen) | 1398 | /* If we're selecting the minibuffer window of the selected screen, |
| 1399 | don't change the selected screen, even if the minibuffer is on | ||
| 1400 | a different screen. */ | ||
| 1401 | if (XSCREEN (WINDOW_SCREEN (w)) != selected_screen | ||
| 1402 | && ! EQ (SCREEN_MINIBUF_WINDOW (selected_screen), window)) | ||
| 1396 | { | 1403 | { |
| 1397 | XSCREEN (WINDOW_SCREEN (w))->selected_window = window; | 1404 | XSCREEN (WINDOW_SCREEN (w))->selected_window = window; |
| 1398 | Fselect_screen (WINDOW_SCREEN (w), Qnil); | 1405 | Fselect_screen (WINDOW_SCREEN (w), Qnil); |
| 1399 | } | 1406 | } |
| 1400 | else | 1407 | else |
| 1401 | selected_screen->selected_window = window; | 1408 | selected_screen->selected_window = window; |
| 1409 | |||
| 1410 | /* When using the global minibuffer screen, we want the highlight to | ||
| 1411 | go to the minibuffer's screen, and when we finish, we want the highlight | ||
| 1412 | to return to the original screen. Call the hook to put the highlight | ||
| 1413 | where it belongs. */ | ||
| 1414 | if (screen_rehighlight_hook) | ||
| 1415 | (*screen_rehighlight_hook) (); | ||
| 1402 | #endif | 1416 | #endif |
| 1403 | 1417 | ||
| 1404 | record_buffer (w->buffer); | 1418 | record_buffer (w->buffer); |