Author Topic: MouseSap linking broken (MSW, 32 bits)  (Read 7531 times)

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
MouseSap linking broken (MSW, 32 bits)
« 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

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #1 on: June 15, 2020, 05:53:05 pm »
Thanks
Fixed: rev. 12172

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #2 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.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #3 on: June 16, 2020, 06:57:18 pm »
Thanks
Hopefully corrected this time. Rev: 12173

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #4 on: June 17, 2020, 11:34:37 am »
Do we actually need this plugin for Linux? Does it do something useful there?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #5 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.


« Last Edit: June 17, 2020, 04:57:31 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #6 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #7 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.
« Last Edit: June 18, 2020, 06:44:49 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #8 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #9 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.

« Last Edit: June 19, 2020, 06:33:00 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #10 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #11 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.



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #12 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #13 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)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MouseSap linking broken (MSW, 32 bits)
« Reply #14 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]