Finder is weird (bounds of front window)

tell application "Finder"
    return properties of front window
end tell

With only 1 window open, I get the standard, seemingly correct info.

With that window and the “Show view options” (C+j) I get a totally different weird result.
When I explore in SD, I also get 2 windows (expected) with the same weird bounds…

Any idea what’s doing that?

Hey Jean Christophe,

Look at the class and id of the windows.

Note that the view-options window has the same name as the window it’s affecting (at least on Mojave).

-Chris

Hi Chris !

Yes, I guess they’re different, but visually speaking the Finder window is front and the view-option window is not. Plus, I don’t see why because the window-option window is displayed it changes the values of the Finder window it relates too.

I found that behavior in a script that I use to resize the front window I just created. Recently it started to not work, and I realized it was because the view-option thing was enabled…

Anyway, I will find a workaround. I was just wondering if people here were aware of this glitch :slight_smile:

I get that, but it’s often the nature of floating windows…

On my Mojave system the floating window is not affecting the Finder window…

tell application "Finder"
   {¬
      {{|Name:|:name}, {|Floating:|:floating}, {|Bounds:|:bounds}} of window 1, ¬
      {{|Name:|:name}, {|Floating:|:floating}, {|Bounds:|:bounds}} of window 2 ¬
      }
end tell
{
   {
      {
         |Name:|:"Downloads"
      }, 
      {
         |Floating:|:true
      }, 
      {
         |Bounds:|:{
            234, 
            39, 
            470, 
            585
         }
      }
   }, 
   {
      {
         |Name:|:"Downloads"
      }, 
      {
         |Floating:|:false
      }, 
      {
         |Bounds:|:{
            241, 
            23, 
            1199, 
            900
         }
      }
   }
}

Interesting. I get similar results but when I explore the windows in Script Debugger I don’t get that. I get 2 “windows” and they are both “floating” and both have the same boundaries. When I dismiss the view-option window, SD reverts to one window with the correct bounds and its not floating anymore…