totalterminal icon indicating copy to clipboard operation
totalterminal copied to clipboard

activating visor window hides current full screen app

Open patricknixon opened this issue 13 years ago • 30 comments

if i am viewing a window in lion's full screen mode and then activate the visor window, the full screen app slides away as if i was switching to another application.

patricknixon avatar Jul 23 '11 14:07 patricknixon

yeah, would be great to have totalterminal to cover the fullscreen-app. So your terminal is always with you, no matter what fullscreen app you're working on.

Might be hard to implement, i guess.

At least the flickering when a fullscreen app switches to totalterminal on the desktop (on hitting the hotkey it switches to desktop with total terminal window visible, then it hides, and comes backs again) should be removed.

doits avatar Aug 01 '11 13:08 doits

this would be a must, specially when running Textmate with fullscreen plugin.

Issue #12 references this same problem!

ygbr avatar Aug 06 '11 16:08 ygbr

I encourage someone to go further and implement it because personally I don't use fullscreen apps right now and I don't plan to fix this anytime soon.

This will probably involve some new 10.7 APIs to tell the system that activating windows of Terminal.app should not exit fullscreen mode of fullscreen apps.

darwin avatar Aug 06 '11 23:08 darwin

I think someone needs to implement NSWindowCollectionBehaviorFullScreenAuxiliary

see:

NSWindowCollectionBehaviorFullScreenAuxiliary Windows with this collection behavior can be shown on the same space as the fullscreen window. Available in Mac OS X v10.7 and later. Declared in NSWindow.h.

https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/cl/NSWindow

ygbr avatar Aug 07 '11 17:08 ygbr

I have just tried it without success. Also one guy has open question on Developer Forums at Apple since Jul 5 and without answer.

My understanding so far: When window goes to fullscreen mode, system creates a new exclusive space for this fullscreen window. Exclusive space allows only app's windows to be shown there. The app can create multiple fullscreen windows and each of them takes new exclusive space (try Safari and multiple CMD+N). You may mark some of your windows to be NSWindowCollectionBehaviorFullScreenAuxiliary so they can be shown on top of fullscreen windows without creating a new space. AppKit auxiliary windows like NSPanel have this flag set by default.

The problem: Terminal.app is different app and there is probably no supported way how it could display its own windows in exclusive space of some other app (say Safari).

My guess is that this will be possible on window server level with some CGSPrivate hackery (after someone takes the time to reverse-engineer it).

darwin avatar Aug 07 '11 20:08 darwin

I have noticed that Adium message windows are sometimes able to occupy the Fullscreen apps spaces, not sure how yet.

ygbr avatar Aug 07 '11 20:08 ygbr

As an workaround you can set LSUIElement in Terminal's Info.plist

vvlad avatar Aug 22 '11 18:08 vvlad

It works!

The drawbacks:

  • Terminal no longer shows on Dock ( This is quite obvious as LSUIElement does exactly that ).
  • There is a space the size of the top bar on top of every TotalTerminal visor opened on Fullscreen apps windows.
  • You can no longer CMD - Tab to regular Terminal windows.
  • You cannot Force Kill Terminal process.

Apart from that, works like a charm!

ygbr avatar Aug 23 '11 15:08 ygbr

Great job guys!

darwin avatar Aug 24 '11 09:08 darwin

Hey darwin, do you think you can put an option on TotalTerminal preferences to inject or remove LSUIElement from Terminal preferences Plist? You can name it something like "Work with Fullscreen apps". Is it possible to do it in runtime ?

ygbr avatar Sep 09 '11 16:09 ygbr

It is possible to add it to preferences, but Terminal.app reastart will be required (no big deal).

Not a priority for me right now.

darwin avatar Sep 09 '11 16:09 darwin

Is this going to make it in to the software soon?

EricWVGG avatar Sep 18 '11 17:09 EricWVGG

@EricWVGG: probably not, I'm pretty stuck, I'm going to do some traveling and spend rest of my time working on Asepsis and TotalFinder support

if you really think this is an important issue you may consider adding it in your fork, I would merge it

darwin avatar Sep 18 '11 19:09 darwin

As an aside, I noticed some other odd behavior w.r.t. full screen apps and TT.

  • Open Itunes in fullscreen mode
  • Manually add another desktop in Spaces
    • Should look like: [Dashboard, Desktop 1, Desktop 2, iTunes]
  • Switch to iTunes
  • Activate TT (wihch switches away from iTunes to show TT on Desktop 1)
  • Desktop order is now:
    • [Dashboard, Desktop 1, iTunes, Desktop 2]

