Author Topic: Unwanted focus change with undocked preview window  (Read 5625 times)

dmw

  • Senior Community Member
  • Posts: 145
  • Hero Points: 15
Unwanted focus change with undocked preview window
« on: September 08, 2008, 01:42:00 PM »
Recently, I tried to make more efficient use of multiple monitors by undocking various tool windows and moving them to the second monitor.  Very useful to have things like the Preview and Defs windows always visible -- especially while navigation unfamiliar code.  Problem is, whenever I hit ctrl-dot (push-tag) and a dialog or message box shows up (like the Select Symbol dialog), after dismissing the dialog, focus does not return to the editor window, but always seems to land on the Preview window.  Then I have to hit Esc to return focus to the editor window.  Also, the scenario I have just described is only one way to make the problem show up.  Basically, any dialog that SE shows will cause the focus to move to the Preview window on dialog dismissal, just opening the options dialog, for instance.

[update:] A little further examination reveals that it is not always the Preview window that receives the focus after dialog dismissal, but the last tool window to have the focus.  For example, if I click on the Defs window, then click the editor window, then open and close the options dialog, focus will return to the Defs window.

I'm on Mac OS X 10.5.4 and SE 13.0.2.

This problem doesn't show up when I have the Preview pane docked and auto-hidden, which is how I have worked for, well, ever.

Is this a Mac-only problem?  Is there anything I can do about it?
« Last Edit: September 08, 2008, 01:44:38 PM by dmw »

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Unwanted focus change with undocked preview window
« Reply #1 on: September 08, 2008, 03:01:23 PM »
I can't speak for anyone else, but on Windows XP SP3 with 13.0.2, the behavior described does not occur.  i.e., If I hit "Open" or the options dialog, canceling or hitting escape returns me to the editor window from which I started with the cursor & focus where it belongs. 

Is it, perhaps, any X-Windows build or just the OSX build?  (I know they're supposed to be the same, but I don't know that for myself.)

Jim.

dmw

  • Senior Community Member
  • Posts: 145
  • Hero Points: 15
Re: Unwanted focus change with undocked preview window
« Reply #2 on: September 10, 2008, 06:11:36 PM »
Well, after suffering through the focus stealing problem for a few days, I played around with the options to see if I could come up with something better.  What I discovered was that the "always on top" option is the culprit.  If I have a floating window with the "always on top" option checked (which seems to be the default), it will always steal the focus when dismissing any dialog.

So, by un-checking "always on top", I get the behavior that I want.  But it seems to me that the "always on top" option is broken for floating windows.

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Unwanted focus change with undocked preview window
« Reply #3 on: September 10, 2008, 07:07:00 PM »
Now it sounds more like it's build-specific.  I had to hunt for "Always On top" to see how mine is set.  It's checked, and tool windows do stay on top.  But I don't have the focus-stealing issue.

http://community.slickedit.com/index.php?topic=1567.0 talks about invoking Slick & getting focus (not pretty).

http://community.slickedit.com/index.php?topic=744.0 talks about focus in X11. 

It sounds like a platform-specific issue for floating windows.  I'm sorry that I don't have a way to correct it.

Perhaps someone with more X11 experience?

Jim