aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog28
-rw-r--r--src/dbusbind.c23
-rw-r--r--src/fontset.c4
-rw-r--r--src/keyboard.c8
4 files changed, 50 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d355e79163e..afa404ca7c1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -8,6 +8,28 @@
8 (xg_frame_resized, xg_frame_set_char_size): Call 8 (xg_frame_resized, xg_frame_set_char_size): Call
9 xg_clear_under_internal_border. 9 xg_clear_under_internal_border.
10 (xg_update_scrollbar_pos): Clear under old scroll bar position. 10 (xg_update_scrollbar_pos): Clear under old scroll bar position.
112010-01-05 Chong Yidong <cyd@stupidchicken.com>
12
13 * keyboard.c (read_key_sequence): Catch keyboard switch after
14 making a new tty frame (Bug#5095).
15
162010-01-05 Kenichi Handa <handa@m17n.org>
17
18 * fontset.c (fontset_find_font): Fix getting the frame pointer.
19
202010-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
21
22 * dbusbind.c (xd_remove_watch): Avoid trying to convert a void* to
23 Lisp_Object, preferring to convert a lisp_Object to a void* instead.
24 (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
25
262010-01-03 Michael Albinus <michael.albinus@gmx.de>
27
28 * dbusbind.c (xd_add_watch): Improve debug message.
29 (xd_remove_watch): Improve debug message. If DATA is the session
30 bus, unset D-Bus session environment.
31 (Fdbus_init_bus): Pass the bus as argument to
32 dbus_connection_set_watch_functions. (Bug#5283)
11 33
122010-01-01 Chong Yidong <cyd@stupidchicken.com> 342010-01-01 Chong Yidong <cyd@stupidchicken.com>
13 35
@@ -155,7 +177,7 @@
1552009-12-15 Michael Albinus <michael.albinus@gmx.de> 1772009-12-15 Michael Albinus <michael.albinus@gmx.de>
156 178
157 * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to 179 * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to
158 avoid compiler warnings. (Bug #5217). 180 avoid compiler warnings. (Bug #5217)
159 181
1602009-12-14 Kenichi Handa <handa@m17n.org> 1822009-12-14 Kenichi Handa <handa@m17n.org>
161 183
@@ -5330,7 +5352,7 @@
5330 (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. 5352 (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error.
5331 (xd_read_queued_messages): Catch Qdbus_error from the macros. 5353 (xd_read_queued_messages): Catch Qdbus_error from the macros.
5332 (all): Replace xsignal1, xsignal2, xsignal3 by the respective 5354 (all): Replace xsignal1, xsignal2, xsignal3 by the respective
5333 macro. (Bug#1186). 5355 macro. (Bug#1186)
5334 5356
53352008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) 53572008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change)
5336 5358
@@ -21224,7 +21246,7 @@ See ChangeLog.10 for earlier changes.
21224;; add-log-time-zone-rule: t 21246;; add-log-time-zone-rule: t
21225;; End: 21247;; End:
21226 21248
21227 Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. 21249 Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
21228 21250
21229 This file is part of GNU Emacs. 21251 This file is part of GNU Emacs.
21230 21252
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 7c0be49ab77..974a01e8ead 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -761,14 +761,14 @@ xd_add_watch (watch, data)
761 if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) 761 if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
762 { 762 {
763#if HAVE_DBUS_WATCH_GET_UNIX_FD 763#if HAVE_DBUS_WATCH_GET_UNIX_FD
764 /* TODO: Reverse these on Win32, which prefers the opposite. */ 764 /* TODO: Reverse these on Win32, which prefers the opposite. */
765 int fd = dbus_watch_get_unix_fd(watch); 765 int fd = dbus_watch_get_unix_fd(watch);
766 if (fd == -1) 766 if (fd == -1)
767 fd = dbus_watch_get_socket(watch); 767 fd = dbus_watch_get_socket(watch);
768#else 768#else
769 int fd = dbus_watch_get_fd(watch); 769 int fd = dbus_watch_get_fd(watch);
770#endif 770#endif
771 XD_DEBUG_MESSAGE ("%d", fd); 771 XD_DEBUG_MESSAGE ("fd %d", fd);
772 772
773 if (fd == -1) 773 if (fd == -1)
774 return FALSE; 774 return FALSE;
@@ -781,7 +781,8 @@ xd_add_watch (watch, data)
781 return TRUE; 781 return TRUE;
782} 782}
783 783
784/* Remove connection file descriptor from input_wait_mask. */ 784/* Remove connection file descriptor from input_wait_mask. DATA is
785 the used bus, either QCdbus_system_bus or QCdbus_session_bus. */
785void 786void
786xd_remove_watch (watch, data) 787xd_remove_watch (watch, data)
787 DBusWatch *watch; 788 DBusWatch *watch;
@@ -791,18 +792,25 @@ xd_remove_watch (watch, data)
791 if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) 792 if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
792 { 793 {
793#if HAVE_DBUS_WATCH_GET_UNIX_FD 794#if HAVE_DBUS_WATCH_GET_UNIX_FD
794 /* TODO: Reverse these on Win32, which prefers the opposite. */ 795 /* TODO: Reverse these on Win32, which prefers the opposite. */
795 int fd = dbus_watch_get_unix_fd(watch); 796 int fd = dbus_watch_get_unix_fd(watch);
796 if (fd == -1) 797 if (fd == -1)
797 fd = dbus_watch_get_socket(watch); 798 fd = dbus_watch_get_socket(watch);
798#else 799#else
799 int fd = dbus_watch_get_fd(watch); 800 int fd = dbus_watch_get_fd(watch);
800#endif 801#endif
801 XD_DEBUG_MESSAGE ("%d", fd); 802 XD_DEBUG_MESSAGE ("fd %d", fd);
802 803
803 if (fd == -1) 804 if (fd == -1)
804 return; 805 return;
805 806
807 /* Unset session environment. */
808 if ((data != NULL) && (data == (void*) XHASH (QCdbus_session_bus)))
809 {
810 XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
811 unsetenv ("DBUS_SESSION_BUS_ADDRESS");
812 }
813
806 /* Remove the file descriptor from input_wait_mask. */ 814 /* Remove the file descriptor from input_wait_mask. */
807 delete_keyboard_wait_descriptor (fd); 815 delete_keyboard_wait_descriptor (fd);
808 } 816 }
@@ -825,11 +833,12 @@ This is an internal function, it shall not be used outside dbus.el. */)
825 /* Open a connection to the bus. */ 833 /* Open a connection to the bus. */
826 connection = xd_initialize (bus); 834 connection = xd_initialize (bus);
827 835
828 /* Add the watch functions. */ 836 /* Add the watch functions. We pass also the bus as data, in order
837 to distinguish between the busses in xd_remove_watch. */
829 if (!dbus_connection_set_watch_functions (connection, 838 if (!dbus_connection_set_watch_functions (connection,
830 xd_add_watch, 839 xd_add_watch,
831 xd_remove_watch, 840 xd_remove_watch,
832 NULL, NULL, NULL)) 841 NULL, (void*) XHASH (bus), NULL))
833 XD_SIGNAL1 (build_string ("Cannot add watch functions")); 842 XD_SIGNAL1 (build_string ("Cannot add watch functions"));
834 843
835 /* Return. */ 844 /* Return. */
diff --git a/src/fontset.c b/src/fontset.c
index 30620e511c8..b62c779be70 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -533,8 +533,8 @@ fontset_find_font (fontset, c, face, id, fallback)
533{ 533{
534 Lisp_Object vec, font_group; 534 Lisp_Object vec, font_group;
535 int i, charset_matched = 0, found_index; 535 int i, charset_matched = 0, found_index;
536 FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))) 536 FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))
537 ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset)); 537 ? XFRAME (FONTSET_FRAME (fontset)) : XFRAME (selected_frame));
538 Lisp_Object rfont_def; 538 Lisp_Object rfont_def;
539 539
540 font_group = fontset_get_font_group (fontset, fallback ? -1 : c); 540 font_group = fontset_get_font_group (fontset, fallback ? -1 : c);
diff --git a/src/keyboard.c b/src/keyboard.c
index 7a137ea0dca..13d13cd3276 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9502,7 +9502,13 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9502 key = read_char (NILP (prompt), nmaps, 9502 key = read_char (NILP (prompt), nmaps,
9503 (Lisp_Object *) submaps, last_nonmenu_event, 9503 (Lisp_Object *) submaps, last_nonmenu_event,
9504 &used_mouse_menu, NULL); 9504 &used_mouse_menu, NULL);
9505 if (INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ 9505 if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
9506 /* When switching to a new tty (with a new keyboard),
9507 read_char returns the new buffer, rather than -2
9508 (Bug#5095). This is because `terminal-init-xterm'
9509 calls read-char, which eats the wrong_kboard_jmpbuf
9510 return. Any better way to fix this? -- cyd */
9511 || (interrupted_kboard != current_kboard))
9506 { 9512 {
9507 int found = 0; 9513 int found = 0;
9508 struct kboard *k; 9514 struct kboard *k;