Re: focus loss issue
Re: focus loss issue
- Subject: Re: focus loss issue
- From: Ken Thomases <email@hidden>
- Date: Fri, 14 Dec 2012 20:23:30 -0600
On Dec 14, 2012, at 1:40 PM, Brian Landy wrote:
> Oh well, if there's anything I can do to try to track down the issue I would love to help. I see the issue all the time, and have for years (on 10.8/7/6, probably 10.5, before that my memory of X11 releases is very vague). I am generally am only running urxvt sessions so my X11 setup is pretty simple.
The attached Python script runs until you terminate it and logs application activations. Save it to disk and run it with a command like:
python path/to/watch_activations.py
To stop it, type Control-C in the terminal window and then, due to a peculiarity of Python, do one more app switch.
If you keep this running, hopefully it will tell you what is stealing focus from XQuartz.
Cheers,
Ken
#!/usr/bin/python
import signal
import sys
def signal_handler(signal, frame):
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGQUIT, signal_handler)
from AppKit import *
class MyObserver(NSObject):
def appActivated_(self, notification):
app = notification.userInfo()["NSWorkspaceApplicationKey"]
NSLog(u"activated %@ (%@)", app.localizedName(), app.bundleIdentifier())
ws = NSWorkspace.sharedWorkspace()
nc = ws.notificationCenter()
nc.addObserver_selector_name_object_(MyObserver.new(), "appActivated:", "NSWorkspaceDidActivateApplicationNotification", ws)
NSRunLoop.currentRunLoop().run()
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden