Author Topic: Find/Replace in Files Window Does Not Have Focus  (Read 334 times)

bruceb

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Find/Replace in Files Window Does Not Have Focus
« on: September 07, 2022, 04:30:03 pm »
Not sure what I might have done to cause this, but when I do Ctrl+Shift+F (mapped to find-in-files) the "Find and Replace" dialog window is opened, but focus remains on the editor window. As a result, if I start typing thinking I'm typing in the "Search for" box, I'm actually typing in my editor window. I have to click the "Find and Replace" dialog to move focus to that window. I believe that previously focus would automatically move to the "Find and Replace" with Ctrl+Shift+F.

Thanks!

PS, SlickEdit Pro 2020 (v25.0.2.0 64-bit Linux)
« Last Edit: September 07, 2022, 04:48:37 pm by bruceb »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2787
  • Hero Points: 146
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #1 on: September 08, 2022, 10:40:31 pm »
Instead of find-in-files, try binding it to activate-find.

bruceb

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #2 on: September 08, 2022, 11:11:00 pm »
Thanks for the suggestion, Dan. I tried mapping to activate-find, but the result is "pretty much" the same. The same dialog box appeared but opened to the Find tab (instead of the Find in Files tab). However, the focus was still on the editor window, and I have to manually click on the dialog box to move focus from the editor window to the dialog box.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3725
  • Hero Points: 490
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #3 on: September 09, 2022, 02:55:16 pm »
Do you have your desktop configured for focus follows mouse ?

Also, to help narrow this down, when you do find-in-files, does it come up docked, floating, or do you have it auto-hidden?  If floating, do you leave it floating or close it after you are done?

bruceb

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #4 on: September 13, 2022, 08:27:05 pm »
Thanks for the suggestion, Dennis.

I tried checking "focus follows mouse" but maybe I'm looking in the wrong place. I searched for "focus" in the Options dialog and the only option that seemed (to me) relevant was:
Tools->Options->Editing->Editor Windows: Place cursor on focus click: On

As far as whether the window is docked or floating, it is floating -- it appears when I type Ctrl+Shift+F and it disappears when I either cancel the dialog or click the "Find" button.

Any additional suggestions are appreciated.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1744
  • Hero Points: 148
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #5 on: September 14, 2022, 01:10:50 pm »
I think for the focus follows mouse setting, Dennis meant a setting for your desktop, not SlickEdit.   When that's turned on, a window will become focused when the mouse is over it, without having to click on the window.  If you need to click on a window to get focus, then that setting isn't on.  It's not supported by all desktop environments.

I'll add some more related questions that may or may not help reproduce or understand what you're seeing:

What linux distribution do you have installed? Can you also go to your Help -> About dialog box and copy and paste out the "XServer Vendor", "Window Manager" and "Display Manager" entries into a reply for us.  And then go to a terminal and get the output of $XDG_SESSION_TYPE and post that in a reply as well?   

bruceb

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #6 on: September 14, 2022, 03:58:42 pm »
Thanks, Patrick. I'm using an X-windows display from RHEL Linux 7.2 back to Windows 10. Here's the Help->About output from SlickEdit running on Linux (I've trimmed some output that my employer might consider sensitive):

SlickEdit Pro 2020 (v25.0.2.0 64-bit)

OS: Linux
OS Version: Red Hat Enterprise Linux Server release 7.2 (Maipo)
Kernel Level: 3.10.0-327.el7.x86_64
Build Version: #1 SMP Thu Oct 29 17:29:29 EDT 2015
Processor Architecture: x86_64

X Server Vendor: Colin Harrison
Window Manager: Unknown
Display manager: /usr/sbin/gdm

Memory: 83% Load, 205226MB/245036MB Virtual
Shell Information: /apps/linux/slickedit/x86_64/v25/bin/secsh -i
Screen Size: 3840 x 1208

Project Type: Single file project - Other
Language: .h (C/C++)
Encoding: ACP (30001)

Installation Directory: /apps/linux/slickedit/x86_64/v25/
Configuration Directory: /home/bbaum/.slickedit/25.0.2/
Migrated from: /home/bbaum/.slickedit/24.0.2/

--------------------------------------------------------------------

OS Info (From /etc/os-release):
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.2 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"



As far as $XDG_SESSION_TYPE output, it seems XDG_SESSION_TYPE isn't in my list of env variables, although XDG_SESSION_ID and SDG_RUNTIME_DIR are (?), so running $XDG_SESSION_TYPE as a command produced no output.


For what it's worth, I also have SlickEdit v25.0.2.0 running natively on Windows 10 but I don't have the same issue when running SE on Windows -- pressing Ctrl+Shift+F pops up the Find-in-Files dialog and focus immediately moves to that dialog.


Finally, I was unable to locate any settings (Windows or Linux) related to "focus follows mouse". Patrick's explanation made sense and I have seen that setting when I  log in natively to Linux. However, in this environment I use PuTTY to ssh into a Linux box, and X-Display (XMing) back to Windows. I'll snoop around in the XMing settings to see if there's something that stands out.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1744
  • Hero Points: 148
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #7 on: September 14, 2022, 04:20:13 pm »
Don't worry about searching for that setting, it won't exist.  The simple window manager that runs with Xming won't have it.  Same for the XDG_SESSION_TYPE,  I asked for that to check for Wayland,  but for a remote session to windows (and that version of RedHat), that's not going to be in the mix.

When it worked for you before, was it with the remote session, or with you sitting at the box, or in a different situation?  We do sometimes see focus behavior differences with the Xming and related Windows X servers.  Some have been fixable, some have not.  A little later this afternoon I'll try to reproduce it, I'm pretty sure I have Xming installed on one of the windows systems for this kind of test.

bruceb

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #8 on: September 14, 2022, 04:39:37 pm »
In my work environment we only ssh (via PuTTY) into our Linux machines -- the physical servers are not directly accessible. And it worked nicely for many years, but this behavior started within the past year (I believe).

I did just try an alternate approach but I'm still seeing the same behavior. Rather than using PuTTY to ssh into the Linux box, I used Windows Remote Desktop Connection, which provides a GUI desktop on the Linux box. I fired up Visual SlickEdit, hit Ctrl+Shift+F and the Find-in-Files dialog popped up, but focus was still on the editor window, not the dialog box.

BTW, thanks for the help and suggestions!

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1744
  • Hero Points: 148
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #9 on: September 14, 2022, 06:00:17 pm »
Yeah, I think the remote desktop connection method takes concerns like the Xming window manager out of the equation, since it doesn't operate like an X server with a remote client.  I don't recall ever seeing a behavior difference when using Remote Desktop for the remote connection method.

I'm going to try some things with your WM here.  I may PM you later with instructions on how to upload your user.cfg.xml file without posting it to the forum, if I need it.  I'm not sure that I will.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1744
  • Hero Points: 148
Re: Find/Replace in Files Window Does Not Have Focus
« Reply #10 on: September 15, 2022, 01:39:51 pm »
I sent a PM with instructions on how to upload some of your config so I can take a look at it.  I can't reproduce the problem so far.