Mercurial > emacs
comparison src/xterm.c @ 43812:20dbe11a2ad3
Added calls to x_session_check_input () and x_session_initialize ().
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Sun, 10 Mar 2002 16:15:20 +0000 |
parents | f92c4d87863a |
children | 50bab629a120 |
comparison
equal
deleted
inserted
replaced
43811:02c8b8c0f570 | 43812:20dbe11a2ad3 |
---|---|
10030 { | 10030 { |
10031 XTread_socket_fake_io_error = 0; | 10031 XTread_socket_fake_io_error = 0; |
10032 x_io_error_quitter (dpyinfo->display); | 10032 x_io_error_quitter (dpyinfo->display); |
10033 } | 10033 } |
10034 | 10034 |
10035 #ifdef HAVE_X_SM | |
10036 BLOCK_INPUT; | |
10037 count += x_session_check_input (bufp, &numchars); | |
10038 UNBLOCK_INPUT; | |
10039 #endif | |
10040 | |
10035 while (XPending (dpyinfo->display)) | 10041 while (XPending (dpyinfo->display)) |
10036 { | 10042 { |
10037 XNextEvent (dpyinfo->display, &event); | 10043 XNextEvent (dpyinfo->display, &event); |
10038 | 10044 |
10039 #ifdef HAVE_X_I18N | 10045 #ifdef HAVE_X_I18N |
10112 /* Save state modify the WM_COMMAND property to | 10118 /* Save state modify the WM_COMMAND property to |
10113 something which can reinstate us. This notifies | 10119 something which can reinstate us. This notifies |
10114 the session manager, who's looking for such a | 10120 the session manager, who's looking for such a |
10115 PropertyNotify. Can restart processing when | 10121 PropertyNotify. Can restart processing when |
10116 a keyboard or mouse event arrives. */ | 10122 a keyboard or mouse event arrives. */ |
10117 if (numchars > 0) | 10123 /* If we have a session manager, don't set this. |
10124 KDE will then start two Emacsen, one for the | |
10125 session manager and one for this. */ | |
10126 if (numchars > 0 | |
10127 #ifdef HAVE_X_SM | |
10128 && ! x_session_have_connection () | |
10129 #endif | |
10130 ) | |
10118 { | 10131 { |
10119 f = x_top_window_to_frame (dpyinfo, | 10132 f = x_top_window_to_frame (dpyinfo, |
10120 event.xclient.window); | 10133 event.xclient.window); |
10121 | |
10122 /* This is just so we only give real data once | 10134 /* This is just so we only give real data once |
10123 for a single Emacs process. */ | 10135 for a single Emacs process. */ |
10124 if (f == SELECTED_FRAME ()) | 10136 if (f == SELECTED_FRAME ()) |
10125 XSetCommand (FRAME_X_DISPLAY (f), | 10137 XSetCommand (FRAME_X_DISPLAY (f), |
10126 event.xclient.window, | 10138 event.xclient.window, |
15054 #ifdef SIGWINCH | 15066 #ifdef SIGWINCH |
15055 signal (SIGWINCH, SIG_DFL); | 15067 signal (SIGWINCH, SIG_DFL); |
15056 #endif /* ! defined (SIGWINCH) */ | 15068 #endif /* ! defined (SIGWINCH) */ |
15057 | 15069 |
15058 signal (SIGPIPE, x_connection_signal); | 15070 signal (SIGPIPE, x_connection_signal); |
15071 | |
15072 #ifdef HAVE_X_SM | |
15073 x_session_initialize (); | |
15074 #endif | |
15059 } | 15075 } |
15060 | 15076 |
15061 | 15077 |
15062 void | 15078 void |
15063 syms_of_xterm () | 15079 syms_of_xterm () |