unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Does Emacs wm-window handling misbehave?
@ 2008-03-24 13:37 Mathias Dahl
  2008-03-27  6:58 ` Mathias Dahl
  2008-03-27  7:02 ` Jan Djärv
  0 siblings, 2 replies; 9+ messages in thread
From: Mathias Dahl @ 2008-03-24 13:37 UTC (permalink / raw)
  To: emacs-devel

Lately I am having problems switching windows (window manager windows)
using Alt+Tab. Like exactly right now when I type this in Emacs I try
to switch window and it does not work. I can see the frame of other
windows being marked/outlined and in the task bar the name of the
window I am trying to switch to becomes bold. I have to use the mouse
to switch instead, very annoying.

Until today I have thought this being a glitch in Metacity but by
chance I stumbled upon the following messages in my .xsession-errors
file today:

    Window manager warning: last_focus_time (5775062) is greater than
    comparison timestamp (3763886959).  This most likely represents a
    buggy client sending inaccurate timestamps in messages such as
    _NET_ACTIVE_WINDOW.  Trying to work around...

    Window manager warning: last_user_time (5775062) is greater than
    comparison timestamp (3763886959).  This most likely represents a
    buggy client sending inaccurate timestamps in messages such as
    _NET_ACTIVE_WINDOW.  Trying to work around...

    Window manager warning: 0x3c000a4 (.emacs) appears to be one of the
    offending windows with a timestamp of 5775062.  Working around...

It suddenly occurred to me that I only experience the switching
problem in Emacs and here is a reference to one of my Emacs
windows. Could it be a coincidence or is Emacs doing anything bad? I
don't want to report this as a bug just yet. Does anyone else have similar
experiences? I cannot say when it happens, it suddenly does. When I have
switched using the mouse it works again, for a while...

Some information:

In GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.12.0)
 of 2008-03-13 on klibb
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--with-x-toolkit=gtk' '--with-gif=no'
'--with-dbus''

Ubuntu GNU/Linux 7.10 with latest patches.

/Mathias




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-24 13:37 Does Emacs wm-window handling misbehave? Mathias Dahl
@ 2008-03-27  6:58 ` Mathias Dahl
  2008-03-27  7:04   ` Jan Djärv
  2008-03-27  7:02 ` Jan Djärv
  1 sibling, 1 reply; 9+ messages in thread
From: Mathias Dahl @ 2008-03-27  6:58 UTC (permalink / raw)
  To: emacs-devel

> Lately I am having problems switching windows (window manager windows)
>  using Alt+Tab. Like exactly right now when I type this in Emacs I try
>  to switch window and it does not work. I can see the frame of other
>  windows being marked/outlined and in the task bar the name of the
>  window I am trying to switch to becomes bold. I have to use the mouse
>  to switch instead, very annoying.

I see no comments on this, maybe I am the only one running Ubuntu
together with CVS Emacs. Would maybe gnu emacs help or the pretest bug
list be a better place for my question?




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-24 13:37 Does Emacs wm-window handling misbehave? Mathias Dahl
  2008-03-27  6:58 ` Mathias Dahl
@ 2008-03-27  7:02 ` Jan Djärv
  2008-03-27  9:53   ` Mathias Dahl
  1 sibling, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2008-03-27  7:02 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: emacs-devel



Mathias Dahl skrev:
> Lately I am having problems switching windows (window manager windows)
> using Alt+Tab. Like exactly right now when I type this in Emacs I try
> to switch window and it does not work. I can see the frame of other
> windows being marked/outlined and in the task bar the name of the
> window I am trying to switch to becomes bold. I have to use the mouse
> to switch instead, very annoying.
> 
> Until today I have thought this being a glitch in Metacity but by
> chance I stumbled upon the following messages in my .xsession-errors
> file today:
> 
>     Window manager warning: last_focus_time (5775062) is greater than
>     comparison timestamp (3763886959).  This most likely represents a
>     buggy client sending inaccurate timestamps in messages such as
>     _NET_ACTIVE_WINDOW.  Trying to work around...
> 
>     Window manager warning: last_user_time (5775062) is greater than
>     comparison timestamp (3763886959).  This most likely represents a
>     buggy client sending inaccurate timestamps in messages such as
>     _NET_ACTIVE_WINDOW.  Trying to work around...
> 
>     Window manager warning: 0x3c000a4 (.emacs) appears to be one of the
>     offending windows with a timestamp of 5775062.  Working around...
> 
> It suddenly occurred to me that I only experience the switching
> problem in Emacs and here is a reference to one of my Emacs
> windows. Could it be a coincidence or is Emacs doing anything bad? I
> don't want to report this as a bug just yet. Does anyone else have similar
> experiences? I cannot say when it happens, it suddenly does. When I have
> switched using the mouse it works again, for a while...
> 

