unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: raise frame no go
       [not found]   ` <uhcv61o2b.fsf@gnu.org>
@ 2007-01-06 12:32     ` Jan Djärv
  2007-01-07  3:47       ` Richard Stallman
                         ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jan Djärv @ 2007-01-06 12:32 UTC (permalink / raw)
  Cc: sdl.web, emacs-devel

Eli Zaretskii skrev:
>> Date: Thu, 04 Jan 2007 12:42:19 +0100
>> From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= <jan.h.d@swipnet.se>
>> Cc: emacs-pretest-bug@gnu.org
>>
>> Metacity (the default Gnome window manager)  is a complete mess when it comes 
>> to raise frame.  Some versions works, some don't.  Some require the code 
>> below, some don't.  In some configurations (i.e. focus on click vs. focus on 
>> mouse) raise frame works, in some raise frame don't work.
>>
>> We must give up on creating workarounds for Metacity, and just tell people 
>> that metacity is buggy.  Ufortunately they have to figure out a workaround for 
>> themselves and their specific verion/configuration of metacity.
> 
> How about writing an entry for etc/PROBLEMS about this?

In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
the recommendation from the Gnome people seems to be that we use
_NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
some version of Metacity hangs, it is no fault of Emacs and should be handeled
as a Metacity bug.

On the other hand, it is late in the game (pretest-wise) and maybe a note in
etc/PROBLEMS is good enough for the release.

Comments?

	Jan D.

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

* Re: raise frame no go
  2007-01-06 12:32     ` raise frame no go Jan Djärv
@ 2007-01-07  3:47       ` Richard Stallman
  2007-01-08  7:43         ` Jan Djärv
  2007-01-07 15:45       ` Stefan Monnier
  2007-09-23 11:35       ` Leo
  2 siblings, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2007-01-07  3:47 UTC (permalink / raw)
  Cc: eliz, sdl.web, emacs-devel

    In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
    the recommendation from the Gnome people seems to be that we use
    _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
    some version of Metacity hangs, it is no fault of Emacs and should be handeled
    as a Metacity bug.

    On the other hand, it is late in the game (pretest-wise) and maybe a note in
    etc/PROBLEMS is good enough for the release.

    Comments?

Could you make a note to install the code with a proper timestamp
after the release?

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

* Re: raise frame no go
  2007-01-06 12:32     ` raise frame no go Jan Djärv
  2007-01-07  3:47       ` Richard Stallman
@ 2007-01-07 15:45       ` Stefan Monnier
  2007-01-07 16:58         ` Mathias Dahl
  2007-01-08  7:45         ` Jan Djärv
  2007-09-23 11:35       ` Leo
  2 siblings, 2 replies; 17+ messages in thread
From: Stefan Monnier @ 2007-01-07 15:45 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel

>>> Metacity (the default Gnome window manager)  is a complete mess when it
>>> comes  to raise frame.  Some versions works, some don't.  Some require
>>> the code  below, some don't.  In some configurations (i.e. focus on
>>> click vs. focus on  mouse) raise frame works, in some raise frame
>>> don't work.
>>> 
>>> We must give up on creating workarounds for Metacity, and just tell
>>> people  that metacity is buggy.  Ufortunately they have to figure out
>>> a workaround for  themselves and their specific verion/configuration
>>> of metacity.
>> 
>> How about writing an entry for etc/PROBLEMS about this?

> In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
> the recommendation from the Gnome people seems to be that we use
> _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).

This recommendation is wrong, I believe.  It seems based on the idea that
`raise-frame' should change the focus, whereas that's not the purpose of
raise-frame.  If you look at the docstring, you'll see that raise-frame
should really not do anything more than call XRaiseWindow:

   Bring frame to the front, so it occludes any frames it overlaps.

I.e. the "raise" is only meant to make the frame more visible, not to give
it focus.

OTOH, it seems pretty clear to me now that we should un-obsolete focus-frame
and implement it with _NET_ACTIVE_WINDOW.

> If some version of Metacity hangs, it is no fault of Emacs and should be
> handeled as a Metacity bug.

Of course.  And if raise-frame makes the icon blink in the dock rather than
raising the frame, it's not a bug either: it's a Metacity (mis)feature.


        Stefan

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

* Re: raise frame no go
  2007-01-07 15:45       ` Stefan Monnier
