Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Can't paste from selection in gtk-3 apps
Date: Thu, 17 Sep 2015 09:40:24
Message-Id: 11450525.hpTvBvr8O3@andromeda
In Reply to: [gentoo-user] Re: Can't paste from selection in gtk-3 apps by Grant Edwards
1 On Wednesday, September 16, 2015 02:41:48 PM Grant Edwards wrote:
2 > On 2015-09-16, J. Roeleveld <joost@××××××××.org> wrote:
3 > > On Tuesday, September 15, 2015 06:57:36 PM Grant Edwards wrote:
4 > >> On 2015-09-15, Grant Edwards <grant.b.edwards@×××××.com> wrote:
5 > >> > In most X11 apps I can select some text and then paste it somewhere
6 > >> > else with a middle-click, or dump it to stdout with the command 'xclip
7 > >> > -o'. That doesn't work for highligted text in gtk-3 apps (meld,
8 > >> > evince, audacious, etc.). After selecting text in a gtk-3 app, if I
9 > >> > middle-click in a terminal window it does nothing and 'xclip -o' just
10 > >> > hangs. Selecting text elsewhere will deselect the text in the gtk-3
11 > >> > app, so gtk-3 isn't _completely_ ignoring X11 clipboards/buffers.
12 > >> >
13 > >> > Any ideas why gtk-3 copy/paste is broken and how to fix it?
14 > >>
15 > >> Ah, it turns out it's only a problem if you have multiple screens: you
16 > >> can only paste a gtk-3 selection if the destination is on the same X11
17 > >> screen as the source. I'm pretty sure this is a known problem, but
18 > >> I'm having trouble finding it again in the Gnome bugtracker...
19 > >
20 > > Must be related to gtk-3 then.
21 > >
22 > > I use 2 screens extensively and never experienced any issues like you
23 > > describe.
24 >
25 > And you can select/paste from one screen to another where the source
26 > is a gtk-3 app?
27
28 Not sure, need to test with a gtk-3 app.
29 I run KDE myself.
30
31 > I should clarify that I mean "screen" in the strict X11 usage. Using
32 > Xinerama or the like to spread a single desktop across multiple
33 > monitors is still a single screen setup. I'm trying to select text on
34 > DISPLAY=:0.0 and paste it on DISPLAY=:0.1
35
36 Not using my desktop atm.
37 What does Xorg do by default when it detects multiple screens?
38
39 > > Am surprised it would respond differently between GTK-3 and non-GTK-3
40 > > apps.
41 >
42 > I'm not. When somebody selects something, you've got to make onr or
43 > more Xlib function calls to grab control of the selection, and if
44 > you're naive and think that the screen where your program is running
45 > is the only one, then you only make the call to grab control of the
46 > selection for that screen. Apparently the gtk-3 developers never
47 > thought about the possibility that there are mutliple screens in an
48 > X11 session.
49
50 Bad design then, as systems with multiple screens have been around for years.
51
52 > > I don't configure anything special for multiple screens in the past
53 > > few years.
54 >
55 > Are you really using multiple screens? Or a single screen spread
56 > across mutliple monitors? If you start an xterm on every monitor and
57 > do "echo $DISPLAY" in each one, do you get different results or are
58 > they all the same?
59
60 As I said, what's the default with Xorg?
61
62 --
63 Joost

Replies

Subject Author
[gentoo-user] Re: Can't paste from selection in gtk-3 apps Grant Edwards <grant.b.edwards@×××××.com>