Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 308d34e9f07d |
children | 53c066311921 |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
1 /* The event_stream interface for X11 with Xt, and/or tty frames. | 1 /* The event_stream interface for X11 with Xt, and/or tty frames. |
2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc. |
3 Copyright (C) 1995 Sun Microsystems, Inc. | 3 Copyright (C) 1995 Sun Microsystems, Inc. |
4 Copyright (C) 1996, 2001, 2002, 2003, 2010 Ben Wing. | 4 Copyright (C) 1996, 2001, 2002, 2003, 2010 Ben Wing. |
5 Copyright (C) 2010 Didier Verna | |
5 | 6 |
6 This file is part of XEmacs. | 7 This file is part of XEmacs. |
7 | 8 |
8 XEmacs is free software; you can redistribute it and/or modify it | 9 XEmacs is free software: you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 10 under the terms of the GNU General Public License as published by the |
10 Free Software Foundation; either version 2, or (at your option) any | 11 Free Software Foundation, either version 3 of the License, or (at your |
11 later version. | 12 option) any later version. |
12 | 13 |
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 14 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 for more details. | 17 for more details. |
17 | 18 |
18 You should have received a copy of the GNU General Public License | 19 You should have received a copy of the GNU General Public License |
19 along with XEmacs; see the file COPYING. If not, write to | 20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 Boston, MA 02111-1307, USA. */ | |
22 | 21 |
23 /* Synched up with: Not in FSF. */ | 22 /* Synched up with: Not in FSF. */ |
24 | 23 |
25 /* NOTE: It would be possible to fix things so that all of GTK, Windows, X, | 24 /* NOTE: It would be possible to fix things so that all of GTK, Windows, X, |
26 TTY and stream can have consoles at the same time. We already do lots | 25 TTY and stream can have consoles at the same time. We already do lots |
48 #include "window.h" | 47 #include "window.h" |
49 | 48 |
50 #include "console-tty.h" | 49 #include "console-tty.h" |
51 | 50 |
52 #include "console-x-impl.h" | 51 #include "console-x-impl.h" |
53 #include "objects-x.h" | 52 #include "fontcolor-x.h" |
54 #include "../lwlib/lwlib.h" | 53 #include "../lwlib/lwlib.h" |
55 #include "EmacsFrame.h" | 54 #include "EmacsFrame.h" |
56 | 55 |
57 #include "sysproc.h" /* for MAXDESC */ | 56 #include "sysproc.h" /* for MAXDESC */ |
58 #include "systime.h" | 57 #include "systime.h" |
130 void debug_process_finalization (Lisp_Process *p); | 129 void debug_process_finalization (Lisp_Process *p); |
131 void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event, | 130 void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event, |
132 Boolean *continue_to_dispatch); | 131 Boolean *continue_to_dispatch); |
133 | 132 |
134 static int last_quit_check_signal_tick_count; | 133 static int last_quit_check_signal_tick_count; |
135 | |
136 Lisp_Object Qsans_modifiers; | |
137 | 134 |
138 #define THIS_IS_X | 135 #define THIS_IS_X |
139 #include "event-xlike-inc.c" | 136 #include "event-xlike-inc.c" |
140 | 137 |
141 | 138 |
230 hash_table = xd->x_keysym_map_hash_table; | 227 hash_table = xd->x_keysym_map_hash_table; |
231 if (HASH_TABLEP (hash_table)) | 228 if (HASH_TABLEP (hash_table)) |
232 Fclrhash (hash_table); | 229 Fclrhash (hash_table); |
233 else | 230 else |
234 xd->x_keysym_map_hash_table = hash_table = | 231 xd->x_keysym_map_hash_table = hash_table = |
235 make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); | 232 make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, Qequal); |
236 | 233 |
237 for (keysym = xd->x_keysym_map, | 234 for (keysym = xd->x_keysym_map, |
238 keysyms_per_code = xd->x_keysym_map_keysyms_per_code, | 235 keysyms_per_code = xd->x_keysym_map_keysyms_per_code, |
239 keysym_end = keysym + (key_code_count * keysyms_per_code); | 236 keysym_end = keysym + (key_code_count * keysyms_per_code); |
240 keysym < keysym_end; | 237 keysym < keysym_end; |
1896 != VisibilityFullyObscured) ? 1 : -1); | 1893 != VisibilityFullyObscured) ? 1 : -1); |
1897 } | 1894 } |
1898 break; | 1895 break; |
1899 | 1896 |
1900 case ConfigureNotify: | 1897 case ConfigureNotify: |
1898 { | |
1899 XEvent xev; | |
1900 | |
1901 /* Let's eat all events of that type to avoid useless | |
1902 reconfigurations. */ | |
1903 while (XCheckTypedWindowEvent | |
1904 (DEVICE_X_DISPLAY (XDEVICE (FRAME_DEVICE (f))), | |
1905 XtWindow (FRAME_X_TEXT_WIDGET (f)), | |
1906 ConfigureNotify, | |
1907 &xev) | |
1908 == True); | |
1909 } | |
1910 /* #### NOTE: in fact, the frame faces didn't really change, but if some | |
1911 #### of them have their background-placement property set to | |
1912 #### absolute, we need a redraw. This is semantically equivalent to | |
1913 #### changing the background pixmap. -- dvl */ | |
1914 x_get_frame_text_position (f); | |
1915 MARK_FRAME_FACES_CHANGED (f); | |
1916 | |
1901 #ifdef HAVE_XIM | 1917 #ifdef HAVE_XIM |
1902 XIM_SetGeometry (f); | 1918 XIM_SetGeometry (f); |
1903 #endif | 1919 #endif |
1904 break; | 1920 break; |
1905 | 1921 |
3022 /************************************************************************/ | 3038 /************************************************************************/ |
3023 | 3039 |
3024 void | 3040 void |
3025 syms_of_event_Xt (void) | 3041 syms_of_event_Xt (void) |
3026 { | 3042 { |
3027 DEFSYMBOL (Qsans_modifiers); | |
3028 DEFSYMBOL (Qself_insert_command); | |
3029 } | 3043 } |
3030 | 3044 |
3031 void | 3045 void |
3032 reinit_vars_of_event_Xt (void) | 3046 reinit_vars_of_event_Xt (void) |
3033 { | 3047 { |