@ 2007-01-07 16:58         ` Mathias Dahl
  2007-01-13 19:04           ` Mathias Dahl
  2007-01-08  7:45         ` Jan Djärv
  1 sibling, 1 reply; 17+ messages in thread
From: Mathias Dahl @ 2007-01-07 16:58 UTC (permalink / raw)
  Cc: Eli Zaretskii, Jan Djärv, sdl.web, emacs-devel

> Of course.  And if raise-frame makes the icon blink in the dock rather than
> raising the frame, it's not a bug either: it's a Metacity (mis)feature.

I just wanted to add to the discussion that Metacity indeed seems to
be buggy. Yesterday I downloaded and compiled a small program called
`xwit' that could "pop" a windo to front. Guess what, the same
behaviour as I get with `raise-frame' in Emacs.

A pity as I am reluctant to change my window manager in Gnome.

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

* Re: raise frame no go
  2007-01-07  3:47       ` Richard Stallman
@ 2007-01-08  7:43         ` Jan Djärv
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Djärv @ 2007-01-08  7:43 UTC (permalink / raw)
  Cc: eliz, sdl.web, emacs-devel



Richard Stallman skrev:
>     In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
>     the recommendation from the Gnome people seems to be that we use
>     _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
>     some version of Metacity hangs, it is no fault of Emacs and should be handeled
>     as a Metacity bug.
> 
>     On the other hand, it is late in the game (pretest-wise) and maybe a note in
>     etc/PROBLEMS is good enough for the release.
> 
>     Comments?
> 
> Could you make a note to install the code with a proper timestamp
> after the release?

Yes.

	Jan D.

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

* Re: raise frame no go
  2007-01-07 15:45       ` Stefan Monnier
  2007-01-07 16:58         ` Mathias Dahl
@ 2007-01-08  7:45         ` Jan Djärv
  2007-01-08 15:19           ` Stefan Monnier
  1 sibling, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2007-01-08  7:45 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel



Stefan Monnier skrev:

> 
> OTOH, it seems pretty clear to me now that we should un-obsolete focus-frame
> and implement it with _NET_ACTIVE_WINDOW.
> 

Agreed, but maybe we should rename focus-frame then, as _NET_ACTIVE_WINDOW 
does more that just focus (i.e. raises also)?

	Jan D.

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

* Re: raise frame no go
  2007-01-08  7:45         ` Jan Djärv
@ 2007-01-08 15:19           ` Stefan Monnier
  2007-01-08 17:40             ` Jan Djärv
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2007-01-08 15:19 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel

>> OTOH, it seems pretty clear to me now that we should un-obsolete focus-frame
>> and implement it with _NET_ACTIVE_WINDOW.

> Agreed, but maybe we should rename focus-frame then, as _NET_ACTIVE_WINDOW
> does more than just focus (i.e. raises also)?

Are you sure it necessarily does a raise also?  Isn't that up to the
window-manager?


        Stefan

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

* Re: raise frame no go
  2007-01-08 15:19           ` Stefan Monnier
@ 2007-01-08 17:40             ` Jan Djärv
  2007-01-08 23:34               ` Stefan Monnier
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2007-01-08 17:40 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel



Stefan Monnier skrev:
>>> OTOH, it seems pretty clear to me now that we should un-obsolete focus-frame
>>> and implement it with _NET_ACTIVE_WINDOW.
> 
>> Agreed, but maybe we should rename focus-frame then, as _NET_ACTIVE_WINDOW
>> does more than just focus (i.e. raises also)?
> 
> Are you sure it necessarily does a raise also?  Isn't that up to the
> window-manager?

The specification doesn't say, so you are right, it is up to the WM.  But all 
WM:s I've seen (KDE, Metacity and Xfwm4) also raises the window to the top.

	Jan D.

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

* Re: raise frame no go
  2007-01-08 17:40             ` Jan Djärv
@ 2007-01-08 23:34               ` Stefan Monnier
  2007-01-09  7:18                 ` Jan Djärv
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2007-01-08 23:34 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel

