Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 793:e38acbeb1cae
[xemacs-hg @ 2002-03-29 04:46:17 by ben]
lots o' fixes
etc/ChangeLog: New file.
Separated out all entries for etc/ into their own ChangeLog.
Includes entries for the following files:
etc/BABYL, etc/BETA, etc/CHARSETS, etc/DISTRIB, etc/Emacs.ad,
etc/FTP, etc/GNUS-NEWS, etc/GOATS, etc/HELLO, etc/INSTALL,
etc/MACHINES, etc/MAILINGLISTS, etc/MSDOS, etc/MYTHOLOGY, etc/NEWS,
etc/OXYMORONS, etc/PACKAGES, etc/README, etc/TUTORIAL,
etc/TUTORIAL.de, etc/TUTORIAL.ja, etc/TUTORIAL.ko, etc/TUTORIAL.se,
etc/aliases.ksh, etc/altrasoft-logo.xpm, etc/check_cygwin_setup.sh,
etc/custom/example-themes/europe-theme.el,
etc/custom/example-themes/ex-custom-file,
etc/custom/example-themes/example-theme.el, etc/e/eterm.ti,
etc/edt-user.doc, etc/enriched.doc, etc/etags.1, etc/gnuserv.1,
etc/gnuserv.README, etc/package-index.LATEST.gpg,
etc/package-index.LATEST.pgp, etc/photos/jan.png, etc/recycle.xpm,
etc/refcard.tex, etc/sample.Xdefaults, etc/sample.emacs,
etc/sgml/CATALOG, etc/sgml/HTML32.dtd, etc/skk/SKK.tut.E,
etc/smilies/Face_ase.xbm, etc/smilies/Face_ase2.xbm,
etc/smilies/Face_ase3.xbm, etc/smilies/Face_smile.xbm,
etc/smilies/Face_weep.xbm, etc/sounds, etc/toolbar,
etc/toolbar/workshop-cap-up.xpm, etc/xemacs-ja.1, etc/xemacs.1,
etc/yow.lines, etc\BETA, etc\NEWS, etc\README, etc\TUTORIAL,
etc\TUTORIAL.de, etc\check_cygwin_setup.sh, etc\sample.init.el,
etc\unicode\README, etc\unicode\mule-ucs\*, etc\unicode\other\*
unicode/unicode-consortium/8859-16.TXT: New file.
mule/english.el: Define this charset now, since a bug was fixed that formerly
prevented it.
mule/ethio-util.el: Fix compile errors involving Unicode `characters', which should be
integers.
Makefile.in.in: Always include gui.c, to fix compile error when TTY-only.
EmacsFrame.c, abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, bytecode.h, callint.c, callproc.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.c, console-msw.h, console-tty.c, console-x.c, console-x.h, console.c, console.h, data.c, database.c, device-gtk.c, device-msw.c, device-x.c, device.c, device.h, dialog-msw.c, doc.c, doprnt.c, dumper.c, dynarr.c, editfns.c, eldap.c, eldap.h, elhash.c, elhash.h, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-tty.c, event-unixoid.c, events.c, events.h, extents.c, extents.h, faces.c, faces.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, frame-gtk.c, frame-msw.c, frame-tty.c, frame-x.c, frame.c, frame.h, free-hook.c, general-slots.h, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gtk-xemacs.c, gui-msw.c, gui-x.c, gui-x.h, gui.c, gui.h, gutter.c, gutter.h, indent.c, input-method-xlib.c, insdel.c, keymap.c, keymap.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-canna.c, mule-ccl.c, mule-charset.c, mule-wnnfns.c, native-gtk-toolbar.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, opaque.c, opaque.h, postgresql.c, postgresql.h, print.c, process-unix.c, process.c, process.h, rangetab.c, rangetab.h, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, search.c, select-gtk.c, select-x.c, sound.c, specifier.c, specifier.h, strftime.c, symbols.c, symeval.h, syntax.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, toolbar.h, tooltalk.c, tooltalk.h, ui-gtk.c, ui-gtk.h, undo.c, vm-limit.c, window.c, window.h: Eliminate XSETFOO. Replace all usages with wrap_foo().
Make symbol->name a Lisp_Object, not Lisp_String *. Eliminate
nearly all uses of Lisp_String * in favor of Lisp_Object, and
correct macros so most of them favor Lisp_Object.
Create new error-behavior ERROR_ME_DEBUG_WARN -- output warnings,
but at level `debug' (usually ignored). Use it when instantiating
specifiers, so problems can be debugged. Move
log-warning-minimum-level into C so that we can optimize
ERROR_ME_DEBUG_WARN.
Fix warning levels consistent with new definitions.
Add default_ and parent fields to char table; not yet implemented.
New fun Dynarr_verify(); use for further error checking on Dynarrs.
Rearrange code at top of lisp.h in conjunction with dynarr changes.
Fix eifree(). Use Eistrings in various places
(format_event_object(), where_is_to_char(), and callers thereof)
to avoid fixed-size strings buffers. New fun write_eistring().
Reindent and fix GPM code to follow standards.
Set default MS Windows font to Lucida Console (same size as
Courier New but less interline spacing, so more lines fit).
Increase default frame size on Windows to 50 lines. (If that's too
big for the workspace, the frame will be shrunk as necessary.)
Fix problem with text files with no newlines (). (Change
`convert-eol' coding system to use `nil' for autodetect,
consistent with make-coding-system.)
Correct compile warnings in vm-limit.c.
Fix handling of reverse-direction charsets to avoid errors when
opening (e.g.) mule-ucs/lisp/reldata/uiso8859-6.el.
Recode some object printing methods to use write_fmt_string()
instead of a fixed buffer and sprintf.
Turn on display of png comments as warnings (level `info'), now
that they're unobtrusive.
Revamped the sound documentation.
Fixed bug in redisplay w.r.t. hscroll/truncation/continuation
glyphs causing jumping up and down of the lines, since they're
bigger than the line size. (It was seen most obviously when
there's a horizontal scroll bar, e.g. do C-h a glyph or something
like that.) The problem was that the glyph-contrib-p setting on
glyphs was ignored even if it was set properly, which it wasn't
until now.
author | ben |
---|---|
date | Fri, 29 Mar 2002 04:49:13 +0000 |
parents | 026c5bf9c134 |
children | a5954632b187 |
comparison
equal
deleted
inserted
replaced
792:4e83fdb13eb9 | 793:e38acbeb1cae |
---|---|
1259 XButtonEvent *ev = &x_event->xbutton; | 1259 XButtonEvent *ev = &x_event->xbutton; |
1260 struct frame *frame = x_window_to_frame (d, ev->window); | 1260 struct frame *frame = x_window_to_frame (d, ev->window); |
1261 | 1261 |
1262 if (! frame) | 1262 if (! frame) |
1263 return 0; /* not for us */ | 1263 return 0; /* not for us */ |
1264 XSETFRAME (emacs_event->channel, frame); | 1264 emacs_event->channel = wrap_frame (frame); |
1265 | 1265 |
1266 emacs_event->event_type = (x_event->type == ButtonPress) ? | 1266 emacs_event->event_type = (x_event->type == ButtonPress) ? |
1267 button_press_event : button_release_event; | 1267 button_press_event : button_release_event; |
1268 | 1268 |
1269 emacs_event->event.button.modifiers = modifiers; | 1269 emacs_event->event.button.modifiers = modifiers; |
1306 &event2.state)) | 1306 &event2.state)) |
1307 ev = &event2; /* only one structure copy */ | 1307 ev = &event2; /* only one structure copy */ |
1308 | 1308 |
1309 DEVICE_X_MOUSE_TIMESTAMP (d) = ev->time; | 1309 DEVICE_X_MOUSE_TIMESTAMP (d) = ev->time; |
1310 | 1310 |
1311 XSETFRAME (emacs_event->channel, frame); | 1311 emacs_event->channel = wrap_frame (frame); |
1312 emacs_event->event_type = pointer_motion_event; | 1312 emacs_event->event_type = pointer_motion_event; |
1313 emacs_event->timestamp = ev->time; | 1313 emacs_event->timestamp = ev->time; |
1314 emacs_event->event.motion.x = ev->x; | 1314 emacs_event->event.motion.x = ev->x; |
1315 emacs_event->event.motion.y = ev->y; | 1315 emacs_event->event.motion.y = ev->y; |
1316 if (ev->state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT; | 1316 if (ev->state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT; |
1351 | 1351 |
1352 if (! frame) | 1352 if (! frame) |
1353 return 0; /* not for us */ | 1353 return 0; /* not for us */ |
1354 | 1354 |
1355 GCPRO4 (l_type, l_data, l_dndlist, l_item); | 1355 GCPRO4 (l_type, l_data, l_dndlist, l_item); |
1356 XSETFRAME (emacs_event->channel, frame); | 1356 emacs_event->channel = wrap_frame (frame); |
1357 | 1357 |
1358 emacs_event->event_type = misc_user_event; | 1358 emacs_event->event_type = misc_user_event; |
1359 emacs_event->timestamp = DEVICE_X_LAST_SERVER_TIMESTAMP (d); | 1359 emacs_event->timestamp = DEVICE_X_LAST_SERVER_TIMESTAMP (d); |
1360 | 1360 |
1361 state=DndDragButtons(x_event); | 1361 state=DndDragButtons(x_event); |
1515 | 1515 |
1516 if (!frame) | 1516 if (!frame) |
1517 return 0; | 1517 return 0; |
1518 | 1518 |
1519 emacs_event->event_type = magic_event; | 1519 emacs_event->event_type = magic_event; |
1520 XSETFRAME (emacs_event->channel, frame); | 1520 emacs_event->channel = wrap_frame (frame); |
1521 | 1521 |
1522 break; | 1522 break; |
1523 } | 1523 } |
1524 } | 1524 } |
1525 return 1; | 1525 return 1; |
1581 { | 1581 { |
1582 Lisp_Object frm; | 1582 Lisp_Object frm; |
1583 Lisp_Object conser; | 1583 Lisp_Object conser; |
1584 struct gcpro gcpro1; | 1584 struct gcpro gcpro1; |
1585 | 1585 |
1586 XSETFRAME (frm, f); | 1586 frm = wrap_frame (f); |
1587 conser = Fcons (frm, Fcons (FRAME_DEVICE (f), in_p ? Qt : Qnil)); | 1587 conser = Fcons (frm, Fcons (FRAME_DEVICE (f), in_p ? Qt : Qnil)); |
1588 GCPRO1 (conser); | 1588 GCPRO1 (conser); |
1589 emacs_handle_focus_change_preliminary (conser); | 1589 emacs_handle_focus_change_preliminary (conser); |
1590 enqueue_magic_eval_event (emacs_handle_focus_change_final, | 1590 enqueue_magic_eval_event (emacs_handle_focus_change_final, |
1591 conser); | 1591 conser); |
1637 /* both MapNotify and VisibilityNotify can cause this | 1637 /* both MapNotify and VisibilityNotify can cause this |
1638 JV is_visible has the same semantics as f->visible*/ | 1638 JV is_visible has the same semantics as f->visible*/ |
1639 static void | 1639 static void |
1640 change_frame_visibility (struct frame *f, int is_visible) | 1640 change_frame_visibility (struct frame *f, int is_visible) |
1641 { | 1641 { |
1642 Lisp_Object frame; | 1642 Lisp_Object frame = wrap_frame (f); |
1643 | 1643 |
1644 XSETFRAME (frame, f); | |
1645 | 1644 |
1646 if (!FRAME_VISIBLE_P (f) && is_visible) | 1645 if (!FRAME_VISIBLE_P (f) && is_visible) |
1647 { | 1646 { |
1648 FRAME_VISIBLE_P (f) = is_visible; | 1647 FRAME_VISIBLE_P (f) = is_visible; |
1649 /* This improves the double flicker when uniconifying a frame | 1648 /* This improves the double flicker when uniconifying a frame |
1674 } | 1673 } |
1675 | 1674 |
1676 static void | 1675 static void |
1677 handle_map_event (struct frame *f, XEvent *event) | 1676 handle_map_event (struct frame *f, XEvent *event) |
1678 { | 1677 { |
1679 Lisp_Object frame; | |
1680 | |
1681 XSETFRAME (frame, f); | |
1682 | 1678 |
1683 /* It seems that, given the multiplicity of window managers and X | 1679 /* It seems that, given the multiplicity of window managers and X |
1684 implementations, plus the fact that X was designed without | 1680 implementations, plus the fact that X was designed without |
1685 window managers or icons in mind and this was then grafted on | 1681 window managers or icons in mind and this was then grafted on |
1686 with about the skill of a drunk freshman med student attempting | 1682 with about the skill of a drunk freshman med student attempting |
1751 Note that `frame-iconified-p' queries the server | 1747 Note that `frame-iconified-p' queries the server |
1752 to determine whether the frame is currently iconified, | 1748 to determine whether the frame is currently iconified, |
1753 rather than consulting some internal (and likely | 1749 rather than consulting some internal (and likely |
1754 inaccurate) state flag. Therefore, ignoring the MapNotify | 1750 inaccurate) state flag. Therefore, ignoring the MapNotify |
1755 is correct. */ | 1751 is correct. */ |
1756 if (!FRAME_VISIBLE_P (f) && NILP (Fframe_iconified_p (frame))) | 1752 if (!FRAME_VISIBLE_P (f) && NILP (Fframe_iconified_p (wrap_frame (f)))) |
1757 #endif /* 0 */ | 1753 #endif /* 0 */ |
1758 change_frame_visibility (f, 1); | 1754 change_frame_visibility (f, 1); |
1759 } | 1755 } |
1760 else | 1756 else |
1761 { | 1757 { |
1766 | 1762 |
1767 static void | 1763 static void |
1768 handle_client_message (struct frame *f, XEvent *event) | 1764 handle_client_message (struct frame *f, XEvent *event) |
1769 { | 1765 { |
1770 struct device *d = XDEVICE (FRAME_DEVICE (f)); | 1766 struct device *d = XDEVICE (FRAME_DEVICE (f)); |
1771 Lisp_Object frame; | 1767 Lisp_Object frame = wrap_frame (f); |
1772 | |
1773 XSETFRAME (frame, f); | |
1774 | 1768 |
1775 if (event->xclient.message_type == DEVICE_XATOM_WM_PROTOCOLS (d) && | 1769 if (event->xclient.message_type == DEVICE_XATOM_WM_PROTOCOLS (d) && |
1776 (Atom) (event->xclient.data.l[0]) == DEVICE_XATOM_WM_DELETE_WINDOW (d)) | 1770 (Atom) (event->xclient.data.l[0]) == DEVICE_XATOM_WM_DELETE_WINDOW (d)) |
1777 { | 1771 { |
1778 /* WM_DELETE_WINDOW is a misc-user event, but other ClientMessages, | 1772 /* WM_DELETE_WINDOW is a misc-user event, but other ClientMessages, |
1948 break; | 1942 break; |
1949 | 1943 |
1950 case EnterNotify: | 1944 case EnterNotify: |
1951 if (event->xcrossing.detail != NotifyInferior) | 1945 if (event->xcrossing.detail != NotifyInferior) |
1952 { | 1946 { |
1953 Lisp_Object frame; | 1947 Lisp_Object frame = wrap_frame (f); |
1954 | 1948 |
1955 XSETFRAME (frame, f); | |
1956 /* FRAME_X_MOUSE_P (f) = 1; */ | 1949 /* FRAME_X_MOUSE_P (f) = 1; */ |
1957 va_run_hook_with_args (Qmouse_enter_frame_hook, 1, frame); | 1950 va_run_hook_with_args (Qmouse_enter_frame_hook, 1, frame); |
1958 } | 1951 } |
1959 break; | 1952 break; |
1960 | 1953 |
1961 case LeaveNotify: | 1954 case LeaveNotify: |
1962 if (event->xcrossing.detail != NotifyInferior) | 1955 if (event->xcrossing.detail != NotifyInferior) |
1963 { | 1956 { |
1964 Lisp_Object frame; | 1957 Lisp_Object frame = wrap_frame (f); |
1965 | 1958 |
1966 XSETFRAME (frame, f); | |
1967 /* FRAME_X_MOUSE_P (f) = 0; */ | 1959 /* FRAME_X_MOUSE_P (f) = 0; */ |
1968 va_run_hook_with_args (Qmouse_leave_frame_hook, 1, frame); | 1960 va_run_hook_with_args (Qmouse_leave_frame_hook, 1, frame); |
1969 } | 1961 } |
1970 break; | 1962 break; |
1971 | 1963 |
2318 emacs_Xt_select_process (Lisp_Process *p) | 2310 emacs_Xt_select_process (Lisp_Process *p) |
2319 { | 2311 { |
2320 Lisp_Object process; | 2312 Lisp_Object process; |
2321 int infd = event_stream_unixoid_select_process (p); | 2313 int infd = event_stream_unixoid_select_process (p); |
2322 | 2314 |
2323 XSETPROCESS (process, p); | 2315 process = wrap_process (p); |
2324 select_filedesc (infd, process); | 2316 select_filedesc (infd, process); |
2325 } | 2317 } |
2326 | 2318 |
2327 static void | 2319 static void |
2328 emacs_Xt_unselect_process (Lisp_Process *p) | 2320 emacs_Xt_unselect_process (Lisp_Process *p) |
2405 | 2397 |
2406 if (CONSOLE_X_P (con)) | 2398 if (CONSOLE_X_P (con)) |
2407 return; /* X consoles are automatically selected for when we | 2399 return; /* X consoles are automatically selected for when we |
2408 initialize them in Xt */ | 2400 initialize them in Xt */ |
2409 infd = event_stream_unixoid_select_console (con); | 2401 infd = event_stream_unixoid_select_console (con); |
2410 XSETCONSOLE (console, con); | 2402 console = wrap_console (con); |
2411 select_filedesc (infd, console); | 2403 select_filedesc (infd, console); |
2412 } | 2404 } |
2413 | 2405 |
2414 static void | 2406 static void |
2415 emacs_Xt_unselect_console (struct console *con) | 2407 emacs_Xt_unselect_console (struct console *con) |
2419 | 2411 |
2420 if (CONSOLE_X_P (con)) | 2412 if (CONSOLE_X_P (con)) |
2421 return; /* X consoles are automatically selected for when we | 2413 return; /* X consoles are automatically selected for when we |
2422 initialize them in Xt */ | 2414 initialize them in Xt */ |
2423 infd = event_stream_unixoid_unselect_console (con); | 2415 infd = event_stream_unixoid_unselect_console (con); |
2424 XSETCONSOLE (console, con); | 2416 console = wrap_console (con); |
2425 unselect_filedesc (infd); | 2417 unselect_filedesc (infd); |
2426 } | 2418 } |
2427 | 2419 |
2428 /* read an event from a tty, if one is available. Returns non-zero | 2420 /* read an event from a tty, if one is available. Returns non-zero |
2429 if an event was available. Note that when this function is | 2421 if an event was available. Note that when this function is |
2772 } | 2764 } |
2773 | 2765 |
2774 if (!NILP (dispatch_event_queue)) | 2766 if (!NILP (dispatch_event_queue)) |
2775 { | 2767 { |
2776 Lisp_Object event, event2; | 2768 Lisp_Object event, event2; |
2777 XSETEVENT (event2, emacs_event); | 2769 event2 = wrap_event (emacs_event); |
2778 event = dequeue_Xt_dispatch_event (); | 2770 event = dequeue_Xt_dispatch_event (); |
2779 Fcopy_event (event, event2); | 2771 Fcopy_event (event, event2); |
2780 Fdeallocate_event (event); | 2772 Fdeallocate_event (event); |
2781 } | 2773 } |
2782 else if (tty_events_occurred) | 2774 else if (tty_events_occurred) |