Do you have click-to-focus?  This is strange, because Emacs only sends 
_NET_ACTIVE_WINDOW when x-focus-frame is called.
We did have an issue with timestamps, but that should have been fixed some 
time ago.  Can you explicitly call x-focus-frame and at the same time do a 
tail -f on .xsession-errors and see if the above message comes up?

	Jan D.




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-27  6:58 ` Mathias Dahl
@ 2008-03-27  7:04   ` Jan Djärv
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Djärv @ 2008-03-27  7:04 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: emacs-devel



Mathias Dahl skrev:
>> Lately I am having problems switching windows (window manager windows)
>>  using Alt+Tab. Like exactly right now when I type this in Emacs I try
>>  to switch window and it does not work. I can see the frame of other
>>  windows being marked/outlined and in the task bar the name of the
>>  window I am trying to switch to becomes bold. I have to use the mouse
>>  to switch instead, very annoying.
> 
> I see no comments on this, maybe I am the only one running Ubuntu
> together with CVS Emacs. Would maybe gnu emacs help or the pretest bug
> list be a better place for my question?
> 
> 

I think this is the place for CVS Emacs related bugs.  And I just answered a 
minute before I saw this message :-).

	Jan D.




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-27  7:02 ` Jan Djärv
@ 2008-03-27  9:53   ` Mathias Dahl
  2008-03-27 18:04     ` Jan Djärv
  0 siblings, 1 reply; 9+ messages in thread
From: Mathias Dahl @ 2008-03-27  9:53 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel

>  Do you have click-to-focus?

I can focus/select and raise wm-windows by clicking them if that is
what you ask.

This is strange, because Emacs only sends
>  _NET_ACTIVE_WINDOW when x-focus-frame is called.
>  We did have an issue with timestamps, but that should have been fixed some
>  time ago.

> Can you explicitly call x-focus-frame and at the same time do a
>  tail -f on .xsession-errors and see if the above message comes up?

Interesting. After I have evaluated the following expression in Emacs
I get the problem right away:

  (x-focus-frame (selected-frame))

I need to minimize Emacs using M-z or click some other windows to get
it to behave normally again.

That call itself does not generate any new messages in
.xsession-errors. However, after clicking around a bit, switching to
FireFox writing this e-mail for example, I see this:

Window manager warning: last_focus_time (262538802) is greater than
comparison timestamp (4020640236).  This most likely represents a
buggy client sending inaccurate timestamps in messages such as
_NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: last_user_time (262538802) is greater than
comparison timestamp (4020640236).  This most likely represents a
buggy client sending inaccurate timestamps in messages such as
_NET_ACTIVE_WINDOW.  Trying to work around...
Window manager warning: 0x40000a4 (emacs - ma) appears to be one of
the offending windows with a timestamp of 262538802.  Working
around...

As you can see, again an Emacs window is mentioned.

I get this in emacs -Q as well as with a fully loaded .emacs.




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-27  9:53   ` Mathias Dahl
@ 2008-03-27 18:04     ` Jan Djärv
  2008-03-29  1:03       ` Mathias Dahl
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2008-03-27 18:04 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: emacs-devel

Mathias Dahl skrev:
>>  Do you have click-to-focus?
> 
> I can focus/select and raise wm-windows by clicking them if that is
> what you ask.
> 
> This is strange, because Emacs only sends
>>  _NET_ACTIVE_WINDOW when x-focus-frame is called.
>>  We did have an issue with timestamps, but that should have been fixed some
>>  time ago.
> 
>> Can you explicitly call x-focus-frame and at the same time do a
>>  tail -f on .xsession-errors and see if the above message comes up?
> 
> Interesting. After I have evaluated the following expression in Emacs
> I get the problem right away:
> 
>   (x-focus-frame (selected-frame))
> 
> I need to minimize Emacs using M-z or click some other windows to get
> it to behave normally again.
> 

I tried this on Ubuntu 7.10 with metacity but did not get any error.  You can
check if the timestamp Emacs sends corresponds to one of those in the error
message by printing it out in the function x_ewmh_activate_frame in xterm.c
(i.e. printf("%u\n", last_user_time); ).  However, that function is not called
unless you call x-focus-frame.

> That call itself does not generate any new messages in
> .xsession-errors. However, after clicking around a bit, switching to
> FireFox writing this e-mail for example, I see this:
> 
> Window manager warning: last_focus_time (262538802) is greater than
> comparison timestamp (4020640236).  This most likely represents a
> buggy client sending inaccurate timestamps in messages such as
> _NET_ACTIVE_WINDOW.  Trying to work around...

It actually don't make sense, as 262538802 is not greater than 4020640236.

You might have the same problem as the bug
http://bugzilla.gnome.org/show_bug.cgi?id=392889.  There is a lot of
discussion in the beginning but the hang bug is discussed at the end.

And then there is https://bugzilla.redhat.com/show_bug.cgi?id=224611, but it
doesn't sound like that one.

It is strange that I can't reproduce the problem, I have the same system as
you.  It must be something in the configuration that triggers this bug.

> Window manager warning: last_user_time (262538802) is greater than
> comparison timestamp (4020640236).  This most likely represents a
> buggy client sending inaccurate timestamps in messages such as
> _NET_ACTIVE_WINDOW.  Trying to work around...
> Window manager warning: 0x40000a4 (emacs - ma) appears to be one of
> the offending windows with a timestamp of 262538802.  Working
> around...
> 
> As you can see, again an Emacs window is mentioned.

Can you configrm that the window id belongs to Emacs?

	Jan D.




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-27 18:04     ` Jan Djärv
@ 2008-03-29  1:03       ` Mathias Dahl
  2008-03-30 17:53         ` Jan Djärv
  0 siblings, 1 reply; 9+ messages in thread
From: Mathias Dahl @ 2008-03-29  1:03 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel

>  I tried this on Ubuntu 7.10 with metacity but did not get any error.  You can
>  check if the timestamp Emacs sends corresponds to one of those in the error
>  message by printing it out in the function x_ewmh_activate_frame in xterm.c
>  (i.e. printf("%u\n", last_user_time); ).  However, that function is not called
>  unless you call x-focus-frame.

Oooh, I'd rather not dig into the C code, scary... :) However, if it
will help solve this problem I might give it a shot.

>  > Window manager warning: last_focus_time (262538802) is greater than
>  > comparison timestamp (4020640236).  This most likely represents a
>  > buggy client sending inaccurate timestamps in messages such as
>  > _NET_ACTIVE_WINDOW.  Trying to work around...
>
>  It actually don't make sense, as 262538802 is not greater than 4020640236.

Don't look at me, it's not me who generates those messages :)

>  You might have the same problem as the bug
>  http://bugzilla.gnome.org/show_bug.cgi?id=392889.  There is a lot of
>  discussion in the beginning but the hang bug is discussed at the end.

A lot of text, yes...

>  And then there is https://bugzilla.redhat.com/show_bug.cgi?id=224611, but it
>  doesn't sound like that one.

Agree.

>  It is strange that I can't reproduce the problem, I have the same system as
>  you.  It must be something in the configuration that triggers this bug.

Yes, this is strange... And even more strange is that the recipe
[(x-focus-frame (selected-frame))] that generated the problem
yesterday does not work today... And when I think of it I haven't got
any single problem today... I hate this...

>  > Window manager warning: 0x40000a4 (emacs - ma) appears to be one of
>  > the offending windows with a timestamp of 262538802.  Working
>  > around...
>  >
>  > As you can see, again an Emacs window is mentioned.
>
>  Can you configrm that the window id belongs to Emacs?

If you mean "emacs - ma" above, yes. "ma" is a truncated Emacs buffer
name. In other tests there have been names such as ".emacs" or other
buffers that was visible at the time.




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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-29  1:03       ` Mathias Dahl
@ 2008-03-30 17:53         ` Jan Djärv
  2008-03-30 22:19           ` Mathias Dahl
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2008-03-30 17:53 UTC (permalink / raw)
  To: Mathias Dahl; +Cc: emacs-devel

Mathias Dahl skrev:
> 
>>  It is strange that I can't reproduce the problem, I have the same system as
>>  you.  It must be something in the configuration that triggers this bug.
> 
> Yes, this is strange... And even more strange is that the recipe
> [(x-focus-frame (selected-frame))] that generated the problem
> yesterday does not work today... And when I think of it I haven't got
> any single problem today... I hate this...
> 

It really sounds like a bug in metacity.  I guess something Emacs does
triggers it, but I don't know what.  It is all very strange.

	Jan D.





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

* Re: Does Emacs wm-window handling misbehave?
  2008-03-30 17:53         ` Jan Djärv
@ 2008-03-30 22:19           ` Mathias Dahl
  0 siblings, 0 replies; 9+ messages in thread
From: Mathias Dahl @ 2008-03-30 22:19 UTC (permalink / raw)
  To: Jan Djärv; +Cc: emacs-devel

>  It really sounds like a bug in metacity.  I guess something Emacs does
>  triggers it, but I don't know what.  It is all very strange.

Strange indeed.  And I haven't seen the problems since two days now.
Maybe there are some other "thing" on my system that is involved.




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

end of thread, other threads:[~2008-03-30 22:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-24 13:37 Does Emacs wm-window handling misbehave? Mathias Dahl
2008-03-27  6:58 ` Mathias Dahl
2008-03-27  7:04   ` Jan Djärv
2008-03-27  7:02 ` Jan Djärv
2008-03-27  9:53   ` Mathias Dahl
2008-03-27 18:04     ` Jan Djärv
2008-03-29  1:03       ` Mathias Dahl
2008-03-30 17:53         ` Jan Djärv
2008-03-30 22:19           ` Mathias Dahl

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