Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003257Doomseeker[All Projects] Bugpublic2017-09-08 19:082017-09-18 08:28
ReporterWubTheCaptain 
Assigned ToZalewa 
PriorityhighSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
Platformx86_64OSDebian GNU/LinuxOS Versionbuster/sid
Product Version1.1 
Target VersionFixed in Version1.2 
Summary0003257: X clipboard (ICCCM) integration is inconsistent, broken behavior copies clipboard to Ctrl+C/V but not middle mouse button
DescriptionI often want to copy text like join command line from Doomseeker to a terminal emulator. To actually accomplish this, I currently have to take detours:

  1. Copy the text from Doomseeker to clipboard;

  2. Open any graphical software which accepts text input;

  3. Paste the text there with Ctrl+V;

  4. Select all pasted text in the graphical software again with Ctrl+A;

  5. Copy the selected text to clipboard again with Ctrl+C;

  6. Paste the clipboard text from a graphical window to a terminal emulator with middle mouse button.


The "Copy to clipboard" button is no different. The underlying issue is terminal software works differently, where ^C cancels a currently running shell task and ^V certainly isn't for pasting.

I personally find this bug quite infuriating, hence the priority.
Steps To ReproduceAlmost any textfield in Doomseeker currently has this issue. Here's few of the most prominent examples:


  • In sever listing, output of the context menu option "Show join command line"

  • Server name in the "Create Game" menu

  • MOTD, URL and email in the "Create Game" menu

  • Custom parameters in the "Create Game" menu

  • Wadseeker's textfield for WAD or multiple WAD names to search

  • Server filter

  • Server search (top right corner)



However, these seem to work fine for middle mouse button:


  • Selecting text of version numbers in the about menu

  • Other non-textfield/scrollable text, such as contributor names in the about menu

  • Log (from graphical interface)



Others untested so far. Qt5 build.
Additional Information

  • https://www.freedesktop.org/wiki/ClipboardManager/

  • https://www.x.org/docs/ICCCM/icccm.pdf

  • libxcb-icccm

  • QClipboard

Attached Fileslog file icon dpkg.log [^] (3,173 bytes) 2017-09-12 01:57

- Relationships
child of 0003246new Debian packaging. 

-  Notes
User avatar (0018277)
Zalewa (developer)
2017-09-11 18:54

What's the exact Qt version? "Help | About Qt" will display it.
User avatar (0018279)
Zalewa (developer)
2017-09-11 19:08
edited on: 2017-09-11 19:08

I noticed that if you select the contents by mouse, then it will by pasteable by mouse but not by keyboard. If you select and copy it by keyboard (CTRL+C), then it will pasteable by keyboard but not by mouse.

User avatar (0018282)
WubTheCaptain (reporter)
2017-09-12 01:54

Qt 5.9.1. Sorry, I've been posting dpkg.log files to tickets so often I forgot to do it on this ticket.

I did not test with Qt4 yet.
User avatar (0018288)
WubTheCaptain (reporter)
2017-09-12 03:52
edited on: 2017-09-12 04:00

Oh, I did not notice that behavior earlier. What you describe is the correct behavior, but there are some inconsistencies.


  • The "copy to clipboard" button questionably will be only pasteable by keyboard.

  • To an extent, this also concerns the right click context menu options for copying URL/email/address from server listings.

  • In Chromium and Firefox web browsers, (Ctrl + A followed by) Ctrl + C copies to both keyboard and mouse clipboards. This I think is the expected behavior.

  • In Doomseeker, Ctrl + C only copies to keyboard as you mention. I expected it to also copy to the mouse clipboard.



Question remains what's the correct behavior defined by the specification?

User avatar (0018291)
Zalewa (developer)
2017-09-12 18:13

Quote from "WubTheCaptain"
The "copy to clipboard" button questionably will be only pasteable by keyboard. To an extent, this also concerns the right click context menu options for copying URL/email/address from server listings.

That's probably something that should be looked into. This applies to the standard copy text dialog, the log dock and the copy actions from server list context menu. These are the only instances where we explicitly access the clipboard functionalities of Qt - just `ag` the code looking for "clipboard".

