comparison src/ui.c @ 4209:fb533fb6c015 v7.3.856

updated for version 7.3.856 Problem: When calling system() multi-byte clipboard contents is garbled. Solution: Save and restore the clipboard contents. (Yukihiro Nakadaira)
author Bram Moolenaar <bram@vim.org>
date Wed, 13 Mar 2013 17:50:25 +0100
parents 3fd805ca2a6a
children 902d6ab377ee
comparison
equal deleted inserted replaced
4208:b92c36ba3b34 4209:fb533fb6c015
1454 #else 1454 #else
1455 clip_mch_request_selection(cbd); 1455 clip_mch_request_selection(cbd);
1456 #endif 1456 #endif
1457 } 1457 }
1458 1458
1459 int
1460 clip_gen_owner_exists(cbd)
1461 VimClipboard *cbd;
1462 {
1463 #ifdef FEAT_XCLIPBOARD
1464 # ifdef FEAT_GUI_GTK
1465 if (gui.in_use)
1466 return clip_gtk_owner_exists(cbd);
1467 else
1468 # endif
1469 return clip_x11_owner_exists(cbd);
1470 #endif
1471 return TRUE;
1472 }
1473
1459 #endif /* FEAT_CLIPBOARD */ 1474 #endif /* FEAT_CLIPBOARD */
1460 1475
1461 /***************************************************************************** 1476 /*****************************************************************************
1462 * Functions that handle the input buffer. 1477 * Functions that handle the input buffer.
1463 * This is used for any GUI version, and the unix terminal version. 1478 * This is used for any GUI version, and the unix terminal version.
2396 void 2411 void
2397 clip_x11_lose_selection(myShell, cbd) 2412 clip_x11_lose_selection(myShell, cbd)
2398 Widget myShell; 2413 Widget myShell;
2399 VimClipboard *cbd; 2414 VimClipboard *cbd;
2400 { 2415 {
2401 XtDisownSelection(myShell, cbd->sel_atom, CurrentTime); 2416 XtDisownSelection(myShell, cbd->sel_atom,
2417 XtLastTimestampProcessed(XtDisplay(myShell)));
2402 } 2418 }
2403 2419
2404 int 2420 int
2405 clip_x11_own_selection(myShell, cbd) 2421 clip_x11_own_selection(myShell, cbd)
2406 Widget myShell; 2422 Widget myShell;
2437 */ 2453 */
2438 void 2454 void
2439 clip_x11_set_selection(cbd) 2455 clip_x11_set_selection(cbd)
2440 VimClipboard *cbd UNUSED; 2456 VimClipboard *cbd UNUSED;
2441 { 2457 {
2458 }
2459
2460 int
2461 clip_x11_owner_exists(cbd)
2462 VimClipboard *cbd;
2463 {
2464 return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None;
2442 } 2465 }
2443 #endif 2466 #endif
2444 2467
2445 #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \ 2468 #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \
2446 || defined(FEAT_GUI_GTK) || defined(PROTO) 2469 || defined(FEAT_GUI_GTK) || defined(PROTO)