Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Cursor select behaviour; feature request  () 1 Vote
Cursor select behaviour; feature request [message #21858] Mon, 08 June 2009 14:29 Go to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

When I put the cursor at, for example, the start of a word, hold shift and left-click on a new location, I would expect to select the text in between?

Apparently this is not TheIde's behaviour;

Feature require: add this behaviour

(to test, try gedit on linux or notepad on windows, or even any text field in any browser)

Greetings,

Jan


Jan (skyhawk)

[Updated on: Mon, 08 June 2009 14:45]

Report message to a moderator

Re: Cursor select behaviour; feature request [message #21861 is a reply to message #21858] Mon, 08 June 2009 15:52 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
This is working for me, I am using the latest from SVN sources, however (as of yesterday at least).

Jeremy
Re: Cursor select behaviour; feature request [message #21863 is a reply to message #21861] Mon, 08 June 2009 16:50 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I'm using today's SVN sources, it's not working for me on Ubuntu 8.04 (GNOME), not tested on windows

Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #21893 is a reply to message #21863] Tue, 09 June 2009 15:31 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I test that for Ubuntu9.04,it is work for me.
Re: Cursor select behaviour; feature request [message #21898 is a reply to message #21893] Tue, 09 June 2009 22:33 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I must conclude that it's some local problem, I'll retest in my next SVN build, but I think we should, mark the issue as a 'works for me', speaking in bugzilla terms Smile

Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #21934 is a reply to message #21898] Thu, 11 June 2009 19:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Anything special about your ubuntu box?

Mirek
Re: Cursor select behaviour; feature request [message #21956 is a reply to message #21934] Fri, 12 June 2009 10:38 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

Well I have a weird AGP VGA card (the bios says, at bootup: 'not for production use' Smile

But I havn't seen other problems like this with any other programs.
I've also installed 'Compiz Fusion' but again, i'm only seeing this problem in TheIde.

I will try to rule out some of these 'oddities'

Greetings,

Jan



Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #22015 is a reply to message #21956] Sun, 14 June 2009 21:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Fri, 12 June 2009 04:38

Well I have a weird AGP VGA card (the bios says, at bootup: 'not for production use' Smile

But I havn't seen other problems like this with any other programs.
I've also installed 'Compiz Fusion' but again, i'm only seeing this problem in TheIde.

I will try to rule out some of these 'oddities'

Greetings,

Jan




It is also possible that you are doing "something else" then the rest of us... Like chossing some special places to click etc...

Maybe some screenshots?

Mirek

[Updated on: Sun, 14 June 2009 21:52]

Report message to a moderator

Re: Cursor select behaviour; feature request [message #22028 is a reply to message #22015] Sun, 14 June 2009 23:22 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I can reproduce the behaviour only with the System->Administration->Hardware drivers->"NVidia accelerated graphics drivers" enabled. If I disable it, theIde works as excepted...

will try to make some screenshopt tomorrow


Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #22030 is a reply to message #22028] Sun, 14 June 2009 23:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Sun, 14 June 2009 17:22

I can reproduce the behaviour only with the System->Administration->Hardware drivers->"NVidia accelerated graphics drivers" enabled. If I disable it, theIde works as excepted...

will try to make some screenshopt tomorrow



Sounds like another Compiz trouble Sad

Very likely, it just looks like not being selected, but it is just visual artifact. Maybe you can try to delete it or hide & restore window to find out.

Mirek
Re: Cursor select behaviour; feature request [message #22041 is a reply to message #22030] Mon, 15 June 2009 11:26 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I believe it is now fixed.

I think that the difference was that any slight move of cursor after shift-click canceled the selection.

Mirek
Re: Cursor select behaviour; feature request [message #22051 is a reply to message #22041] Mon, 15 June 2009 17:19 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I've build the svn head revision at 15-06-09 14:20.

I'm not seeing any difference, I have also confirmed it is not only a visual effect, the text is actually not selected (tested with ctrl-c, ctrl-v)

This is what happens when I click and drag over text:

index.php?t=getfile&id=1791&private=0

What I am seeing is, that this 'selecting' does not work using shift-click. Placing the cursor before the text and clicking after the text while holding shift, should give the same result as click-and-drag over that text.

As said, I can only reproduce this with the 'nvidia hardware drivers' enabled.



Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #22057 is a reply to message #22051] Mon, 15 June 2009 23:44 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Hi, i have also a nvidia card on my laptop (not on AGP Rolling Eyes ) but i'm not having any problem with text selection. Maybe an upgrade will solve your problem Razz

info

01:00.0 VGA compatible controller: nVidia Corporation GeForce 9300M GS (rev a1)
Subsystem: Acer Incorporated [ALI] Device 015e
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at ce000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at cc000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at 2000 [size=128]
Capabilities: [60] Power Management version 3
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Virtual Channel <?>
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information <?>
Kernel driver in use: nvidia
Kernel modules: nvidia, nvidiafb
Re: Cursor select behaviour; feature request [message #22058 is a reply to message #22057] Tue, 16 June 2009 09:17 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

An upgrade would probably mask the problem alright, but since it is not just a visual effect and it does not happen in other programs except TheIde, it still looks like a genuine bug to me. How to catch it, I don't know Smile

lspci -v reports: (this is an AGP card though)

02:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce 7300 GT] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Foxconn International, Inc. Unknown device 0f0c
Flags: bus master, fast devsel, latency 0, IRQ 23
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at f5000000 (64-bit, non-prefetchable) [size=16M]
I/O ports at cc00 [size=128]
[virtual] Expansion ROM at f7de0000 [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [78] Express Endpoint IRQ 0

Here I have performed the same 'place cursor', 'move mouse', 'shift+left-click' action on TheIde and gedit.

(jan: [edit]: it said 'shift+right-click here, but that was wrong, left-click gets this effect for me)

index.php?t=getfile&id=1794&private=0

Gr,

Jan
  • Attachment: selection.jpg
    (Size: 18.50KB, Downloaded 521 times)


Jan (skyhawk)

[Updated on: Tue, 16 June 2009 11:58]

Report message to a moderator

Re: Cursor select behaviour; feature request [message #22063 is a reply to message #22058] Tue, 16 June 2009 11:25 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
skyhawk wrote on Tue, 16 June 2009 09:17


Here I have performed the same 'place cursor', 'move mouse', 'shift+right-click' action on TheIde and gedit.

index.php?t=getfile&id=1794&private=0

Gr,

Jan

Hello, Jan.

In the first post on this topic you said about left mouse click instead of right mouse click. I guess, you think of EditField behaviour (CtrlLib/EditField.cpp):
void EditField::RightDown(Point p, dword keyflags)
{
	keep_selection = true;
	MenuBar::Execute(THISBACK(MenuBar));
	SetFocus();
	keep_selection = false;
}

The AssistEditor have LineEdit behaviour (CtrlLib/LineEdit.cpp):
void LineEdit::RightDown(Point p, dword flags)
{
	mpos = GetMousePos(p);
	SetWantFocus();
	int l, h;
	if(!GetSelection(l, h) || mpos < l || mpos >= h)
		PlaceCaret(mpos, false);
	MenuBar::Execute(WhenBar);
}

The fix maybe as follows (also for DocEdit):
void LineEdit::RightDown(Point p, dword flags)
{
	mpos = GetMousePos(p);
	MenuBar::Execute(WhenBar);
	SetWantFocus();
	int l, h;
	if(!GetSelection(l, h) || mpos < l || mpos >= h)
		PlaceCaret(mpos, false);
}

[Updated on: Tue, 16 June 2009 11:28]

Report message to a moderator

Re: Cursor select behaviour; feature request [message #22064 is a reply to message #22063] Tue, 16 June 2009 11:56 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

Sorry about the confusion, I ment to say left-click!
I will edit the post to avoid futher confusion


Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #22065 is a reply to message #22064] Tue, 16 June 2009 12:34 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I did some debugging of theide in theide using the code-hits you gave me, Mirek:
void LineEdit::LeftDown(Point p, dword flags) {
	mpos = GetMousePos(p);
	int l, h;
	if(GetSelection(l, h) && mpos >= l && mpos < h) {
		selclick = true;
		return;
	}
	PlaceCaret(mpos, flags & K_SHIFT);
	SetWantFocus();
	SetCapture();
}


here GetSelection return false for me, in GetSelection() anchor == -1.

(for the shift-left-click behind the selection)


This seems to fix my problem:

void LineEdit::LeftDown(Point p, dword flags) {
	mpos = GetMousePos(p);
	int l, h;
	GetSelection(l, h);
	if (mpos >= l) { // && mpos < h) {
		selclick = true;
		return;
	}

	PlaceCaret(mpos, flags & K_SHIFT);
	SetWantFocus();
	SetCapture();
}


because GetSelection() returns false sometimes and l = h = cursor happens then. I also had to chuck out the mpos < h check which would otherwise fail ofcourse Smile

I don't know what other things this will break Smile

Greetings,

Jan





Jan (skyhawk)

[Updated on: Tue, 16 June 2009 14:51]

Report message to a moderator

Re: Cursor select behaviour; feature request [message #22160 is a reply to message #22065] Sat, 20 June 2009 15:56 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

Mirek,

Is this information sufficient for you to fix this issue?

Greetings,

Jan


Jan (skyhawk)
Re: Cursor select behaviour; feature request [message #22168 is a reply to message #22065] Sun, 21 June 2009 20:17 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Tue, 16 June 2009 06:34

I did some debugging of theide in theide using the code-hits you gave me, Mirek:
void LineEdit::LeftDown(Point p, dword flags) {
	mpos = GetMousePos(p);
	int l, h;
	if(GetSelection(l, h) && mpos >= l && mpos < h) {
		selclick = true;
		return;
	}
	PlaceCaret(mpos, flags & K_SHIFT);
	SetWantFocus();
	SetCapture();
}


here GetSelection return false for me, in GetSelection() anchor == -1.

(for the shift-left-click behind the selection)



Yep, that is correct. The 'if' branch detects click on selection, which is handled differently (can initiate drag&drop).

It is true that there should perhaps be another K_SHIFT check (with SHIFT, D&D should not start).

Quote:


void LineEdit::LeftDown(Point p, dword flags) {
	mpos = GetMousePos(p);
	int l, h;
	GetSelection(l, h);
	if (mpos >= l) { // && mpos < h) {
		selclick = true;
		return;
	}

	PlaceCaret(mpos, flags & K_SHIFT);
	SetWantFocus();
	SetCapture();
}


because GetSelection() returns false sometimes and l = h = cursor happens then. I also had to chuck out the mpos < h check which would otherwise fail ofcourse Smile

I don't know what other things this will break Smile



D&D Smile

Mirek
Previous Topic: How do I make a package a library?
Next Topic: Suggestion: cross-platform "U++ package" file type.
Goto Forum:
  


Current Time: Fri Mar 29 14:16:28 CET 2024

Total time taken to generate the page: 0.02222 seconds