>>>> OTOH, it seems pretty clear to me now that we should un-obsolete
>>>> focus-frame and implement it with _NET_ACTIVE_WINDOW.
>> 
>>> Agreed, but maybe we should rename focus-frame then, as _NET_ACTIVE_WINDOW
>>> does more than just focus (i.e. raises also)?
>> 
>> Are you sure it necessarily does a raise also?  Isn't that up to the
>> window-manager?

> The specification doesn't say, so you are right, it is up to the WM.
> But all WM:s I've seen (KDE, Metacity and Xfwm4) also raises the window to
> the top.

Even when using "focus follows mouse"?


        Stefan

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

* Re: raise frame no go
  2007-01-08 23:34               ` Stefan Monnier
@ 2007-01-09  7:18                 ` Jan Djärv
  2007-01-10 21:47                   ` Miles Bader
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2007-01-09  7:18 UTC (permalink / raw)
  Cc: Eli Zaretskii, sdl.web, emacs-devel



Stefan Monnier skrev:
>>>>> OTOH, it seems pretty clear to me now that we should un-obsolete
>>>>> focus-frame and implement it with _NET_ACTIVE_WINDOW.
>>>> Agreed, but maybe we should rename focus-frame then, as _NET_ACTIVE_WINDOW
>>>> does more than just focus (i.e. raises also)?
>>> Are you sure it necessarily does a raise also?  Isn't that up to the
>>> window-manager?
> 
>> The specification doesn't say, so you are right, it is up to the WM.
>> But all WM:s I've seen (KDE, Metacity and Xfwm4) also raises the window to
>> the top.
> 
> Even when using "focus follows mouse"?

That is what I use.  However, I can get focused, unraised frames with 
metacity, so focus-frame is more logical.

	Jan D.

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

* Re: raise frame no go
  2007-01-09  7:18                 ` Jan Djärv
@ 2007-01-10 21:47                   ` Miles Bader
  2007-01-11  0:28                     ` Chris Moore
  2007-01-11  7:48                     ` Jan Djärv
  0 siblings, 2 replies; 17+ messages in thread
From: Miles Bader @ 2007-01-10 21:47 UTC (permalink / raw)
  Cc: Eli Zaretskii, emacs-devel, Stefan Monnier, sdl.web

Jan Djärv <jan.h.d@swipnet.se> writes:
>>> The specification doesn't say, so you are right, it is up to the WM.
>>> But all WM:s I've seen (KDE, Metacity and Xfwm4) also raises the
>>> window to the top.
>>
>> Even when using "focus follows mouse"?
>
> That is what I use.  However, I can get focused, unraised frames with
> metacity, so focus-frame is more logical.

I use metacity with f-f-m, and it doesn't raise frames if they get the
focus because of mouse-movement (though I admit metacity is generally
rather overly intrusive in it's actions).

-miles
-- 
Ich bin ein Virus. Mach' mit und kopiere mich in Deine .signature.

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

* Re: raise frame no go
  2007-01-10 21:47                   ` Miles Bader
@ 2007-01-11  0:28                     ` Chris Moore
  2007-01-11  7:48                     ` Jan Djärv
  1 sibling, 0 replies; 17+ messages in thread
From: Chris Moore @ 2007-01-11  0:28 UTC (permalink / raw)
  Cc: sdl.web, Eli Zaretskii, Jan Djärv, Stefan Monnier,
	emacs-devel

Miles Bader <miles@gnu.org> writes:

> I use metacity with f-f-m, and it doesn't raise frames if they get the
> focus because of mouse-movement

It's a user option whether to raise the frames or not.

In Debian it's under:

  Desktop >
   Preferences >
    Windows >
     Window Selection >
      [x] Select windows when the mouse moves over them >
       [x] Raise selected windows after an interval

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

* Re: raise frame no go
  2007-01-10 21:47                   ` Miles Bader
  2007-01-11  0:28                     ` Chris Moore
