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

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Window Focus on OS X
« Reply #15 on: October 13, 2010, 05:13:06 PM »
I do not have ARDAgent running.

I'm going to run for a while with the 'focus on new windows' and 'use system alert effect' settings disabled.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #16 on: October 14, 2010, 12:21:56 AM »
Here are the answers for me...

1.) Tool Windows Open

  • a single maximized editor window - although it happens if I have multiple windows open also
  • one custom toolbar with the following tools { calculator | spell check | create empty unamed file | create file from template and add to project | search | search for word at cursor | search for string in files | search for string and replace | activate find symbol window | beautify selection }
  • one toolbar with just the current context droplist
  • the project tool windows is pinned and open to the left of the editor window
  • search result window is set to auto-hide
  • build window is set to auto-hide
  • output window is set to auto-hide

2.) What other apps are running...

Typically I'm running Eclipse Helios and Chrome but I have ran without them and still have the focus issue.

3.) Yes. I have a custom color scheme with a custom symbol color scheme.

The custom symbol color scheme only has 3 rules:

Symbol Declaration: import
Symbol Declaration: var
Symbol Declaration: gvar:Static

4.) X11 Settings...

XQuartz 2.3.5 (xorg-server 1.4.2-apple53)

Emulate three button mouse: unchecked
Follow system keyboard layout: unchecked
Enable key equivalents under X11: unchecked

Colors: From Display
Full-screen mode: unchecked
Use system alert effect: unchecked

Enable Syncing: checked
Update Pasteboard when CLIPBOARD changes: checked
Update CLIPBOARD when Pasteboard changes: checked
Update PRIMARY (middle-click) when Pasteboard changes: checked
Update Pasteboard immediately when new text is selected: unchecked

Click-through Inactive Windows: unchecked
Focus Follows Mouse: unchecked
Focus On New Windows: checked

Authenticate connections: checked
Allow connections from network clients: unchecked

5.) I am not running ARDAgent



garion911

  • Senior Community Member
  • Posts: 201
  • Hero Points: 13
Re: Window Focus on OS X
« Reply #17 on: October 14, 2010, 02:53:19 AM »
This may or may not be related. Just some observations.

I also occasionally see odd focus issues on OSX, but I'm running the Linux version of Slick, via ssh -X.. I've had it switch away from Slick in the middle of typing. Slick is the only X11 app running (remote or otherwise).

I've also noticed that this seems to happen when a webpage refreshes (I use Chrome).. No idea if thats related or not, as Chrome is OSX native, and not using X11.


rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Window Focus on OS X
« Reply #18 on: October 18, 2010, 05:36:01 PM »
I'm going to run for a while with the 'focus on new windows' and 'use system alert effect' settings disabled.

Tried running with the settings above to no avail. Still having the problem at the same frequency (once per hour or so).

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #19 on: October 18, 2010, 05:50:21 PM »

I have also done some more testing. It doesn't seem to be related to a particular language. I get the same behavior whether it be a .h, .c, .cpp, .java, .xml, .txt, .log et cetera.



Scott H

  • Senior Community Member
  • Posts: 240
  • Hero Points: 9
Re: Window Focus on OS X
« Reply #20 on: October 19, 2010, 01:53:10 PM »
This is very frustrating.  I've run with the different configurations you've all mentioned for several hours apiece and have not seen this problem on my Mac here.  I still need to try it with Chrome on a page that refreshes, but other than that I'm not having any luck reproducing this.  When this problem happens, do you notice anything in the console window that might occur at the same time as SlickEdit losing the focus?  Thanks for being patient, I'm doing my best to even just see this problem happen.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Window Focus on OS X
« Reply #21 on: October 23, 2010, 09:59:16 PM »
I've been away for a while and didn't notice your question until today. I'll try to keep an eye on the console and other status bars next time it happens and let you know what I see. Thanks for continuing to look into this.

Do you use spaces on the Mac? I have spaces enabled with 4 spaces. Usually my browser is in one space and my editor/x-windows are in another. Could that have some effect on this? i.e. if the browser was in the background vs the foreground of another space maybe that makes a difference.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #22 on: October 27, 2010, 04:40:29 AM »
I am also running with a bunch of tag files (c++ and java). It sure seems like my focus issue is related to something periodically processing in the background with a high priority. Or, something is about to display a window but it takes too long to gather up the information and eventually it times out and doesn't display the window and focus pops back. Every time I lose focus, I can take my hands off the keyboard and by the time I count to 10-15 it pops back to the cursor location and I'm typing again.

I also walked through one by one and matched my configuration with that of my Windows SlickEdit installation (doesn't exhibit any issues). The settings are virtually the same. Just some minor path differences.

If you can't reproduce with your configurations and we don't have any other diagnostics then it doesn't sound promising.

Sad to say, because of my coding speed I just couldn't keep using SlickEdit on my Macbook Pro because of this issue. It was too disruptive. At this point I'm eating the $360. It is what it is... I'll just check back periodically to see if someone stumbles onto anything.

BTW, I tried running SlickEdit with CrossOver Mac as a possible option but it hangs periodically. No biggie - I didn't expect it to work anyway.

Thanks for all the effort everyone - back to work for me.


Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Window Focus on OS X
« Reply #23 on: October 27, 2010, 09:13:30 AM »
Maybe you have a service running that steals the focus.  Does OS X have any tools that let you monitor process execution like process monitor on Windows does?  You could try and monitor which process is executing when you lose focus  - or write a program to log which process has the focus or is active and check the log when you lose focus.  I think I've noticed occasional programs on Windows that steal the focus for no reason sometimes - too long ago to remember which though. 

I would have thought you would get the same problem whatever editor you used  - unless it's something in slickedit that causes it e.g. an update check.  Maybe you should leave slickedit running and see if your other editor loses focus.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Window Focus on OS X
« Reply #24 on: October 27, 2010, 12:41:58 PM »
I've not seen this problem with x-windows or any other programs. The problem only happens when SlickEdit is the main program in focus and I'm typing. I haven't been able to spot anything in the console or other windows yet. Sometimes it takes me a moment to recognize the problem is happening (I'm typing and finally realize that nothing is being put into the window) and by the time I look, focus has returned.  For me, I seem to only loose about 1-3 seconds of typing so it doesn't seem as extreme as btmrm's case of 10+ seconds.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #25 on: October 27, 2010, 01:30:28 PM »
As far as other editors go.

I have tested Gnu Emacs, MacVim, TextMate, BBEdit, & Eclipse Helios on the same system. None of them have focus problems.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Window Focus on OS X
« Reply #26 on: October 27, 2010, 02:10:05 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.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Window Focus on OS X
« Reply #27 on: October 27, 2010, 02:17:43 PM »
btmrm: On the first page you said that you can readily reproduce this by scrolling all the way to the bottom and back to the top several times. Can you repeat that test with the profiler running:

1) Start SlickEdit.
2) Turn on the profiler. From the SlickEdit command line, type: profile on.
3) Reproduce the problem.
4) Stop the profiler. From the SlickEdit command line, type: profile save "<filename>", where <filename> is the name of the file to save, like "profile.txt".

Send that file to product support or post it here. Anyone else who can readily reproduce this, please do the same. It's best if you have a case where you can reproduce it on demand. The greater the percentage of time spent with lost focus, the easier it will be for us to figure out what's going wrong.

btmrm

  • Community Member
  • Posts: 23
  • Hero Points: 0
Re: Window Focus on OS X
« Reply #28 on: October 27, 2010, 03:31:36 PM »
profile on
reproduced
immediately saved after the focus returned to my editor window

profile.txt is attached


ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Window Focus on OS X
« Reply #29 on: October 28, 2010, 01:57:47 PM »
Did you just scroll down and up again, like you said earlier? Knowing what you did helps us make sense of what's in there.