aboutsummaryrefslogtreecommitdiff
path: root/src/uicmd.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2025-05-06 23:46:26 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-05-07 23:31:02 +0200
commit1e5da933a4ef2c5de8ca711215918e9f3ff9df3e (patch)
treeeb387b2afd3059d81a5dae61a2d02025f04c328c /src/uicmd.cc
parentab78cb4b3db6d63cb8da5a9d1390c2b6e50e69af (diff)
Copy links to clipboard selection too
Selecting text in the page copies only to the primary selection. Copying links via the context menu now places the URL both in the primary and clipboard selections so it can also be pasted with Ctrl+V. See: https://github.com/dillo-browser/dillo/issues/228
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r--src/uicmd.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 06333d0c..a2c21311 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -2,7 +2,7 @@
* File: uicmd.cc
*
* Copyright (C) 2005-2011 Jorge Arellano Cid <jcid@dillo.org>
- * Copyright (C) 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
+ * Copyright (C) 2024-2025 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1317,12 +1317,14 @@ void a_UIcmd_file_popup(void *vbw, void *v_wid)
}
/*
- * Copy url string to paste buffer
+ * Copy url string to paste buffer.
+ *
+ * For destination use: 0=primary, 1=clipboard, 2=both
*/
-void a_UIcmd_copy_urlstr(BrowserWindow *bw, const char *urlstr)
+void a_UIcmd_copy_urlstr(BrowserWindow *bw, const char *urlstr, int destination)
{
Layout *layout = (Layout*)bw->render_layout;
- layout->copySelection(urlstr);
+ layout->copySelection(urlstr, destination);
}
/*