Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Miguel Gimenez on June 15, 2020, 02:22:24 pm

Title: MouseSap linking broken (MSW, 32 bits)
Post by: Miguel Gimenez on June 15, 2020, 02:22:24 pm
Last revision to MouseSap (r12170) breaks linking in MSW 32 bits because MouseSap_wx31.cbp needs adding MouseSapCfg.cpp and MouseSapCfg.h
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 15, 2020, 05:53:05 pm
Thanks
Fixed: rev. 12172
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Miguel Gimenez on June 15, 2020, 06:46:35 pm
The four CBP files added in r12172 were removed some time ago, because their associated wxWidgets versions (wx2.8 and wx3.0 in MSW, wx2.8 in unix) are not supported anymore.
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 16, 2020, 06:57:18 pm
Thanks
Hopefully corrected this time. Rev: 12173
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 17, 2020, 11:34:37 am
Do we actually need this plugin for Linux? Does it do something useful there?
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 17, 2020, 04:55:30 pm
Do we actually need this plugin for Linux? Does it do something useful there?

This plugin is actually not very useful to either Linux or Windows 10 anymore.
It adds the following:

If selected text & shift-middleMouse,                         paste selected text at current cursor position(like Linux).
If selected text & shift-middleMouse inside selection,  copy to clipboard(like ctrl-c).
If selected text & shift-switch editor,                          copy selection to clipboard.
If selected text & shift-ctrl-middleMouse inside selection,  overwrite selection with clipboard data.
If no selected text & Shift-middleMouse,                    paste clipboard data at cursor position(like ctrl-v).

It was very useful before windows 10 added the primary paste feature (like Linux).
If it's not needed anymore, and if it's permissible, I vote to remove it.


Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 17, 2020, 09:22:32 pm
It was very useful before windows 10 added the primary paste feature (like Linux).
Really? They've done that everywhere? In all apps?
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 18, 2020, 06:32:07 am
It was very useful before windows 10 added the primary paste feature (like Linux).
Really? They've done that everywhere? In all apps?

no, I can't get it to work in notepad.
Edit: I must be wrong about this. I can't get Atom to middle-mouse paste either.
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 18, 2020, 08:40:39 pm
We have code in scintilla which does middle click handling, but it should be gtk only.
Does it work in textctrls and similar native controls in Code::Blocks?
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 19, 2020, 06:27:52 pm
No, middleMouse (primary) paste does not work in wxTextCtrls on MSWindows.

I've made a very ignorant assumption.
I did not know about the addition of middleMouse code in wxScintilla.

But middleMouse pasting does work in CB on MSWindows using wxWidgets/wxScintilla.

Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 19, 2020, 08:53:12 pm
This is rather strange.
The code in ScintillaWX::ClaimSelection and ScintillaWX::DoMiddleButtonUp is gtk only.
Can you test if this works in scite and the stc wxWidgets sample?
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 20, 2020, 11:10:27 pm
This is rather strange.
The code in ScintillaWX::ClaimSelection and ScintillaWX::DoMiddleButtonUp is gtk only.
Can you test if this works in scite and the stc wxWidgets sample?

Pasting with middleMouse does NOT work in scite 4.4.3 nor does it work in wx3.1.3 stc sample (compiled with CB 12173).

But it does work within the CB editors (CB 12173) with all contrib plugins disabled.

I hope you're not considering disabling it in Windows. I've become addicted to it.


Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 21, 2020, 01:15:47 am
I hope you're not considering disabling it in Windows. I've become addicted to it.
As a first step we need to find which code does this, so we don't break it when we do an update to the scintilla code.
Could you try to use a debugger to find why it does work?
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: Pecan on June 22, 2020, 10:10:40 pm

As a first step we need to find which code does this, so we don't break it when we do an update to the scintilla code.
Could you try to use a debugger to find why it does work?

It's implemented in:
void cbStyledTextCtrl::OnMouseMiddleDown(wxMouseEvent& event)
Title: Re: MouseSap linking broken (MSW, 32 bits)
Post by: oBFusCATed on June 22, 2020, 11:32:31 pm
Good, it is an option and it is off by default.

So what is the plan for the mouse sap plugin? Is it needed any more?