Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 149:538048ae2ab8 r20-3b1
Import from CVS: tag r20-3b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:36:16 +0200 |
parents | 6608ceec7cf8 |
children | 25f70ba0133c |
comparison
equal
deleted
inserted
replaced
148:f659db2a1f73 | 149:538048ae2ab8 |
---|---|
2157 struct x_device *xd = DEVICE_X_DATA (d); | 2157 struct x_device *xd = DEVICE_X_DATA (d); |
2158 char c, quit_char; | 2158 char c, quit_char; |
2159 Bool *critical = (Bool *) data; | 2159 Bool *critical = (Bool *) data; |
2160 Lisp_Object keysym; | 2160 Lisp_Object keysym; |
2161 | 2161 |
2162 if (critical) *critical = False; | 2162 if (critical) |
2163 if (event->type != KeyPress) return 0; | 2163 *critical = False; |
2164 if (! x_any_window_to_frame (d, event->xany.window)) return 0; | 2164 if ((event->type != KeyPress) || |
2165 if (event->xkey.state | 2165 (! x_any_window_to_frame (d, event->xany.window)) || |
2166 & (xd->MetaMask | xd->HyperMask | xd->SuperMask | xd->AltMask)) | 2166 (event->xkey.state |
2167 & (xd->MetaMask | xd->HyperMask | xd->SuperMask | xd->AltMask))) | |
2167 return 0; | 2168 return 0; |
2168 | 2169 |
2169 /* This duplicates some code that exists elsewhere, but it's relatively | 2170 /* This duplicates some code that exists elsewhere, but it's relatively |
2170 fast and doesn't cons. | 2171 fast and doesn't cons. */ |
2171 */ | |
2172 keysym = x_to_emacs_keysym (&event->xkey, 1); | 2172 keysym = x_to_emacs_keysym (&event->xkey, 1); |
2173 if (NILP (keysym)) return 0; | 2173 if (NILP (keysym)) return 0; |
2174 if (CHAR_OR_CHAR_INTP (keysym)) | 2174 if (CHAR_OR_CHAR_INTP (keysym)) |
2175 c = XCHAR_OR_CHAR_INT (keysym); | 2175 c = XCHAR_OR_CHAR_INT (keysym); |
2176 /* Highly doubtful that these are the quit character, but... */ | 2176 /* Highly doubtful that these are the quit character, but... */ |
2329 emacs_Xt_quit_p (); | 2329 emacs_Xt_quit_p (); |
2330 #endif | 2330 #endif |
2331 #endif | 2331 #endif |
2332 | 2332 |
2333 /* This function used to simply check whether there were any X | 2333 /* This function used to simply check whether there were any X |
2334 events (or is user_p was 1, it iterated over all the pending | 2334 events (or if user_p was 1, it iterated over all the pending |
2335 X events using XCheckIfEvent(), looking for keystrokes and | 2335 X events using XCheckIfEvent(), looking for keystrokes and |
2336 button events). That worked in the old cheesoid event loop, | 2336 button events). That worked in the old cheesoid event loop, |
2337 which didn't go through XtAppDispatchEvent(), but it doesn't | 2337 which didn't go through XtAppDispatchEvent(), but it doesn't |
2338 work any more -- X events may not result in anything. For | 2338 work any more -- X events may not result in anything. For |
2339 example, a button press in a blank part of the menubar appears | 2339 example, a button press in a blank part of the menubar appears |