It's weird (and possibly related). Just FYI.

riannucci avatar Dec 30 '11 19:12 riannucci

It would be awesome if we can get if LSUIElement is set to 1 in the window and if TotalTerminal was invoked from a Fullscreen application window, them reset the top margin to 0 instead the size of the top bar, so we will no longer have the gap between total terminal and screen top when invoking TotalTerminal from a Fullscreen app window.

A sure thing to think about when the time comes to implement LSUIElement as a preference :)

ygbr avatar Feb 23 '12 22:02 ygbr

Xscope appears to have found a way around this, which involves removing their app from the Dock. Dunno if you can gleam any hints from it:

http://support.iconfactory.com/kb/xscope/problems-measuring-apps-running-in-full-screen-mode-on-lion

EricWVGG avatar Mar 24 '12 21:03 EricWVGG

Great solution, thanks!

xster avatar Apr 24 '12 15:04 xster

Any updates on this ticket? Would be nice to have the ability to run TT above full-screen apps, especially for development. I personally run Emacs full screen but prefer TT for running code in the shell over running a shell within Emacs, and all the flicking about is starting to get a tad annoying.

OldhamMade avatar Apr 09 '13 13:04 OldhamMade

Any movement on this? TT on fullscreen apps would be sweet for people with small screen laptops always running vim.

glenbot avatar May 08 '13 00:05 glenbot

LSUIElement should be a temporary solution for 10.8

OS X 10.9 might have a better support for this (a rumor)

darwin avatar May 08 '13 00:05 darwin

Doesn't work in 10.9 and cannot found a solution for now =(

max-lobur avatar Oct 25 '13 13:10 max-lobur

Info.plist cannot be changed under Mavericks due to more strict security rules

See #3 for solution how to set LSUIElement dynamically with TotalTerminal 1.4.2

darwin avatar Oct 25 '13 13:10 darwin

Yep, It does the trick. Thanks a lot! For further readers the solution is:

  1. Make sure TT is not running
  2. Start default OS X terminal
  3. write: defaults write com.apple.Terminal TotalTerminalHideDockIcon -bool YES
  4. DONE

max-lobur avatar Oct 25 '13 14:10 max-lobur

Neither of these options worked for me, default terminal, TotalTerminal, or AppleScript. The window still reverts to the desktop when the visor opens and the dock icon is still there. You can still edit the Info.plist in Mavericks, but you still have to change ownership of the file and Contents folder. This worked fine for me on Mavericks even before the new updates. Even over fullscreen apps including Safari.

Edit. This worked before the new TT release. Since then it still doesn't work.

PeacefulChaos avatar Oct 25 '13 21:10 PeacefulChaos

@PeacefulChaos No, with default Mavericks settings, changing Info.plist of Terminal.app will break the code signature and system will refuse to launch it.

darwin avatar Oct 26 '13 12:10 darwin

Since 1.4.4, switching to LSUIElement will be available via TotalTerminal preferences option "Run Terminal.app as a background app"

darwin avatar Oct 26 '13 13:10 darwin

I edited the plist file once I updated to Mavericks with TT v1.4.1 and it still worked. The only side effect was there was no animation to the visor, but other than that, it worked fine. I'll be looking forward to the release of 1.4.4.

PeacefulChaos avatar Oct 26 '13 15:10 PeacefulChaos

Please try 1.4.4, it is already available on the beta channel: http://totalterminal.binaryage.com/#changelog

darwin avatar Oct 26 '13 15:10 darwin

1.4.4 does remove the Terminal Icon from the dock and App Switcher, however it's still not working over full screen apps. This time instead of switching to the default desktop, it doesn't do anything at all until I switch to the main screen myself and then input the keystroke to open the visor. Suggestions?

Edit: I reverted the Info.plist to the original code and reset permissions to root:wheel.

Another Edit: Looking at Safari's behavior, it seem that the window is activating but it seems that it's behind the fullscreen apps.

PeacefulChaos avatar Oct 26 '13 17:10 PeacefulChaos

Scratch my last. I did a reboot and now it works perfectly. Thanks!

PeacefulChaos avatar Oct 26 '13 18:10 PeacefulChaos