dullangle / simbl

Automatically exported from code.google.com/p/simbl
0 stars 0 forks source link

SIMBL not loading into LSUI apps #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch a given app that normally has a menubar and appears in Dock. Verify 
SIMBL loads 
correctly.
2. Change app's info.plist file to add LSUIElement with BOOL of YES
3. Relaunch app. SIMBL no longer loads.

What is the expected output? What do you see instead?
I suspect that the Aqua context restriction in the SIMBL launchagent is the 
culprit here. There are 
many apps that run without a normal GUI but that would benefit from SIMBL 
injection. I noticed this 
because when running my bundle as an InputManager for 32-bit apps on Snow 
Leopard, it loads in 
LSUI Element apps (e.g., Edgies, Quicksilver, Sticky Notes...), but when they 
load my bundle through 
SIMBL, it no longer loads. 

What version of the product are you using? On what operating system?
I'm using latest SIMBL 0.9.7a on Snow Leopard (10.6.2)

Please provide any additional information below.
My bundle supports 64-bit and 32-bit apps under SIMBL, as well as both GC and 
non-GC-supported 
apps.

Original issue reported on code.google.com by llsco...@gmail.com on 8 Jan 2010 at 6:58

GoogleCodeExporter commented 8 years ago
I believe NSWorkspaceDidLaunchApplicationNotification (which SIMBL uses to 
detect
application launches) is not posted by the system for agent applications.  Nor 
does
NSWorkspace's launchedApplications list agents.

Original comment by daniel.p...@gmail.com on 9 Jan 2010 at 8:29

GoogleCodeExporter commented 8 years ago
Yes, the previous comment is correct.

Original comment by ms...@gmail.com on 15 Jan 2010 at 8:01

GoogleCodeExporter commented 8 years ago
Yes, you're right. There doesn't seem to be a notification from agents, through 
the shared workspace, when they 
launch. (Oddly, they do send out their own NSApplicationDidFinishLaunching 
notices... ) Nevertheless, I see that 
LSUI apps are included in the NSRunningApplications array that's part of 10.6 
and, I think, accessible from 
NSWorkspace. Perhaps that could be useful, even if after the fact. I suppose 
you could observe changes in that 
array and then inject SIMBL... ?

Original comment by llsco...@gmail.com on 15 Jan 2010 at 8:13

GoogleCodeExporter commented 8 years ago
It's a question of efficiency. The SIMBLAgent is 100% dormant until an 
application launches. It won't trigger any 
sort of resource consumption until an actual launch event and I like that level 
of efficiency.

Now, there is nothing preventing you from manually scanning that list and 
calling the inject routine.  However,  
you would need to keep some state about what processes had been injected and 
which were now dead. In my 
mind, that added complexity didn't seem to pay off in the average case.

Original comment by ms...@gmail.com on 15 Jan 2010 at 9:37

GoogleCodeExporter commented 8 years ago
Understood. One of the things my app does is enable RTF editing in textareas 
that support it but that don't 
include actions for it (things like adding tables, using the ruler with bullet 
lists/styles, add/editing hyperlinks, 
etc.) There are a lot of apps that offer the option of running without a 
menubar/dock item, and many such 
apps are designed for taking notes, which often benefit from some text 
formatting.

So I may develop some extension that would inject SIMBL into running apps that 
didn't announce their launch 
but that have been supported in the past via the (heaven forbid!) InputManager 
API.

Cheers,
Leland

Original comment by llsco...@gmail.com on 15 Jan 2010 at 10:01

GoogleCodeExporter commented 8 years ago
Let me know what you end up doing. I'm not entire opposed to patching something 
into SIMBL, but I think 
people should know that they are doing something that will be promoting more 
background activity.

Original comment by ms...@gmail.com on 15 Jan 2010 at 10:04