bugGNU Octave - Bugs: bug #40823, Focus does not move from editor to...

 
 

bug #40823: Focus does not move from editor to command widow

Submitted by:  Doug Stewart <dastew>
Submitted on:  Fri 06 Dec 2013 04:14:29 AM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Doug Stewart Open/Closed:  Closed
Release:  other Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sun 09 Feb 2014 08:57:36 PM UTC, comment #38: 

Seems to be working just fine for me now. Thank you.

Jameson <jamdaman5000>
Sat 08 Feb 2014 09:25:25 AM UTC, comment #37: 

I have pushed the patch with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/4e49bc41f899
If there are no more issues, I will close the bug.

Torsten Lilge <ttl>
Project Member
Thu 06 Feb 2014 02:39:57 PM UTC, comment #36: 

I plan to push it to stable.

Torsten Lilge <ttl>
Project Member
Thu 06 Feb 2014 08:43:59 AM UTC, comment #35: 

What branch will this be on?

Carlo de Falco <cdf>
Project Member
Thu 06 Feb 2014 05:52:51 AM UTC, comment #34: 

Good news. I'll push it after a test on windows.

Torsten Lilge <ttl>
Project Member
Wed 05 Feb 2014 02:00:42 PM UTC, comment #33: 

I am happy to report that on my system with RC2 and your last patch that all is good now!!  Even the extra starup cruft in Mate is gone!!!

ubuntu 12.04

Gnome Good
Gnome Classic good
Gnome classic (no effects) Good
Mate Good
ubuntu Good
ubuntu 2d Good

Doug Stewart <dastew>
Wed 05 Feb 2014 05:53:17 AM UTC, comment #32: 

I can confirm this on Unity (was using Unity-2D). Octave does even not show up in the task switcher.
The attached patch fixes it for me.

(file #30462)

Torsten Lilge <ttl>
Project Member
Wed 05 Feb 2014 03:24:15 AM UTC, comment #31: 

I did some testing on my Ubuntu 12.04 computer.
The problem is related to the desk top!!
I tried  different desk tops as follows

Gnome     Good
Gnome Classic  Bad
Gnome classic (no effects)  Good
Mate                Good  but with some startup garbage
ubuntu      Bad
ubuntu 2d   Good

This is all on the same machine --just log out and log back in with a different desktop.

Doug Stewart <dastew>
Wed 05 Feb 2014 01:41:48 AM UTC, comment #30: 

I have edited the two source files as described in the change log, recompiled, and ran octave gui.

Still no success with the focus issue.

Jameson <jamdaman5000>
Tue 04 Feb 2014 08:29:31 PM UTC, comment #29: 

I have pushed changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/155d8e90ee1f
with the modification that fixed the issue on Doug's system and two more changes to ensure the terminal widget accepts focus.
Could you please test if this makes a difference on the other systems?

Torsten Lilge <ttl>
Project Member
Tue 04 Feb 2014 01:51:03 AM UTC, comment #28: 

I installed the -rc2 version, and applied Torsten's V2 patch.
Focus problem still exists. I have even tried running the app as sudo with no success.

Ubuntu 12.04, with Unity

Jameson <jamdaman5000>
Tue 04 Feb 2014 12:29:46 AM UTC, comment #27: 

I am not using unity , I am using Mate.

Doug Stewart <dastew>
Mon 03 Feb 2014 11:45:29 PM UTC, comment #26: 

I tried installing gnome.
If I start a gnome session re-focusing works.
If I go back to unity the issue appears again.

Carlo de Falco <cdf>
Project Member
Mon 03 Feb 2014 10:32:19 PM UTC, comment #25: 

My previous test was done with run-octave,
without installing.
I now also tried running Octave after installation
but the focus problem still exists.

Carlo de Falco <cdf>
Project Member
Mon 03 Feb 2014 10:01:14 PM UTC, comment #24: 

Wow it works now for me. I applied them to my copy of RC2 and ran make install. now octave --force-gui gives me:

GNU Octave, version 3.8.0-rc2
Copyright (C) 2013 John W. Eaton and others.

and focus is working properly for me.

Doug Stewart <dastew>
Mon 03 Feb 2014 09:58:14 PM UTC, comment #23: 

tried the patch #30448,
the problem persists.

Carlo de Falco <cdf>
Project Member
Mon 03 Feb 2014 08:54:40 PM UTC, comment #22: 

Attached another patch for testing.

(file #30448)

Torsten Lilge <ttl>
Project Member
Mon 03 Feb 2014 05:27:34 AM UTC, comment #21: 

Bug #41436 marked as duplicate of this one.

Torsten Lilge <ttl>
Project Member
Mon 03 Feb 2014 04:14:40 AM UTC, comment #20: 

I am still in the same boat as Carlo (and as I was earlier). I've tried running as root, and the Octave command window starts up with no text.

Alternatively, I have tried to make a desktop shortcut, but that has proven to be virtually impossible to run as root.

Keep trying! We want this to work and we're all rooting for you. The gui is really well done, and I've been using QT octave for some time now, so I'm ready for an upgrade :)

Jameson <jamdaman5000>
Sun 02 Feb 2014 08:09:17 PM UTC, comment #19: 

I start octave this way:
sudo /usr/local/bin/octave --force-gui

I am still running:
GNU Octave, version 3.8.0-rc2
Copyright (C) 2013 John W. Eaton and others.

when I start Octave from the command prompt like this:

doug@doug-desktopq4:~$ octave  --force-gui

I see this:

Debug: Got bus address:  "unix:abstract=/tmp/dbus-kGASsjRxUq,guid=c4662e0019fa5d1ef8a5cd340001e28d"
Debug: Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-kGASsjRxUq,guid=c4662e0019fa5d1ef8a5cd340001e28d"
Debug: Registered DEC:  true
Debug: Registered event listener change listener:  true
GNU Octave, version 3.8.0-rc2
Copyright (C) 2013 John W. Eaton and others.

Doug Stewart <dastew>
Sun 02 Feb 2014 07:02:41 PM UTC, comment #18: 

Doug,

What do you mean exactly by "running as root"?

If I do:

sudo octave --force-gui

the gui starts but I never see the welcome message and the
command interpreter never starts working

su
octave --force-gui

Octave starts correctly but the focus issue is the same as with the normal user account.

c.

Carlo de Falco <cdf>
Project Member
Sun 02 Feb 2014 06:55:38 PM UTC, comment #17: 

This has shown up with more people than just me so I think it should be fixed before 3.8.1
Doug

Doug Stewart <dastew>
Sun 02 Feb 2014 03:56:11 PM UTC, comment #16: 

New information from Doug: The issue does not show up when running octave as root.

Torsten Lilge <ttl>
Project Member
Sun 02 Feb 2014 03:55:11 PM UTC, comment #15: 

Bug #41423 is marked as duplicate of this one.

Torsten Lilge <ttl>
Project Member
Wed 11 Dec 2013 07:33:39 PM UTC, comment #14: 

I switched to the default-branch and everything is still working as expected on my system.

Torsten Lilge <ttl>
Project Member
Tue 10 Dec 2013 09:33:33 PM UTC, comment #13: 

I tried your patch and it made it worse.
let me explain.
1) I am working on RC1 not stable
2) I applied the changes by hand to the 3 files involved
3) after these changes when I try to get the focus away from the editor to the command window, clicking on the documentation tab and then the command tab, now does not work (it did before)
4) If I click on an old command in the history window it still executes the command and bring the focus to the command window( like before)
5) If I reset default window layout All seems to be OK (except I now have to click the tab and then click the window before I can type ---- in both the editor and in the command window)
6) If I now un-dock the editor all works correctly ( I can switch back and forth with one click)
7) exit Octave and restart
8) back to not working  -- same as 3)

