This has come up before.

The issue is http://xquartz.macosforge.org/trac/ticket/58, and there's a radar 
filed for the issue that is pretty much just as old.

Note that XQuartz has no say in giving up focus.  Something else is stealing 
focus from us.  I presume since it is just XQuartz that is seeing this issue 
that there must be *something* I could do put XQuartz in a mode that would 
prevent this focus loss, but I'm at a loss to know what that is because I have 
no idea why the focus is being allowed to be stolen in the first place.

In any event, you can run the attached script (which Ken Thomases provided to 
the list a couple years ago) to find out what is stealing the focus and 
possibly stop it from periodically doing so (by disabling it, deleting it, etc):

#!/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()
ob = MyObserver.new()
nc.addObserver_selector_name_object_(ob, "appActivated:", NSWorkspaceDidActivateApplicationNotification, ws)
NSRunLoop.currentRunLoop().run()

Hope that helps.


--Jeremy


> On Mar 21, 2015, at 08:41, Ben Hyde <bh...@pobox.com> wrote:
> 
> A forced upgrade means I have a new 2015 MacBook Pro, Yosemite, and XQuartz 
> 2.7.8_beta3 (xorg-server 1.16.4) freshly installed over/under a restore from 
> via Time Machine.  Previously I was running 10.6.8 :).
> 
> So.  If I pop up an new Xterm and start typing in many cases a few characters 
> in the typing cursor will transition from solid block to rectangle.  
> Naturally this means my input is lost.  A few seconds later it will 
> transition back again.  At that point I can continue typing.
> 
> Sometimes when the keyboard focus departs I get a beach ball.  Sometimes when 
> it departs it never returns, but if I click in the terminal I can restore it.
> 
> I can occationally get this to happen without typing.  I just open the xterm 
> and start and the black keyboard cursor and after it bit it disappears, 
> optionally I see the beachball, and optionally it comes back after a bit.
> 
> This behavior occurs dependably and repeatedly if I have work to do.  I 
> occurs less reliably if I’m trying to reproduce the behavior or record it in 
> a screen capture.  But even if I do record it it’s boring because all you see 
> is the cursor changing.
> 
> Is anybody else suffering this affliction?   Or would anybody like to suggest 
> a treatment of big stick I might hit it with?
> 
>  - ben
> 
> ps. Emacs is hell when you have this issue!
> 
> _______________________________________________
> Xquartz-dev mailing list
> Xquartz-dev@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/xquartz-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Xquartz-dev mailing list
Xquartz-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/xquartz-dev

Reply via email to