Author Topic: Window Focus on OS X  (Read 17163 times)

rajkej

  • Senior Community Member
  • Posts: 285
  • Hero Points: 13
Re: Window Focus on OS X
« Reply #30 on: October 28, 2010, 02:13:02 pm »
rajkej: you describe this as a loss of focus. Are you sure that's what this is? Is there a visible sign that the window has lost focus: cursor disappears or window border changes color? Do the characters you type come out in a different window? Or is the only observable symptom that the characters you are typing don't appear in SlickEdit? Do the characters show up after the pause or are they just gone?

I'm wondering if this isn't some kind of hang bug rather than a focus issue.

I had to ponder this for a bit and test it again. It seems to me that the window that I'm editing in loses focus. I use the editor in "multiple files share window" mode and I usually split the window vertically so I have two files open at a time. When the problem happens, the window I'm editing does lose focus and seems to flash and redraw. The keystrokes I was typing are lost. Its hard to see what is actually happening when this occurs because it is over pretty quickly (2 seconds or so) and it takes about a second or two for me to realize that its happening.  Could it have something to do with autosave or backup? I'm not sure. It doesn't seem to occur every 10 minutes (my autosave setting) but it could be happening on that boundary.  I don't know of a manner in which to reproduce this problem.

Maybe I'll turn off autosave for a day or two...

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2834
  • Hero Points: 431
Re: Window Focus on OS X
« Reply #31 on: October 28, 2010, 03:46:32 pm »
Try temporariliy turning off Symbol Coloring and re-running the profiling session.

   View > Symbol Coloring > Enable Symbol Coloring (toggle off)

Also, watch the CPU guage and also how much time you spend between turning profiling on and saving the data.

Finally, try not to click outside of slickedit while profiling, since this introduces extra data into the profiling results (calls to on_got_focus(), etc).

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #32 on: October 28, 2010, 05:27:29 pm »
To answer the previous question. Yes. I was just scrolling and not editing.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #33 on: October 28, 2010, 07:20:51 pm »
A run with symbol coloring toggled off....

Attached profile2.txt

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #34 on: October 28, 2010, 07:30:56 pm »
I saved the profile as soon as the focus returned. Now, I know nothing about these files and profiling for slickedit but I see this...

codehelp.ex   27332   CodeHelpActive   4   18   29   89   18   29   89
stdprocs.ex   12226   _on_got_focus   3   31   3742   7479   24   31   79
complete.ex   6560   list_matches   17   43   25825   104833   18   3478   12007

Which appears to be the only _on_got_focus.

I'd like to point out that, at no time during this test, did I see any other windows popup (like code completion or tooltips or parameter info). Was I supposed to see window for the above list_matches?

Just throwing darts ;)


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2834
  • Hero Points: 431
Re: Window Focus on OS X
« Reply #35 on: October 29, 2010, 02:16:00 pm »
I mispoke pointing on _on_gotfocus().  That is normal because you'll get that whenever a control gets focus, so switching to/from the command line to do the profiling would have triggered that event.  There was a pair of calls to _on_activate_app(), which does mean that another app got focus and then returned it to SlickEdit.  Did you have to click on SLickEdit to get focus back, or did it just come back to you.  Can you keep an eye on the active processes and see if there is something out there being mischevious?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2834
  • Hero Points: 431
Re: Window Focus on OS X
« Reply #36 on: October 29, 2010, 02:16:53 pm »
Let me add, that the profiling results shows very little time spent processing, so if SlickEdit was doing anything, it wasn't in the macros (and SlickEdit does nearly everything through macros).

rajkej

  • Senior Community Member
  • Posts: 285
  • Hero Points: 13
Re: Window Focus on OS X
« Reply #37 on: October 29, 2010, 02:17:58 pm »
Is autosave done in the macros?

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #38 on: October 29, 2010, 04:13:47 pm »
I don't have to click on the app to get the focus back.

When I get some time I will run through it again and watch the processes.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #39 on: October 29, 2010, 09:42:46 pm »
As with my case, it loses focus for a good 5-10 secs so I decided to attempt to capture it...

See the attached screenshot. Note I had to make the windows smaller and close some of the tool windows I normally run with. I also had to blur some of the info in the image for privacy reasons.

The cursor at line 70 popped, slickedit jumped to the top and spiked my disk.


Scott H

  • Senior Community Member
  • Posts: 240
  • Hero Points: 9
Re: Window Focus on OS X
« Reply #40 on: November 05, 2010, 03:37:40 pm »
If I could make another request for you to try something... would you be able to make a copy of one of your files, give it an extension of .aaa and open it in SlickEdit?  Make sure it's in Plain Text mode (Document > Select Mode).  This will turn off all tagging and updating as you scroll with the keyboard.  Now try scrolling up and down in the file with the keyboard again and let me know if you have that problem.

Sorry for having to keep coming back and asking you to try new stuff, we're just trying to narrow down the possibilities of what's causing this.  Thanks!