jerluc / wmii

Automatically exported from code.google.com/p/wmii
MIT License
0 stars 0 forks source link

Focus color indication incorrect when client gets itself focused. #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open emacs. Start the server inside emacs: M-x server-start
2. In another terminal, say: emacsclient anyfile.foo &
3.

What is the expected output? What do you see instead?
The emacs main window gains focus while opening anyfile.foo. Both emacs and
the terminal have focus colors on their bars. But only emacs has focus.

What version of the product are you using (wmii -v)? On what operating
system?
hg2533

Please provide any additional information below.
I saw this issue with other programs earlier, but reproduction is easiest
with emacs, sorry.

Original issue reported on code.google.com by skwi...@googlemail.com on 12 Oct 2009 at 1:56

GoogleCodeExporter commented 9 years ago
I grabbed Xemacs, because its base package is 1/3 the side of GNU's. It doesn't 
have
this problem, because it doesn't try to grab focus when gnuclient is used.

At any rate, as far as I can tell, this isn't a wmii bug. Look at the titlebars 
of
the two windows. If I'm right, the terminal will have an extra border around its
layout box, and Emacs will have a 'normcolors' border around the inside of the 
entire
titlebar.

If that's the case, and from what I can see in the Emacs source code, Emacs is
breaking the rules. It attempts to focus its main window itself, which ICCCM 
(the
rule book) doesn't allow. wmii doesn't fight it, because that can lead to some 
ugly
infinite loops, so it lets it have focus, but doesn't change its idea of the 
active
window. That particular feature was added mainly to deal with on-screen 
keyboards,
but serves a similar purpose here.

Oddly, the source code mentions that it's illegal. If Emacs wants to do what 
it's
doing, it should use EWMH hints and send a _NET_ACTIVE_WINDOW message to the 
root.
Admittedly, wmii will ignore this message, because it's used more by evil,
unscrupulous clients than it is for reasonable purposes. Alternatively, it 
could set
the urgency flag or EWMH demands_attention state, which wmii won't ignore.

You might consider filing this bug with the GNU people.

Original comment by maglion...@gmail.com on 12 Oct 2009 at 11:38

GoogleCodeExporter commented 9 years ago
You are right about the additional borders, so feel free to close this as 
invalid.
Anyway, it's a very minor issue, but I will probably report it to the Emacs 
folks.

Original comment by skwi...@googlemail.com on 13 Oct 2009 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by maglion...@gmail.com on 13 Nov 2009 at 12:12