unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Steven Edwards <cureadvocate@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16761@debbugs.gnu.org
Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal
Date: Sat, 15 Feb 2014 12:04:52 -0500	[thread overview]
Message-ID: <CAA3vWKCzs2SouzbePDBPFRD6gOxQdTgY1P0ftxdT2aWOke-5tg@mail.gmail.com> (raw)
In-Reply-To: <83eh34bg7v.fsf@gnu.org>

> You don't say what you expect to happen.  Do you expect a focus-in and
> focus-out event to be generated for terminal frames?  Or do you expect
> (or need) something else?

I need a focus-in event to occur when switching to a terminal frame;
the code I provided was simply to demonstrate and focus on the error.

The real code:

---
(defun rand/swap-theme (from to)
  (disable-theme from)
  (enable-theme to))

(defun rand/choose-theme ()
  (cond
    ((memq window-system '(x w32 ns)) (rand/swap-theme 'Custom 'assemblage))
    (t (rand/swap-theme 'assemblage 'Custom))))

(add-hook 'focus-in-hook 'rand/choose-theme)
---

The goal is to switch to a terminal-friendly theme when I'm in tmux
and a GUI friendly theme when I'm in a graphical environment.  The
problem seems to be that the hooks in focus-in-hooks aren't being
executed when I switch to a terminal frame.

Best,

Steven





  reply	other threads:[~2014-02-15 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 12:14 bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Steven Edwards
2014-02-15 14:31 ` Eli Zaretskii
2014-02-15 17:04   ` Steven Edwards [this message]
2014-02-15 17:14     ` Eli Zaretskii
2014-02-15 17:23       ` Steven Edwards
2014-02-15 20:39         ` Eli Zaretskii
2021-12-04  3:27 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA3vWKCzs2SouzbePDBPFRD6gOxQdTgY1P0ftxdT2aWOke-5tg@mail.gmail.com \
    --to=cureadvocate@gmail.com \
    --cc=16761@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).