@ 2007-01-11  7:48                     ` Jan Djärv
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Djärv @ 2007-01-11  7:48 UTC (permalink / raw)
  Cc: sdl.web, Eli Zaretskii, Stefan Monnier, emacs-devel



Miles Bader skrev:
> Jan Djärv <jan.h.d@swipnet.se> writes:
>>>> The specification doesn't say, so you are right, it is up to the WM.
>>>> But all WM:s I've seen (KDE, Metacity and Xfwm4) also raises the
>>>> window to the top.
>>> Even when using "focus follows mouse"?
>> That is what I use.  However, I can get focused, unraised frames with
>> metacity, so focus-frame is more logical.
> 
> I use metacity with f-f-m, and it doesn't raise frames if they get the
> focus because of mouse-movement (though I admit metacity is generally
> rather overly intrusive in it's actions).

There is an auto_raise config option you can set with gconf-editor.  It is off 
by default.

	Jan D.

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

* Re: raise frame no go
  2007-01-07 16:58         ` Mathias Dahl
@ 2007-01-13 19:04           ` Mathias Dahl
  0 siblings, 0 replies; 17+ messages in thread
From: Mathias Dahl @ 2007-01-13 19:04 UTC (permalink / raw)


"Mathias Dahl" <mathias.dahl@gmail.com> writes:

> I just wanted to add to the discussion that Metacity indeed seems to
> be buggy. Yesterday I downloaded and compiled a small program called
> `xwit' that could "pop" a windo to front. Guess what, the same
> behaviour as I get with `raise-frame' in Emacs.
>
> A pity as I am reluctant to change my window manager in Gnome.

I have now found a work around to my problem. I am building a kind of
command launcher (something similar to this:
http://pyqe.sourceforge.net/) in Emacs and my problem was that I could
not get Emacs to bring the frame where I ask the user for input to the
top. 

To solve my problem I downloaded and compiled a small program called
"devilspie" (http://www.burtonini.com/blog/computers/devilspie). This
tool lies in the background and "listens" for windows that opens, and
in my case I configured it to execute the "focus" action whenever a
certain window created from Emacs opens (my little command launcher
creates a frame with a special name).

Of course, if Metacity and Emacs would play along more nicely I would
not need this extra hack, but as it solves my problem it is no longer
really a problem for me. At least not right now.

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

* Re: raise frame no go
  2007-01-06 12:32     ` raise frame no go Jan Djärv
  2007-01-07  3:47       ` Richard Stallman
  2007-01-07 15:45       ` Stefan Monnier
@ 2007-09-23 11:35       ` Leo
  2007-09-24  5:53         ` Jan Djärv
  2 siblings, 1 reply; 17+ messages in thread
From: Leo @ 2007-09-23 11:35 UTC (permalink / raw)
  To: emacs-devel

On 2007-01-06 12:32 +0000, Jan Djärv wrote:
> Eli Zaretskii skrev:
>>> Date: Thu, 04 Jan 2007 12:42:19 +0100
>>> From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= <jan.h.d@swipnet.se>
>>> Cc: emacs-pretest-bug@gnu.org
>
>>>
>>> Metacity (the default Gnome window manager)  is a complete mess when it comes 
>>> to raise frame.  Some versions works, some don't.  Some require the code 
>>> below, some don't.  In some configurations (i.e. focus on click vs. focus on 
>>> mouse) raise frame works, in some raise frame don't work.
>>>
>>> We must give up on creating workarounds for Metacity, and just tell people 
>>> that metacity is buggy.  Ufortunately they have to figure out a workaround for 
>>> themselves and their specific verion/configuration of metacity.
>> 
>> How about writing an entry for etc/PROBLEMS about this?
>
> In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
> the recommendation from the Gnome people seems to be that we use
> _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
> some version of Metacity hangs, it is no fault of Emacs and should be handeled
> as a Metacity bug.
>
> On the other hand, it is late in the game (pretest-wise) and maybe a note in
> etc/PROBLEMS is good enough for the release.
>
> Comments?
>
> 	Jan D.

Has this been fixed?

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

                                                 I use GNU Emacs  <=
                              http://www.gnu.org/software/emacs/  <=

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

