help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: focusing a frame


From: Le Wang
Subject: Re: focusing a frame
Date: Sun, 02 Feb 2003 02:33:22 GMT
User-agent: KNode/0.7.1

Kenneth Vestergaard Schmidt wrote:

> Hello.
> 
> I've tried getting my Emacs to focus a frame when emacsclient is
> invoked. I've added this snippet to my .emacs:
> 
> (setq-default main-frame (selected-frame))
> (add-hook 'server-visit-hook '(lambda ()
> (if emacs-iconified (iconify-or-deiconify-frame))
> (raise-frame main-frame)
> (x-focus-frame main-frame)
> ))
> 
> This works in all cases, except when I iconify Emacs with C-z. If I
> invoke emacsclient, all I get is an:
> 
>        X protocol error: BadMatch (invalid parameter attributes) on
>        protocol request 42
> 
> and a *woosh* as Emacs dies.
> 
> What am I doing wrong?

Maybe you can try using `select-frame-set-input-focus' instead of 
`x-focus-frame'?

--
Le


reply via email to

[Prev in Thread] Current Thread [Next in Thread]