Doug Stewart <dastew>
Tue 10 Dec 2013 08:34:34 PM UTC, comment #12: 

Your settings file looks okay and I can't reproduce the issue when copying it in my .config/octave folder.

Attached a patch that cleans up some code related to focus and visibility handling. Could you please test it?

(file #29857)

Torsten Lilge <ttl>
Project Member
Tue 10 Dec 2013 02:29:43 PM UTC, comment #11: 

 In comment #10 you asked
  ""
   comment #8: What do you mean by "I still have the return in the code"
""
I meant that I had this patch applied --->  focus_console_v01.diff

I now removed that patch

I attached the qt-settings file from when the command window does not respond to mouse clicks.

(file #29852)

Doug Stewart <dastew>
Tue 10 Dec 2013 06:34:14 AM UTC, comment #10: 

Could you please post or send me the settings file (maybe with mru-lists removed) after shutting down octave (so the one where the issue appears)?

comment #8: What do you mean by "I still have the return in the code"

Torsten Lilge <ttl>
Project Member
Mon 09 Dec 2013 08:44:24 PM UTC, comment #9: 

more info!!

If I use windows tab and select the default settings then all is OK
 If I then un-dock the editor it still is OK
The problem only shows up after:
  - detach the editor
  - shut down octave
  - restart octave
 now the problem is evident.

If I keep it docked but in a different location then all is OK

Doug Stewart <dastew>
Mon 09 Dec 2013 08:17:49 PM UTC, comment #8: 

cntl-0 does work !!  I still have the return in the code.

Doug Stewart <dastew>
Mon 09 Dec 2013 07:14:49 PM UTC, comment #7: 

I did mean Ctrl-0 ("Ctrl-Zero") which is the shortcut for switching to the console window.
Does everything work as expected when the editor is not floating but just docked side to side to the console?

Torsten Lilge <ttl>
Project Member
Mon 09 Dec 2013 06:53:42 PM UTC, comment #6: 

Bug #40792 looks to me to be the same bug as this one.

 If, when the focus is in the editor, I then double click on an old command in the command history, then it gets executed and the focus is now in the command window.

Doug Stewart <dastew>
Sun 08 Dec 2013 04:38:28 PM UTC, comment #5: 

Torsten said:

I have tried again with default settings file and a fresh install of octave.
When I undock the editor, type something into a file, I can use all of the
following methods to set the focus into the console window:

  • Clicking into the console window

   >>  does not work for me!!

  • Using Ctrl-0

   >> this opens a dialogue window to open a file, but after I
   >>  open a file the focus is on the file I opened in the
   >>  editor. Not the command area of the GUI !!

  • Clicking on the console windows tab

   >>  does not work for me!!

  • Clicking on the title bar of the main window (the focus must have been in

   >>  does not work for me!!
the console before changing to the editor)

  • Using Alt+Tab for switching to the main window (the focus must have been in

the console before changing to the editor)
   >>  does not work for me!!

I then did the change you suggested ( return; )
./configure
sudo make install -j2

 and there was no change.

One more new detail:
When I have the editor editing a file, and if I get the focus on the command widow and then click on the "Experimental GUI info" button, then close the info window, the focus has moved to the editor again!!!!

If no one else can see this problem then I must be something local.

Doug Stewart <dastew>
Sun 08 Dec 2013 10:04:52 AM UTC, comment #4: 

I have tried again with default settings file and a fresh install of octave. When I undock the editor, type something into a file, I can use all of the following methods to set the focus into the console window:

  • Clicking into the console window
  • Using Ctrl-0
  • Clicking on the console windows tab
  • Clicking on the title bar of the main window (the focus must have been in the console before changing to the editor)
  • Using Alt+Tab for switching to the main window (the focus must have been in the console before changing to the editor)

I have a vague idea what might bring back the focus into the editor (but no idea why this does happen on all systems). Could you please try the attached patch? It does prevents the shortcuts of the editor to be deleted when focus leaves the editor. Therefore, the shortcuts won't work as expected.

(file #29806)

Torsten Lilge <ttl>
Project Member
Sat 07 Dec 2013 03:56:56 AM UTC, comment #3: 

This works for me too.  I'm running 12.04, but with KDE.

Rik <rik5>
Project Administrator
Fri 06 Dec 2013 05:24:57 PM UTC, comment #2: 

I have attached a screen shot.
On a fresh start I grab the editor and drag it off to the side.


Doug Stewart <dastew>
Fri 06 Dec 2013 05:14:28 PM UTC, comment #1: 

I can't reproduce this (ubuntu 12.04, too).

Is the console widget also floating? What is the exact layout when this happens?

Torsten Lilge <ttl>
Project Member
Fri 06 Dec 2013 04:14:29 AM UTC, original submission:  

If the editor is detached and after typing in the editor window, you then click on the command window, the focus does not leave the editor window. But if you click on the documentation tab then the focus moves to the documentation window, Then if you click on the command tab , you then have the focus in the command window.

RC1
Ubuntu 12.04

Doug Stewart <dastew>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30462:  minimized_v03.patch added by ttl (3KiB - text/x-diff)
file #30448:  focus_v02.patch added by ttl (1KiB - text/x-diff)
file #29857:  widgets.patch added by ttl (2KiB - text/x-diff)
file #29852:  qt-settings added by dastew (25KiB - application/octet-stream)
file #29806:  focus_console_v01.diff added by ttl (383B - text/x-diff)

 

Carbon-Copy List
  • -email is unavailable- added by jamdaman5000 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by dastew (Submitted the item)
  • -email is unavailable- added by dastew
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 16 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-09 ttl StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2014-02-05 ttl Attached File- => Added minimized_v03.patch, #30462
    2014-02-03 ttl Attached File- => Added focus_v02.patch, #30448
    2014-02-03 ttl Dependencies- => bugs #41436 is dependent
    2014-02-02 ttl StatusWorks For Me => Confirmed
    2014-02-02 ttl Dependencies- => bugs #41423 is dependent
    2013-12-15 ttl StatusNone => Works For Me
    2013-12-10 ttl Attached File- => Added widgets.patch, #29857
    2013-12-10 dastew Attached File- => Added qt-settings, #29852
    2013-12-09 rik5 Carbon-CopyRemoved 72865 => -
    2013-12-08 ttl Attached File- => Added focus_console_v01.diff, #29806
    2013-12-06 rik5 Carbon-CopyRemoved 72865 => -
    2013-12-06 rik5 SummaryFocus does not move fronmeditor to command widow => Focus does not move from editor to command widow
    2013-12-06 dastew Attached File- => Added Screenshot from 2013-12-06 12:20:51.png, #29797
    2013-12-06 dastew Carbon-Copy- => Added doug.dastew@gmail.com

    Back to the top


    Powered by Savane 3.5