* Re: raise frame no go
  2007-09-23 11:35       ` Leo
@ 2007-09-24  5:53         ` Jan Djärv
  2007-09-24  8:40           ` Leo
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Djärv @ 2007-09-24  5:53 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel



Leo skrev:
> On 2007-01-06 12:32 +0000, Jan Djärv wrote:
>> Eli Zaretskii skrev:
>>>> Date: Thu, 04 Jan 2007 12:42:19 +0100
>>>> From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= <jan.h.d@swipnet.se>
>>>> Cc: emacs-pretest-bug@gnu.org
>>>> Metacity (the default Gnome window manager)  is a complete mess when it comes 
>>>> to raise frame.  Some versions works, some don't.  Some require the code 
>>>> below, some don't.  In some configurations (i.e. focus on click vs. focus on 
>>>> mouse) raise frame works, in some raise frame don't work.
>>>>
>>>> We must give up on creating workarounds for Metacity, and just tell people 
>>>> that metacity is buggy.  Ufortunately they have to figure out a workaround for 
>>>> themselves and their specific verion/configuration of metacity.
>>> How about writing an entry for etc/PROBLEMS about this?
>> In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
>> the recommendation from the Gnome people seems to be that we use
>> _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
>> some version of Metacity hangs, it is no fault of Emacs and should be handeled
>> as a Metacity bug.
>>
>> On the other hand, it is late in the game (pretest-wise) and maybe a note in
>> etc/PROBLEMS is good enough for the release.
>>
>> Comments?
>>
>> 	Jan D.
> 
> Has this been fixed?
> 

raise-frame does not do _NET_ACTIVE_WINDOW, but x-focus-frame does.  It would 
be trivial to add, but the latest discussion indicated that people didn't want 
that.  I.e. raise-frame should just do that, raise.  Focus should stay where 
it was.  But for metacity, there is no way to do that.

	Jan D.

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

* Re: raise frame no go
  2007-09-24  5:53         ` Jan Djärv
@ 2007-09-24  8:40           ` Leo
  0 siblings, 0 replies; 17+ messages in thread
From: Leo @ 2007-09-24  8:40 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-24 06:53 +0100, Jan Djärv wrote:
>>>> How about writing an entry for etc/PROBLEMS about this?
>>> In the bug created by Leo, http://bugzilla.gnome.org/show_bug.cgi?id=392889,
>>> the recommendation from the Gnome people seems to be that we use
>>> _NET_ACTIVE_WINDOW but with a proper timestamp (this was wrong in Emacs).  If
>>> some version of Metacity hangs, it is no fault of Emacs and should be handeled
>>> as a Metacity bug.
>>>
>>> On the other hand, it is late in the game (pretest-wise) and maybe a note in
>>> etc/PROBLEMS is good enough for the release.
>>>
>>> Comments?
>>>
>>> 	Jan D.
>>
>> Has this been fixed?
>>
>
> raise-frame does not do _NET_ACTIVE_WINDOW, but x-focus-frame does.
> It would be trivial to add, but the latest discussion indicated that
> people didn't want that.  I.e. raise-frame should just do that,
> raise.  Focus should stay where it was.  But for metacity, there is
> no way to do that.
>
> 	Jan D.

I will just forget  this bug. Thanks, Jan.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

                                                 I use GNU Emacs  <=
                              http://www.gnu.org/software/emacs/  <=

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

end of thread, other threads:[~2007-09-24  8:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m2ac0z5q7a.fsf@sl392.st-edmunds.cam.ac.uk>
     [not found] ` <459CE81B.2090201@swipnet.se>
     [not found]   ` <uhcv61o2b.fsf@gnu.org>
2007-01-06 12:32     ` raise frame no go Jan Djärv
2007-01-07  3:47       ` Richard Stallman
2007-01-08  7:43         ` Jan Djärv
2007-01-07 15:45       ` Stefan Monnier
2007-01-07 16:58         ` Mathias Dahl
2007-01-13 19:04           ` Mathias Dahl
2007-01-08  7:45         ` Jan Djärv
2007-01-08 15:19           ` Stefan Monnier
2007-01-08 17:40             ` Jan Djärv
2007-01-08 23:34               ` Stefan Monnier
2007-01-09  7:18                 ` Jan Djärv
2007-01-10 21:47                   ` Miles Bader
2007-01-11  0:28                     ` Chris Moore
2007-01-11  7:48                     ` Jan Djärv
2007-09-23 11:35       ` Leo
2007-09-24  5:53         ` Jan Djärv
2007-09-24  8:40           ` Leo

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