Mercurial > vim
comparison src/os_unix.c @ 11:4424b47a0797
updated for version 7.0003
author | vimboss |
---|---|
date | Wed, 30 Jun 2004 16:16:41 +0000 |
parents | 3fc0f57ecb91 |
children | bdeee1504ac1 |
comparison
equal
deleted
inserted
replaced
10:4e2284e71352 | 11:4424b47a0797 |
---|---|
1220 static int | 1220 static int |
1221 x_error_handler(dpy, error_event) | 1221 x_error_handler(dpy, error_event) |
1222 Display *dpy; | 1222 Display *dpy; |
1223 XErrorEvent *error_event; | 1223 XErrorEvent *error_event; |
1224 { | 1224 { |
1225 /* KDE sometimes produces X error that we want to ignore */ | |
1226 #if defined(FEAT_GUI_KDE) | |
1227 XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE); | |
1228 STRCAT(IObuff, "\nVim: Got X error but we continue...\n"); | |
1229 fprintf(stderr, IObuff); | |
1230 return 0; | |
1231 #else | |
1225 XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE); | 1232 XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE); |
1226 STRCAT(IObuff, _("\nVim: Got X error\n")); | 1233 STRCAT(IObuff, _("\nVim: Got X error\n")); |
1227 | 1234 |
1228 /* We cannot print a message and continue, because no X calls are allowed | 1235 /* We cannot print a message and continue, because no X calls are allowed |
1229 * here (causes my system to hang). Silently continuing might be an | 1236 * here (causes my system to hang). Silently continuing might be an |
1230 * alternative... */ | 1237 * alternative... */ |
1231 preserve_exit(); /* preserve files and exit */ | 1238 preserve_exit(); /* preserve files and exit */ |
1232 | 1239 |
1233 return 0; /* NOTREACHED */ | 1240 return 0; /* NOTREACHED */ |
1241 #endif | |
1234 } | 1242 } |
1235 | 1243 |
1236 /* | 1244 /* |
1237 * Another X Error handler, just used to check for errors. | 1245 * Another X Error handler, just used to check for errors. |
1238 */ | 1246 */ |
1369 /* X just exits if it finds an error otherwise! */ | 1377 /* X just exits if it finds an error otherwise! */ |
1370 (void)XSetErrorHandler(x_error_handler); | 1378 (void)XSetErrorHandler(x_error_handler); |
1371 did_set_error_handler = TRUE; | 1379 did_set_error_handler = TRUE; |
1372 } | 1380 } |
1373 | 1381 |
1374 #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) | 1382 #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) |
1375 if (gui.in_use) | 1383 if (gui.in_use) |
1376 { | 1384 { |
1377 /* | 1385 /* |
1378 * If the X11 display was opened here before, for the window where Vim | 1386 * If the X11 display was opened here before, for the window where Vim |
1379 * was started, close that one now to avoid a memory leak. | 1387 * was started, close that one now to avoid a memory leak. |
1796 | 1804 |
1797 /* | 1805 /* |
1798 * Note: if "t_TS" is set, title is set with escape sequence rather | 1806 * Note: if "t_TS" is set, title is set with escape sequence rather |
1799 * than x11 calls, because the x11 calls don't always work | 1807 * than x11 calls, because the x11 calls don't always work |
1800 */ | 1808 */ |
1801 | 1809 #ifdef FEAT_GUI_KDE |
1810 /* dont know why but KDE needs this one as we don't go through the next function... */ | |
1811 gui_mch_settitle(title, icon); | |
1812 #endif | |
1802 if ((type || *T_TS != NUL) && title != NULL) | 1813 if ((type || *T_TS != NUL) && title != NULL) |
1803 { | 1814 { |
1804 if (oldtitle == NULL | 1815 if (oldtitle == NULL |
1805 #ifdef FEAT_GUI | 1816 #ifdef FEAT_GUI |
1806 && !gui.in_use | 1817 && !gui.in_use |