all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* focusing a frame
@ 2003-01-30 18:26 Kenneth Vestergaard Schmidt
  2003-02-01 11:03 ` Kenneth Vestergaard Schmidt
  2003-02-02  2:33 ` Unknown
  0 siblings, 2 replies; 4+ messages in thread
From: Kenneth Vestergaard Schmidt @ 2003-01-30 18:26 UTC (permalink / raw)


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? I tried using (other-frame 0) instead of
(x-focus-frame main-frame), but that made no difference. Commenting
that line out entirely also prevents the crashes, but also prevents
Emacs from gaining focus, which is what I really would like.

For the record, I'm using Emacs 21.2 on a Debian GNU/Linux (unstable)
system.

-- 
Best Regards

Kenneth Vestergaard Schmidt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-02  5:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30 18:26 focusing a frame Kenneth Vestergaard Schmidt
2003-02-01 11:03 ` Kenneth Vestergaard Schmidt
2003-02-02  5:46   ` Eli Zaretskii
2003-02-02  2:33 ` Unknown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.