CTRL+C, however, is completely handled by Qt. So are the context menus for input fields. Unless we do something wrong at startup, I don't think this is something that we should attempt to "fix". If there is a problem, it should be reported to Qt maintainer (whoever that is nowadays). The X11 notes section is somewhat vague on how the selection should be handled:http://doc.qt.io/qt-5/qclipboard.html#notes-for-x11-users [^] . It says that "When text is selected, it is immediately available as the global mouse selection.", without mentioning keyboard or mouse. The next 2 sentences suggest that this only relates to the mouse.
User avatar (0018297)
WubTheCaptain (reporter)
2017-09-16 08:14

You're right.

I think the Ctrl + C is handled fine from Qt. I found out Ctrl + A to select all text in Chromium and Firefox copies to mouse clipboard, but this doesn't seem to be the case with Qt. I think the inconsistency of implementations with Ctrl + A is the core annoyance I see here.

I think the X11 notes you mentioned make perfect sense to me. There's three clipboards in ICCCM: Primary, secondary, clipboard. I believe the primary one is most often associated with keyboard, and clipboard with mouse middle button. Those bindings to keyboard/mouse can be remapped to my knowledge.

It could be the Qt implementation is also correct, because Ctrl + A isn't exactly "mouse selection" as mentioned because it's done with a keyboard.

I don't know of other graphical user interface software for behavioral comparisons. The Ctrl + A concern raised here could be looked as invalid, but the explicit access to clipboard functionalities in Doomseeker is certainly worth looking into.
User avatar (0018298)
WubTheCaptain (reporter)
2017-09-16 08:22

I was a little wrong in my previous reply about PRIMARY/CLIPBOARD selections, they're reversed.

This explains it well:https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt [^]
User avatar (0018303)
Zalewa (developer)
2017-09-17 16:28

Explicit copy buttons/menu actions should be fixed by this commit:
https://bitbucket.org/Doomseeker/doomseeker/commits/d2a1b74d39f1b41c23a598a2a77534eb54e268b7 [^]
User avatar (0018311)
WubTheCaptain (reporter)
2017-09-18 07:51
edited on: 2017-09-18 07:52

I want to quickly mention some of the #include directives are no longer in alphabetical order as of this commit (code review). I don't have a Bitbucket account to make a comment there.

Tested the "copy to clipboard" button and all four server list right click contexts (build ffe0a4a4c3ba, your commit + 2 newer commits). They are now both copying to PRIMARY and CLIPBOARD (mouse and keyboard) as intended. Qt 5.9.1.


Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2017-09-08 19:08 WubTheCaptain New Issue
2017-09-11 16:58 Zalewa Relationship added child of 0003246
2017-09-11 18:54 Zalewa Note Added: 0018277
2017-09-11 19:08 Zalewa Note Added: 0018279
2017-09-11 19:08 Zalewa Note Edited: 0018279 View Revisions
2017-09-12 01:54 WubTheCaptain Note Added: 0018282
2017-09-12 01:57 WubTheCaptain File Added: dpkg.log
2017-09-12 03:52 WubTheCaptain Note Added: 0018288
2017-09-12 03:53 WubTheCaptain Note Edited: 0018288 View Revisions
2017-09-12 03:58 WubTheCaptain Note Edited: 0018288 View Revisions
2017-09-12 04:00 WubTheCaptain Note Edited: 0018288 View Revisions
2017-09-12 04:00 WubTheCaptain Note Edited: 0018288 View Revisions
2017-09-12 18:13 Zalewa Note Added: 0018291
2017-09-16 08:14 WubTheCaptain Note Added: 0018297
2017-09-16 08:22 WubTheCaptain Note Added: 0018298
2017-09-16 16:37 Zalewa Assigned To => Zalewa
2017-09-16 16:37 Zalewa Status new => assigned
2017-09-17 16:28 Zalewa Note Added: 0018303
2017-09-17 16:28 Zalewa Status assigned => needs testing
2017-09-18 07:51 WubTheCaptain Note Added: 0018311
2017-09-18 07:52 WubTheCaptain Note Edited: 0018311 View Revisions
2017-09-18 08:28 Zalewa Status needs testing => resolved
2017-09-18 08:28 Zalewa Fixed in Version => 1.2
2017-09-18 08:28 Zalewa Resolution open => fixed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker