In OS/X 10.11 (EL CAPITAN): How do you make the previous app window the active app? For example, if I open Excel, then open Word, then open another Excel window, when I close the last (active) Excel window, I want to go back to the Word window as active, but OS/X makes the first Excel window active rather than the Word Window.
That's because macOS isn't Windows. ;)
macOS is "application centric" not "window centric".
When you open that second Excel window, the Excel app becomes the active (front-most) application again. When you close a window in an app, the next window in its stack becomes the active window. If the app has no more windows, it's still the active app, there just isn't an active window.
This is because in macOS, the application's interface (menu bar, keyboard shortcuts, etc.) follow the active app—they aren't attached to windows, as they are in Windows, which is, by the way, how "Windows" got its name.
So what you don't want is to close a window and have all of your commands disappear on you, which is what would happen if the OS switched apps when you closed that most recent Excel window. Once you open or activate a macOS app, it stays the active app (along with all of its windows) until you Quit it or explicitly switch apps (by, say, clicking on the window of another app).
Related
How can I configure PhpStorm to use the "non-native" fullscreen mode? I'd like PhpStorm to be fullscreen (without the macOS top menu bar, etc), in the same window (without creating a new window that I have to scroll between).
The terminal for macOS iTerm2 have this setting. You can choose to remove the tick from "Native full screen windows". When this tick is removed, the fullscreen mode will simply take out all space in the window, without creating a new separate window.
Native fullscreen example
Notice how a new separate "window" is created called "PhpStorm"
Non-native fullscreen example
Notice how theres still one window called "Desktop". The iTerm window fills out the whole screen though.
the only way you can do it at the moment is by adjusting the dock in mac to hide menu automatically and then spread the editor to wider and higher setting
click right on the dock in mac and goto settings and hide menu works for me
i am suffering from same issue lol after i saw iterm2 :P
I've currently connected two monitors via a dock to my notebook.
When I'm running my console application, the console window always pops up on the first monitor. How can I change that it's automatically opened on another monitor, e.g. on monitor 3? Maybe there is a property I need to modify?
It's very annoying to always drag the console window onto the monitor on which my IDE is opened.
Console applications (unlike GUI applications) don't create their own window; that's done by Windows, and in the case when you're running in an already created console, then you kinda inherit, e.g., cmd's window.
What you can do, though, is to find your window and move it to a different monitor.
Another option is to change the window manager settings for that application in the properties of the console window under Layout. Especially the check box »Let system position window«. To do so, first move the window where you'd like it to appear, then open the properties, go to the Layout tab, and just click »OK«.
Safari's dock icon includes right-click commands for "New Window" and "New Private Window" -- see screenshot.
Since Mozilla rather negligently left these shortcuts off of the Firefox dock icon, is there any way (i.e., via AppleScript?) to add the same commands to Firefox's icon in the dock?
Edit: It has come to my attention that, currently, both Firefox and Safari act identically in this matter. If either application is open, the "New Window" and "New Private Window" commands appear in its dock icon's context menu. When either Safari or Firefox is closed, no such commands can be seen. This may be an across-the-board restriction in macOS regarding what commands may be seen when Command-Clicking on pinned icons in the dock for applications that are not running. If so, it's a pity; in Windows, if Firefox is pinned to the taskbar, these commands are always available via right-clicking whether Firefox is open or closed.
Not without modifying the Firefox application itself. (Good luck… it's a scary place in there.)
Dock menu items have to be created from native code running within an application. They can't be set by another process.
Applescript can do some interesting things in general, but it can only interact with existing functionality of an application (and even then, only with functionality that's explicitly been made scriptable). It can't add completely new features to an existing application.
my mac os application is running in full screen mode.
On button click i'm opening finder window which allow me to open any another file or application but problem is that, when i open any another app, screen switches back to xCode and that application opens. Need to open selected app/file above same window.
I have tried:
**[[NSWorkspace sharedWorkspace] launchApplication:path];**
passing application path to launchAppication method
How can i do this?????
Help
The issue is basically because using [NSView enterFullScreenMode:withOption:] will set the app's [NSWindow level] to kCGMaximumWindowLevel - 1, so that all other app's windows will appear behind it.
This is kinda what you would expect from a fullscreen app, which implies system-modal behaviour.
I guess the only way of allowing another app to appear in front of the fullscreen app would be to lower the window level, however I have no idea what effect that would have.
In my OSX menubar application, the user can open a particular application NSWindow from a dropdown menu item. Being a menubar application, this is accessible from any Desktop (a Desktop as in a Mission Control 'Space').
I've got a reference to the window programmatically.
Say the user has clicked the menu item while on Desktop 1, the currently active Desktop. Naturally, the NSWindow is created, opened, brought to front. It now lives on Desktop 1
The user browses to Desktop 2, so that it's now the active Desktop.
The user clicks on the menu item again.
Since the window is already open on Desktop 1, I'd like Spaces to automatically bring set the active Desktop to Desktop 1 again, so that the user can see the window he/she wanted to see.
How do I programmatically achieve this with Objective-C Cocoa in OSX?