File Change Polling causes UltraEdit to become the active window

File Change Polling causes UltraEdit to become the active window

4
NewbieNewbie
4

    Dec 12, 2013#1

    I'm using UltraEdit for windows Version 20.00.0.1056

    When I turn on File Change Polling for a file, it causes UltraEdit to become the active window whenever the file changes. Is there a way to keep it from activating UltraEdit when File Change Polling is turned on?

    Thanks

    6,606548
    Grand MasterGrand Master
    6,606548

      Dec 12, 2013#2

      I could see only in 1 configuration that the UltraEdit window becomes shortly the active window:
      1. setting When a file is detected as changed and reloaded, make it active is enabled at Advanced - Configuration - File Handling - File Change Detection and
      2. the file on which file change polling is enabled is currently not the active file in UltraEdit.
      I suggest to uncheck setting When a file is detected as changed and reloaded, make it active when you often use file change polling while UltraEdit is in the background.

      I used two instances of UltraEdit in my tests with UE v20.00.0.1056 on Windows XP. Two files were opened in the first instance with a maximized main window and with file change polling activated on first opened file. The second instance of UltraEdit had a normal main window and opened was the polled file for editing. So with the first instance of UltraEdit being maximized, but in the background, I could see quite easily what happens when I edit the file in the second instance of UltraEdit on save.

      With the second file in first instance of UE being active and saving the edited polled file in second instance, the first instance of UltraEdit became active for reloading the file AND making first file active. But the second instance of UltraEdit used to change the content of the file became active again automatically after the file update was done in first instance of UE. Interesting was to see that both instances of UltraEdit had a blue title bar background of main window after this update indicating that this is the active application window. However, input focus was on second instance of UltraEdit.

      With setting When a file is detected as changed and reloaded, make it active unchecked the first instance of UltraEdit became never active on saving the edited polled file in second instance of UltraEdit.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Dec 13, 2013#3

        I still have the issue. Thank you Mofi for looking at this with me. I really appreciate it.

        On Advanced - Configuration - File Handling - File Change Detection, I don't have When a file is detected as changed and reloaded make it active checked.
        On that screen I have the following checked:
        Prompt for update when file change
        Check files for changes only on application focus change
        When a file marked for polling is detected as changed scroll to the last line in the file (use for tailing log files)

        I also have Poll for file changes at forced interval in seconds (0 disables) set to 1

        I'm using it to tail a log file. I only have one file open in UltraEdit. I have an application running that is adding lines to log files periodically. I have UltraEdit opened on another monitor to make sure the application is doing what it is supposed to. Every time the file changes, it switches my focus to UltraEdit.

        I'm running on Windows 8. I don't have a Windows XP box to test on. I don't remember this happening when I was on XP. I *think* I remember this starting when I was on Windows 7, but I don't have a way to verify.

        I ran a similar test to yours. I have two instances of UltraEdit v20.00.0.1056 running with the same file open in both copies. That is the only file open in both copies of UE. In window 1, I type some text and hit control-S. Window 2 now reflects those changes and window 1 still has focus. It appears that UE doesn't take focus from itself, or if it does, it does it briefly, and returns focus to where it originally was.

        But, I was able to duplicate my issue using just text editors. I ran the same test with a copy of UE and a copy of notepad. I type into notepad, hit control-S and UE takes focus.

        6,606548
        Grand MasterGrand Master
        6,606548

          Dec 14, 2013#4

          Okay, your file change detections are set well for what you want to do. I would not change anything here.

          I set the same settings, opened a blank log file and activated polling on this file. Then I opened the file in Windows Notepad typed and pasted some lines and saved the file. UltraEdit updated the display of the file in the background without stealing focus from Notepad.

          I next closed Notepad and used in a command prompt window the command: echo test string>>polling_test.log

          polling_test.log was the file I had opened in UltraEdit with file change polling enabled. UltraEdit updated the file display with every execution of this command in the command prompt window without stealing the focus to itself. I changed from time to time the test string.

          So on Windows XP SP3 x86 using Windows Classic desktop theme (slightly modified, color fading in title bars disabled), I cannot see a problem. It is possible that only on Windows Vista and later the focus is moved to the UltraEdit window in this situation. I cannot verify that in the next weeks as I don't have access to my Windows 7 computer in the next weeks.

          Is there somebody else who can investigate if file change polling activated on a file with the settings as posted with UltraEdit being in background on modifying the file works on Windows 7 or Windows 8 without making UltraEdit window automatically the active application window?
          Best regards from an UC/UE/UES for Windows user from Austria

          11327
          MasterMaster
          11327

            Dec 14, 2013#5

            Windows 7 x64, UltraEdit Version 20.00.0.1056. I can't reproduce this issue. UltraEdit doesn't become an active application.
            Capture.PNG (46.99KiB)
            It's impossible to lead us astray for we don't care even to choose the way.

            4
            NewbieNewbie
            4

              Dec 17, 2013#6

              I was able to access a Windows 7 machine, and I can NOT reproduce the problem there.
              I even imported the UltraEdit settings from my Windows 8 machine to see if it was some obscure setting that was causing it.
              It seems to be limited to Windows 8 or possibly something weird about how my Windows 8 machine is configured.

                Dec 18, 2013#7

                The problem stopped happening to me today. I don't remember changing anything, but I no longer have the issue and I can't seem to get my machine to do it anymore. I have a coworker that is still having the issue, so if we figure out what to do to stop it, I'll post back here with the solution.