summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2010-01-05 15:42:39 +0100
committerJan Djärv <jan.h.d@swipnet.se>2010-01-05 15:42:39 +0100
commit2889df585ae164ccf8fc57ffdbb432dfcd75e870 (patch)
tree2fbd5bb635987af59cb98761f389b8d3747e8752 /src
parent451f23ab90cbbd98de861ed8dff0bd4ffdda3bdf (diff)
parent03f77f0a4470c967d6f4351d347ebedd8fb882bb (diff)
downloademacs-2889df585ae164ccf8fc57ffdbb432dfcd75e870.tar.gz
Merge from mainline.
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 @@
(xg_frame_resized, xg_frame_set_char_size): Call
xg_clear_under_internal_border.
(xg_update_scrollbar_pos): Clear under old scroll bar position.
+2010-01-05 Chong Yidong <cyd@stupidchicken.com>
+
+ * keyboard.c (read_key_sequence): Catch keyboard switch after
+ making a new tty frame (Bug#5095).
+
+2010-01-05 Kenichi Handa <handa@m17n.org>
+
+ * fontset.c (fontset_find_font): Fix getting the frame pointer.
+
+2010-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * dbusbind.c (xd_remove_watch): Avoid trying to convert a void* to
+ Lisp_Object, preferring to convert a lisp_Object to a void* instead.
+ (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
+
+2010-01-03 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (xd_add_watch): Improve debug message.
+ (xd_remove_watch): Improve debug message. If DATA is the session
+ bus, unset D-Bus session environment.
+ (Fdbus_init_bus): Pass the bus as argument to
+ dbus_connection_set_watch_functions. (Bug#5283)
2010-01-01 Chong Yidong <cyd@stupidchicken.com>
@@ -155,7 +177,7 @@
2009-12-15 Michael Albinus <michael.albinus@gmx.de>
* dbusbind.c (xd_retrieve_arg): Reorder declarations in order to
- avoid compiler warnings. (Bug #5217).
+ avoid compiler warnings. (Bug #5217)
2009-12-14 Kenichi Handa <handa@m17n.org>
@@ -5330,7 +5352,7 @@
(XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error.
(xd_read_queued_messages): Catch Qdbus_error from the macros.
(all): Replace xsignal1, xsignal2, xsignal3 by the respective
- macro. (Bug#1186).
+ macro. (Bug#1186)
2008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change)
@@ -21224,7 +21246,7 @@ See ChangeLog.10 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GNU Emacs.
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)
if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
{
#if HAVE_DBUS_WATCH_GET_UNIX_FD
- /* TODO: Reverse these on Win32, which prefers the opposite. */
+ /* TODO: Reverse these on Win32, which prefers the opposite. */
int fd = dbus_watch_get_unix_fd(watch);
if (fd == -1)
fd = dbus_watch_get_socket(watch);
#else
int fd = dbus_watch_get_fd(watch);
#endif
- XD_DEBUG_MESSAGE ("%d", fd);
+ XD_DEBUG_MESSAGE ("fd %d", fd);
if (fd == -1)
return FALSE;
@@ -781,7 +781,8 @@ xd_add_watch (watch, data)
return TRUE;
}
-/* Remove connection file descriptor from input_wait_mask. */
+/* Remove connection file descriptor from input_wait_mask. DATA is
+ the used bus, either QCdbus_system_bus or QCdbus_session_bus. */
void
xd_remove_watch (watch, data)
DBusWatch *watch;
@@ -791,18 +792,25 @@ xd_remove_watch (watch, data)
if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE)
{
#if HAVE_DBUS_WATCH_GET_UNIX_FD
- /* TODO: Reverse these on Win32, which prefers the opposite. */
+ /* TODO: Reverse these on Win32, which prefers the opposite. */
int fd = dbus_watch_get_unix_fd(watch);
if (fd == -1)
fd = dbus_watch_get_socket(watch);
#else
int fd = dbus_watch_get_fd(watch);
#endif
- XD_DEBUG_MESSAGE ("%d", fd);
+ XD_DEBUG_MESSAGE ("fd %d", fd);
if (fd == -1)
return;
+ /* Unset session environment. */
+ if ((data != NULL) && (data == (void*) XHASH (QCdbus_session_bus)))
+ {
+ XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
+ unsetenv ("DBUS_SESSION_BUS_ADDRESS");
+ }
+
/* Remove the file descriptor from input_wait_mask. */
delete_keyboard_wait_descriptor (fd);
}
@@ -825,11 +833,12 @@ This is an internal function, it shall not be used outside dbus.el. */)
/* Open a connection to the bus. */
connection = xd_initialize (bus);
- /* Add the watch functions. */
+ /* Add the watch functions. We pass also the bus as data, in order
+ to distinguish between the busses in xd_remove_watch. */
if (!dbus_connection_set_watch_functions (connection,
xd_add_watch,
xd_remove_watch,
- NULL, NULL, NULL))
+ NULL, (void*) XHASH (bus), NULL))
XD_SIGNAL1 (build_string ("Cannot add watch functions"));
/* 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)
{
Lisp_Object vec, font_group;
int i, charset_matched = 0, found_index;
- FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset)))
- ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset));
+ FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))
+ ? XFRAME (FONTSET_FRAME (fontset)) : XFRAME (selected_frame));
Lisp_Object rfont_def;
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,
key = read_char (NILP (prompt), nmaps,
(Lisp_Object *) submaps, last_nonmenu_event,
&used_mouse_menu, NULL);
- if (INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
+ if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
+ /* When switching to a new tty (with a new keyboard),
+ read_char returns the new buffer, rather than -2
+ (Bug#5095). This is because `terminal-init-xterm'
+ calls read-char, which eats the wrong_kboard_jmpbuf
+ return. Any better way to fix this? -- cyd */
+ || (interrupted_kboard != current_kboard))
{
int found = 0;
struct kboard *k;