bugXBoard - Bugs: bug #27810, Copy Game / Position do not work...

 
 

bug #27810: Copy Game / Position do not work in XBoard?

Submitted by:  None
Submitted on:  Mon 26 Oct 2009 10:28:29 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Assigned to: Tim Mann <mann>Open/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 28 Oct 2009 06:45:12 PM UTC, comment #13:

Cool, thanks for testing!

Tim Mann <mann>
Project AdministratorIn charge of this item.
Wed 28 Oct 2009 10:37:46 AM UTC, comment #12:

Both paste methods work now in opera mail. Also "-pasteSelection" works as expected.
I just had to remove the XA_UTF8_STRING stuff, because that's not provided by my X-libs, but that's ok - my system must be the oldest still in use :)

Remark to the "obscure options": This is one of the best parts of XBoard. Since I first read the man page (ca. 1996) I know, XBoard is the perfect interface for me. Before that read I had my doubts, though.

Anonymous
Wed 28 Oct 2009 09:28:33 AM UTC, comment #11:

Fixed. This was a separate bug -- we weren't implementing the part of the X selection/clipboard protocol that lets another app ask what data format(s) the selection owner can provide the data in. Simple apps don't use this but just ask for string data; more sophisticated ones evidently do use it and don't enable their Paste menu item if the selection owner doesn't implement it.

I can now copy from xboard and paste into gedit using gedit's Paste menu item. I imagine this may fix the issue with Opera Mail too.

I'll leave this in "ready for test" since it's a big enough change now to need more testing than I gave it.

Tim Mann <mann>
Project AdministratorIn charge of this item.
Wed 28 Oct 2009 07:13:23 AM UTC, comment #10:

Crap, I spoke too soon. Testing with gedit, it doesn't think that we have put anything on the clipboard. Seems like it is using some still newer kind of clipboard...???? I will have to look into this some more. In the meantime my commit might have made things worse.

Tim Mann <mann>
Project AdministratorIn charge of this item.
Wed 28 Oct 2009 07:05:49 AM UTC, comment #9:

That turned out to be pretty easy. I've committed a fix.

The idea of trying to paste both PRIMARY and CLIPBOARD wasn't workable, but I added an option to let people who are used to the old-fashioned behavior of pasting PRIMARY get it back.

Please let me know if there are still copy/paste problems with any apps. I didn't really understand the behavior reported with Opera Mail, so there's some chance Opera Mail is expecting something weird and that xboard still isn't doing that.

Tim Mann <mann>
Project AdministratorIn charge of this item.
Wed 28 Oct 2009 05:36:05 AM UTC, comment #8:

We already have 9 million obscure options, so I suppose we can add another to give the old paste behavior. Yuck.

I'll fool with this a bit and see if I can get it working.

Tim Mann <mann>
Project AdministratorIn charge of this item.
Mon 26 Oct 2009 07:17:20 PM UTC, comment #7:

Could you let an option decide on the paste behaviour, so that those who prefer the current method can keep it?

Anonymous
Mon 26 Oct 2009 05:35:37 PM UTC, comment #6:

The accepted way to do copy/paste in X has changed over the years. There is an excellent explanation at http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki. xboard uses the old historical interpretation 1.

In a bit more detail:

Currently, the "copy" position/game menu items in xboard actually just set the PRIMARY selection (which is global to the whole X server), and the "paste" items just paste in the current PRIMARY selection. They don't use CLIPBOARD at all.

This works between xboard instances and also works together with apps that set PRIMARY when you select text (most should do that) and that have a "paste selection" feature (many have that, usually on middle-click). But it should be updated to work with the new guidelines.

We can't follow the new guidelines quite exactly, though:

  • We don't have a concept of "selecting with no explicit copy". So let's have the "copy" menu items set both PRIMARY and CLIPBOARD.
  • I'm a bit torn about the guideline "explicit paste commands should paste CLIPBOARD, not PRIMARY". I'm tempted to say that to keep the old behavior working for people who are used to it, the "paste" items should paste PRIMARY if it's non-empty and otherwise paste CLIPBOARD. However, maybe that is a bad idea for people who are used to how copy/paste with clipboards are supposed to work, so I'd be OK with pasting only CLIPBOARD and including a mention of the change in the release message for the next version of xboard.
Tim Mann <mann>
Project AdministratorIn charge of this item.
Mon 26 Oct 2009 02:29:14 PM UTC, comment #5:

I don't have gedit, but I tried with opera mail.
I can't paste anything into mail that I copied from xboard.
Neither middle button, nor Ctrl-V works.
But I can paste text into mail, that I just mouse-selected in an xterm.
Here the middle button works, but not Ctrl-V.

To transfer a game to mail, this works:
1.Copy game in xboard
2.Open vi, switch to insert mode
3.Press middle button in vi (game appears).
4.Mouse-Select the text in vi.
5.Press middle button in mail (game appears).

Pretty strange, isn't it?

Anonymous
Mon 26 Oct 2009 01:33:08 PM UTC, comment #4:

There is a Emulate3Button option for the Xserver. When this is on, pressing Left&Right at the same time emulates the middle button.

In the X config file (probably /etc/X11/XF86Config-6):
Section "InputDevice"
Option "Emulate3Buttons" "true"

should be present.

Anonymous
Mon 26 Oct 2009 12:01:26 PM UTC, comment #3:

This might be a gedit rather than an xboard problem, then. I can use Copy Game on one XBoard, and then Paste Game to load it in another. But I could not copy the game into gedit. Ctrl-V does not work. I have no middle mouse button on my laptop, and trying Shift + right mouse button (which does work to bring up the xboard white piece menu) does pop up a menu in gedit identical to when I press the right mouse button plain, where ' Paste' is grayed out.

Anonymous
Mon 26 Oct 2009 11:31:11 AM UTC, comment #2:

There seem to be 2 different copy/paste mechanisms.
(1). copy by marking text with the mouse / paste by middle mouse button. This even works in xterm,vi etc.

(2). Ctrl-c Ctrl-v. This seems to require special application assistance. Those don't work in vi.

Xboard seems to handle only (1). e.g. I can mark any text with the mouse and do pasteGame/Position in xboard.

Anonymous
Mon 26 Oct 2009 10:49:27 AM UTC, comment #1:

I use that a lot, and it always worked. But I don't paste with Ctrl-V, but by pressing the middle mouse button.

Anonymous
Mon 26 Oct 2009 10:28:29 AM UTC, original submission:

When I use the XBoard menu items File -> Copy Game or File -> Copy Position, the clipboard seems to stay empty: I cannot paste anything with Ctrl+V in gedit. When I save the game on a file, load that file in gedit, copy it from gedit with Ctrl+C, I can use the File -> Paste Game menu to load the game in XBoard. When I then try to use File -> Copy Position, the game stays in the clipboard.

It seems like the Copy Game / Position menu items are ompletely ignored. The temporary file .xboard?????p.pgn seems to be created, though.

Any ideas on this one? I vaguey remember having once seen a complaint somewhere that XBoard does not respect clipboard conventions, but I forgot where, and did not know enough about Linux to understand what was written.

H.G.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mann (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Oct 2009 06:45:12 PM UTCmannStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 28 Oct 2009 09:28:33 AM UTCmannStatusIn Progress=>Ready For Test
    Wed 28 Oct 2009 07:13:23 AM UTCmannStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Wed 28 Oct 2009 07:05:49 AM UTCmannStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 28 Oct 2009 05:36:05 AM UTCmannAssigned toNone=>mann

    Back to the top


    Powered by Savane 3.1-cleanup1