others,watch_activations.py not working.
others,watch_activations.py not working.
- Subject: others,watch_activations.py not working.
- From: Lars-Johan Liman <email@hidden>
- Date: Wed, 09 Apr 2014 12:07:15 +0200
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/
#----------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden