python / cpython

The Python programming language
https://www.python.org
Other
63.37k stars 30.35k forks source link

Idle, some Linuxes, cannot position Cursor by mouseclick #47244

Closed 03253b78-a54b-4f51-ae1e-d536fca0a6be closed 15 years ago

03253b78-a54b-4f51-ae1e-d536fca0a6be commented 16 years ago
BPO 2995
Nosy @kbkaiser

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = 'https://github.com/kbkaiser' closed_at = created_at = labels = ['expert-IDLE', 'type-bug'] title = 'Idle, some Linuxes, cannot position Cursor by mouseclick' updated_at = user = 'https://bugs.python.org/Sunny0815' ``` bugs.python.org fields: ```python activity = actor = 'gpolo' assignee = 'kbk' closed = True closed_date = closer = 'gpolo' components = ['IDLE'] creation = creator = 'Sunny0815' dependencies = [] files = [] hgrepos = [] issue_num = 2995 keywords = [] message_count = 10.0 messages = ['67460', '78639', '78694', '80325', '80718', '84320', '84357', '84400', '84418', '86325'] nosy_count = 5.0 nosy_names = ['kbk', 'gpolo', 'Sunny0815', 'michiel.overtoom', 'dbarabash'] pr_nums = [] priority = 'normal' resolution = 'wont fix' stage = None status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue2995' versions = ['Python 3.1', 'Python 2.7'] ```

03253b78-a54b-4f51-ae1e-d536fca0a6be commented 16 years ago

I'm used to be able to position the cursor by clicking on the desired position. When running Idle (1.2.2 with Python 2.5.2) under Mandriva Linux 2008 (or under Arch Linux 64 or i686 as well as FaunOS a Arch based live distro) this does not work.

Running under windows it works, running under Xandros linux on my eee pc it works too, so it's not linux specific.

I already asked on the german python ng. There have been reports that it works too on Suse and Ubuntu. But as of yet no hint where to look to make it working under Arch oder Mandriva.

Strange enough, i can position the Cursor by Ctrl-clicking.

I tried with a tiny Tk program with a single text field - there the positioning does work too.

So it seems to be a bug in the distro(s) and regarding only Idle not Tkinter in total.

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 15 years ago

Can you retry making some small example that demonstrates the problem ?

03253b78-a54b-4f51-ae1e-d536fca0a6be commented 15 years ago

Retry is a bit difficult now, sinc I reverted back to Windows after getting quite some answers in some places, but none of them really helpful.

It happend under Madriva Linux (and some other tested Linuxes). Now I'm using Gentoo (this is, IF I'm using Linux). And there it works all fine.

The problem was: Usually one can set the cursorposition in any given (gui) text editor by mouse click in the text. Using Madriva, I can click, but the cursor is not affected.

890b5ebc-8d32-4bd4-bb6d-654c496a49b9 commented 15 years ago

I experience the same, on FreeBSD 7.0-REL, with tkinter compiled to use Tk8.5 instead of Tk8.4. Tkinter compiled for Tk8.4 doesn't have the problem.

Moving the mouse over the text widget changes the cursor to the I-beam as expected, but click on text doesn't position the beam at the mouse position. It is also impossible to select text with the mouse. Selecting text with shift-arrow keys works, however.

The same bug has been reported on the OLPC wiki:

http://dev.laptop.org/ticket/7661 http://wiki.laptop.org/go/User:Rmyers/IDLE_on_the_XO

b81e2d77-9fb6-48ba-81a9-92dbf1eb11c2 commented 15 years ago

I'm using Mandriva 2009.0 and can confirm this problem. RMeyers suggested testing further by loading and running idlelibs/IOBinding.py.

On my Linux system I find that the mouse clicks and selection works fine when running IOBinding.py. Being that this module appears to be built upon Tkinter, it would seem that the bug is at a higher level?

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 15 years ago

I'm downloading Mandriva 2009.0 to hopefully reproduce the problem, but I'm afraid it won't happen. Apparently people that have this issue also reproduce it in different platforms, someone said on http://dev.laptop.org/ticket/7661 that this occurs both on a olpc as well on his mac.

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 15 years ago

Whoa, it went better than I expected. It failed on Mandriva just like it was mentioned, but I still haven't verified what is causing this problem.

And while running IOBinding.py doesn't demonstrate the problem, running EditorWindow.py does.

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 15 years ago

Uhm, I have compiled python-trunk in this Mandriva 2009 now and it works! I didn't change tcl/tk version, just installed the dev packages in order to compile _tkinter.

I still don't know how what kind of changes were done by Mandriva in order to achieve this problem, but I believe this is an issue that will not be solved here.

Given this bug is not so old, I expect some of the initial posters to still be around. Any chance you can ask someone at Sugar to try compiling python from source and test if the bug persists ?

03253b78-a54b-4f51-ae1e-d536fca0a6be commented 15 years ago

Guilherme Polo wrote:

I am the originator of this issue, and I'm back here. So I can add some text.

I remember having read comments on this issue striking on other linuxes too. But I do not remember anymore what distibutions this were.

I switched my Python development to windows (or to be true, I did not switch from windows to linux as intended at the office).

At home I switched the Distribution first to Gentoo and lately to Ubuntu. These both work fine. So I am out here in fact.

Regards Matthias Sommer

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 15 years ago

Closing as won't fix since there is nothing to fix on Python side, not from what I have noticed at least.

Mandriva 2009 and Sugar (and other places with this problem) should check how they got IDLE to act like that, and could try compiling python from source like I did to verify if the problem goes away.