Often when I am debugging my own app, I keep the same web page open in Safari with the Web Inspector open. This way I can easily inspect the same DOM that I am stepping through in the debugger. However, it is annoying that that window hides itself when Safari is not at the front as I have to keep switching between the debugger in XCode and Safari. Therefore I have created a patch which adds a 'Hides in Background' option to the pop-up menu show in the top-right corner of the Inspector.
Created attachment 7869 [details] Adds a 'Hides in Background' menu item to the Web Inspector window
Comment on attachment 7869 [details] Adds a 'Hides in Background' menu item to the Web Inspector window Do we really need a menu item for this? Can't we just decide which way it should work?
I'm thinking it's better to just change the setting to not hide in background. We should ask Tim Hatcher what he thinks.
I personally think the default should be not to hide. I can't stand that behavior in "debugging" windows like the Snippet Editor and the Web Inspector, since often you need to look at them while bringing another app to the front.
I did consider just setting it to not hide, but maybe some people like the behaviour. Personally I would default it to not hiding, but keep the menu in case people need it to for some reason. Its not as if it takes up any extra space in the UI
I agree that we should just change the behavior to not hide in the background. That seems better than the menu. I don't think there's a great need to offer the hiding behavior as well.
Comment on attachment 7869 [details] Adds a 'Hides in Background' menu item to the Web Inspector window We have consensus now that we want to turn hidesOnDeactivate off completely rather than adding a menu item. Also need a change log entry.
Created attachment 7917 [details] New patch Makes the inspector not hide in the background. Since the inspector is a floating panel we need to call setFloatingPanel:NO when the app is switching into the background. Then call setFloatingPanel:YES when the app is activated again. Withouth this the inspector would float above all applications.
Comment on attachment 7917 [details] New patch Looks fine. r=me.
Landed in r14020.