# HG changeset patch # User Jan Dj¸«£rv # Date 1015776920 0 # Node ID 20dbe11a2ad310d1a048cc272659f78d16d6f248 # Parent 02c8b8c0f570184df3e7cf58c8e90d97aac6d5dc Added calls to x_session_check_input () and x_session_initialize (). diff -r 02c8b8c0f570 -r 20dbe11a2ad3 src/xterm.c --- a/src/xterm.c Sun Mar 10 16:14:00 2002 +0000 +++ b/src/xterm.c Sun Mar 10 16:15:20 2002 +0000 @@ -10032,6 +10032,12 @@ x_io_error_quitter (dpyinfo->display); } +#ifdef HAVE_X_SM + BLOCK_INPUT; + count += x_session_check_input (bufp, &numchars); + UNBLOCK_INPUT; +#endif + while (XPending (dpyinfo->display)) { XNextEvent (dpyinfo->display, &event); @@ -10114,11 +10120,17 @@ the session manager, who's looking for such a PropertyNotify. Can restart processing when a keyboard or mouse event arrives. */ - if (numchars > 0) + /* If we have a session manager, don't set this. + KDE will then start two Emacsen, one for the + session manager and one for this. */ + if (numchars > 0 +#ifdef HAVE_X_SM + && ! x_session_have_connection () +#endif + ) { f = x_top_window_to_frame (dpyinfo, event.xclient.window); - /* This is just so we only give real data once for a single Emacs process. */ if (f == SELECTED_FRAME ()) @@ -15056,6 +15068,10 @@ #endif /* ! defined (SIGWINCH) */ signal (SIGPIPE, x_connection_signal); + +#ifdef HAVE_X_SM + x_session_initialize (); +#endif }