unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* auto-raise-mode and auto-lower-mode
@ 2011-11-27  7:17 Chong Yidong
  2011-11-27 10:59 ` martin rudalics
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chong Yidong @ 2011-11-27  7:17 UTC (permalink / raw)
  To: emacs-devel

AFAICT, these don't work on modern window managers, right?  I'm going to
remove them from the Emacs manual.  Any opinion about marking them as
obsolete?



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

* Re: auto-raise-mode and auto-lower-mode
  2011-11-27  7:17 auto-raise-mode and auto-lower-mode Chong Yidong
@ 2011-11-27 10:59 ` martin rudalics
  2011-11-27 11:03 ` Štěpán Němec
  2011-11-28 16:10 ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2011-11-27 10:59 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

 > AFAICT, these don't work on modern window managers, right?  I'm going to
 > remove them from the Emacs manual.  Any opinion about marking them as
 > obsolete?

What about `minibuffer-auto-raise'?

martin



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

* Re: auto-raise-mode and auto-lower-mode
  2011-11-27  7:17 auto-raise-mode and auto-lower-mode Chong Yidong
  2011-11-27 10:59 ` martin rudalics
@ 2011-11-27 11:03 ` Štěpán Němec
  2011-11-28 16:10 ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: Štěpán Němec @ 2011-11-27 11:03 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

On Sun, 27 Nov 2011 08:17:55 +0100
Chong Yidong wrote:

> AFAICT, these don't work on modern window managers, right?  I'm going to
> remove them from the Emacs manual.  Any opinion about marking them as
> obsolete?

How is `auto-raise-mode' different from `raise-frame'? IOW, if you want
to obsolete the former, you might just as well obsolete the latter.

In any case, I thought `raise-frame' was supposed to work on Windows at
least, maybe also OS X and some other environments I don't use.

When `raise-frame' fails but the WM supports EWMH, the following has
worked for me:

(defadvice raise-frame (around wmctrl activate)
  (if (eq (window-system (ad-get-arg 0)) 'x)
      (x-send-client-message nil 0 (ad-get-arg 0)
                             "_NET_ACTIVE_WINDOW" 32 '(1))
    ad-do-it))

So ISTM fixing `raise-frame' would be a more appropriate solution.

-- 
Štěpán



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

* Re: auto-raise-mode and auto-lower-mode
  2011-11-27  7:17 auto-raise-mode and auto-lower-mode Chong Yidong
  2011-11-27 10:59 ` martin rudalics
  2011-11-27 11:03 ` Štěpán Němec
@ 2011-11-28 16:10 ` Stefan Monnier
  2011-11-29  5:48   ` Chong Yidong
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2011-11-28 16:10 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

> AFAICT, these don't work on modern window managers, right?

Really?

> I'm going to remove them from the Emacs manual.  Any opinion about
> marking them as obsolete?

I'd be happy to remove the C code that implements those features, but
I'd be even happier to replace it with Elisp code implementing that same
feature (especially if the Elisp code can be changed to do other
things: I've always wanted to try and make my minibuffer-only frame to
"auto-slide" like some panels do; on those tiny 1024x600 netbook
screens, vertical space has really high value).


        Stefan



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

* Re: auto-raise-mode and auto-lower-mode
  2011-11-28 16:10 ` Stefan Monnier
@ 2011-11-29  5:48   ` Chong Yidong
  2011-11-29  8:14     ` Stephen J. Turnbull
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2011-11-29  5:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> AFAICT, these don't work on modern window managers, right?
>
> Really?

After further testing, auto-raise-mode does work, but only if you enable
focus follows mouse _and_ disable auto raising in the window manager.
(There's no chance of making it work for focus follows click, because
the auto_raise frame parameter is only used from x_new_focus_frame.)
I'll update the docstring to make this clearer.

As for auto-lower-mode, it seems to interact badly with Metacity,
leaving the window permanently unraisable.  I have no idea what's going
on there.



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

* Re: auto-raise-mode and auto-lower-mode
  2011-11-29  5:48   ` Chong Yidong
@ 2011-11-29  8:14     ` Stephen J. Turnbull
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen J. Turnbull @ 2011-11-29  8:14 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Stefan Monnier, emacs-devel

Chong Yidong writes:

 > As for auto-lower-mode, it seems to interact badly with Metacity,
 > leaving the window permanently unraisable.  I have no idea what's going
 > on there.

Metacity makes its own rules, or at the very least, assumes that
applications will conform to a very narrow interpretation of the
ICCCM.  In particular, it expects that applications will remember a
lot of things about window management state that the ICCCM allows the
window manager to enforce, and it ends up negotiating and even
executing *program* requests despite the fact that Metacity should
know that the *user* wants something else.  Maybe this is related.
Specifically, even though you may not be able to raise the window
using Metacity, perhaps it is possible to forcibly raise it from
elisp?

Since it's the standard WM in GNOME, I guess you have to cater
to it.

Does it matter whether the build is GTK-based or other-toolkit-based?





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

end of thread, other threads:[~2011-11-29  8:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27  7:17 auto-raise-mode and auto-lower-mode Chong Yidong
2011-11-27 10:59 ` martin rudalics
2011-11-27 11:03 ` Štěpán Němec
2011-11-28 16:10 ` Stefan Monnier
2011-11-29  5:48   ` Chong Yidong
2011-11-29  8:14     ` Stephen J. Turnbull

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).