Hi x11,
On Apr 9, 2014, 2:00 PM, email@hidden wrote:
Send X11-users mailing list submissions to email@hidden
To subscribe or unsubscribe via the World Wide Web, visit https://lists.apple.com/mailman/listinfo/x11-users or, via email, send a message with subject or body 'help' to email@hidden
You can reach the person managing the list at email@hidden
When replying, please edit your Subject line so it is more specific than "Re: Contents of X11-users digest..."
Today's Topics:
1. others,watch_activations.py not working. (Lars-Johan Liman) 2. Re: watch_activations.py not working. (Lars-Johan Liman)
----------------------------------------------------------------------
Message: 1 Date: Wed, 09 Apr 2014 12:07:15 +0200 From: Lars-Johan Liman <email@hidden> To: email@hidden Subject: others,watch_activations.py not working. Message-ID: <email@hidden> Content-Type: text/plain
Jeremy, all,
I'm one of those who, from time to time, suffers from "loss of focus" issues, where other applications steal focus, and my full-screen X11 windows disappears under my fingers for various lengths of time.
I had problems half a year ago. You brilliant hack "watch_activations.py" did wonders for me, problem solved. I was using the code found here:
http://lists.apple.com/archives/x11-users/2013/Jan/msg00005.html
Now it's happening again, but now being "an OS-update later" (or something) it has stopped working. The update was probably 10.6.7 to 10.6.8.
% python bin/watch_activations.py Traceback (most recent call last): File "bin/watch_activations.py", line 19, in <module> nc.addObserver_selector_name_object_(ob, "appActivated:", NSWorkspaceDidActivateApplicationNotification, ws) NameError: name 'NSWorkspaceDidActivateApplicationNotification' is not defined %
I've traced this to
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/AppKit/PyObjC.bridgesupport
(longest file name contest winner? ;-).
I have a Mac which I haven't updated recently*, where that name is defined in the file above. On my more recently updated desktop, the name has vanished from that file (as one of _many_ changes, it seems). It's the same version of Python Framework (2.6), but the contents of the files are different.
Is there any way to get this hack back to working condition under Mac OS X 10.6.8?
I'm not a python hacker, but I have general hacking experience of the form that one generally acquires after 25 years of administrating everything from Unix V6 via BSD/OS to Debian. ;-)
Best regards, /Liman
* In honesty, this Mac runs an old version of 10.7, but "old 10.7" has the name defined, whereas "new 10.6" doesn't, so I take it that the change arrived with my upgrade from 10.6.7 to 10.6.8. #---------------------------------------------------------------------- # Lars-Johan Liman, M.Sc. ! E-mail: email@hidden # Senior Systems Specialist ! Tel: +46 8 - 562 860 12 # Netnod Internet Exchange, Stockholm ! http://www.netnod.se/ #----------------------------------------------------------------------
------------------------------
Message: 2 Date: Wed, 09 Apr 2014 15:53:04 +0200 From: Lars-Johan Liman <email@hidden> To: email@hidden Subject: Re: watch_activations.py not working. Message-ID: <email@hidden> Content-Type: text/plain
email@hidden: > Jeremy, all,
> ... > Your brilliant hack "watch_activations.py" did wonders for me, problem > solved. > ...
> % python bin/watch_activations.py > Traceback (most recent call last): > File "bin/watch_activations.py", line 19, in <module> > nc.addObserver_selector_name_object_(ob, "appActivated:", NSWorkspaceDidActivateApplicationNotification, ws) > NameError: name 'NSWorkspaceDidActivateApplicationNotification' is not defined > %
> I've traced this to
> /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/AppKit/PyObjC.bridgesupport > ... > Is there any way to get this hack back to working condition under Mac OS > X 10.6.8?
Well, there is a way that $works for a really bad value of $works, which is to edit the file and add the name back in. The binary support seems to still be there. It does indeed work. But editing system files that deep into the structure is not my favourite pastime, and I don't really know what side effects I may have caused, so I'm still looking for The Right Way(TM).
In case anyone is even more panicked than I am, here's a patch for
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/AppKit/PyObjC.bridgesupport
Don't do this lightly. You're meddling with system files and it's likely to be overwritten next upgrade.
And yes, I'll supply brown bags ... :-P
If I could just figure out _why_ it was removed and the entire bridgesupport revamped ... sigh.
Cheers, /Liman
--- PyObjC.bridgesupport.DIST 2010-12-03 23:44:49.000000000 +0100 +++ PyObjC.bridgesupport 2014-04-09 15:45:38.000000000 +0200 @@ -867,6 +867,8 @@ <constant name='NSWorkspaceDecompressOperation' type='@' /> <constant name='NSWorkspaceDecryptOperation' type='@' /> <constant name='NSWorkspaceDestroyOperation' type='@' /> + <constant name='NSWorkspaceDidActivateApplicationNotification' type='@' /> + <constant name='NSWorkspaceDidDeactivateApplicationNotification' type='@' /> <constant name='NSWorkspaceDidLaunchApplicationNotification' type='@' /> <constant name='NSWorkspaceDidMountNotification' type='@' /> <constant name='NSWorkspaceDidPerformFileOperationNotification' type='@' />
------------------------------
_______________________________________________ X11-users mailing list email@hidden https://lists.apple.com/mailman/listinfo/x11-users
End of X11-users Digest, Vol 11, Issue 21 *****************************************
|