[Geany] Middle mouse click for quick pasting

Matthew Brush mbrush at xxxxx
Tue Jan 24 08:40:18 UTC 2012


On 01/23/2012 09:08 PM, Lex Trotman wrote:
> On Tue, Jan 24, 2012 at 2:58 PM, Lex Trotman<elextr at gmail.com>  wrote:
>> On Tue, Jan 24, 2012 at 2:53 PM, Nate Bargmann<n0nb at n0nb.us>  wrote:
>>> * On 2012 23 Jan 10:37 -0600, John Beaumont | Beecroft wrote:
>>>> After some fiddling I notice it only works if you don't deselect
>>>> what you have highlighted. I normally highlight, click where I want
>>>> then middle click. This behaviour works in all other GTK software but
>>>> not Geany. Strange.
>>>
>>> I concur.  With this comment in mind I selected some text in Geany,
>>> left-clicked where I wanted to paste it, and then tried a middle-click.
>>> Nothing was pasted as the selection disappeared once the left-click was
>>> performed.  However, a middle-cleck without first left-clicking resulted
>>> in pasted text as expected.
>>>
>>> I can paste from Geany to another app and the selection remains
>>> highlighted even though Geany is not the focused app.  Pasting from
>>> another app works so long as the text remains highlighted.
>>>
>>> I'm using Geany 0.21 "Gromia" on Debian Sid with XFCE4 on one box and
>>> Gnome3 Shell on a laptop.
>>
>> Hi Nate,
>>
>> Yes, AFAIK middle mouse click has always required the selection to
>> remain highlighted since X was in MIT nappies.
>>
>> Clearly left clicking in the same app will de-select so nothing
>> pastes, but left clicking in another ap just gets focus and the
>> selection doesn't change.
>>
>> Cheers
>> Lex
>>
>
> Nate,
>
> What you decribed appears to me to be consistent with the definition
> by freedesktop, see
> http://standards.freedesktop.org/clipboards-spec/clipboards-0.1.txt.
>
> As to why it doesn't work for some people, I don't know, lets see if
> there is any information in the version of GTK they are using.
> Otherwise, perhaps they have disabled it in their window manager
> (though I don't know how).
>

I think the middle click is working except for the fact that for 
whatever reason now it clears the *X selection* when the Scintilla 
selection is cleared, and it didn't do this before. Those notes on the 
spec are too vague and leave out the part of whether deselecting text 
should create a new blank selection as you suggest or leave the contents 
of the last selection that was made. I have no idea about the X or ICCCM 
specs myself.

I think this might be related:
http://sourceforge.net/tracker/index.php?func=detail&aid=910948&group_id=2439&atid=102439

Note how recent the "second report" in the comments is and how it 
confirms the behaviour changing back and forth. Everything seems to be 
pointing to GTK+ changing behaviour recently. Some apps it does seem to 
still work in are VTE apps (GVim? and XfceTerminal), Firefox (address 
bar at least), and Eclipse IDE. Other more typical GTK+ apps like 
Mousepad, presumably Gedit, and Geany it does not work.

Cheers,
Matthew Brush



More information about the Users mailing list