1

I'm running Lazarus Pascal (1.4.2, FPC 2.6.4) on a Intel Mac OS X (10.10) and would like my application window to be visible on all virtual desktops (Spaces). How can I achieve this?

I'm using the Carbon widget set, as the Cocoa widget set is still in early stages of development.

Note: I realize this question is very similar to this StackOverflow question, however that question is geared towards Objective-C. I have no clue how (in Carbon) to use the code suggestion. Mostly because it is Cocoa specific, but also because I have no idea how to link this behavior to my TForm - if that is even possible.

You can use method setCollectionBehavior: of NSWindow with the NSWindowCollectionBehaviorCanJoinAllSpaces bitwise flag.

Since I can apply the "All Desktop" option in Finder, when I have multiple virtual desktops/spaces, maybe there is an alternative to set this outside of the application? (i.e. something like using "defaults" in Terminal)

Community
  • 1
  • 1
Hanzaplastique
  • 564
  • 8
  • 13
  • I noticed that the settings for Spaces can be written to through "defaults", but Spaces does not seem to honor those changes. for example: defaults write com.apple.spaces app-bindings -dict-add you.app.id AllSpaces. If one does Killall Dock to restart Spaces then that does not make a change either. Using Osascript (http://stackoverflow.com/questions/2305491/applescript-opening-an-app-in-space-number-n) didn't work either. – Hanzaplastique Sep 16 '15 at 11:20
  • Why are you using Carbon? – Guilherme Rambo Sep 20 '15 at 02:04
  • Development for Lazarus Pascal concerning the Cocoa widgetset, is still in alpha stage, unlike the Carbon widgetset ... – Hanzaplastique Sep 20 '15 at 07:01

0 Answers0