Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Re: Can't paste from selection in gtk-3 apps "J. Roeleveld" <joost@××××××××.org>
Re: [gentoo-user] Re: Can't paste from selection in gtk-3 apps Andrew Savchenko <bircoph@g.o>