problem selecting emacs window



I'm using emacs in server mode, but I have a strange issue when launching something to an existing window.  From my shell (so emacs is in the background window), if I open a new file I'll see the change in the emacs window, but when I click on the emacs window (somewhere in the buffer) the window isn't brought to the foreground.  I have to actually click on the title bar to get the window to pop over the top of the shell.  It only seems to get in this state when I open a new file in an existing emacs window.  

# open emacs in a new window from the shell
$ emacs &

# click on the terminal so it partially covers the emacs window

# open a file in the existing emacs window
$ emacsclient -n /tmp/some_file.txt

The emacs window's buffer will update to the correct file, but it will stay behind the shell window until I actually click on the titlebar or click back on the terminal then click on the emacs window again.  I can see the selected window changes because I can type in the emacs window and the cursor in the terminal changes to show it's been deselected, but I can bring it to the foreground.  It's like the window is getting focus, but not brought to the foreground, and when I click on it, it sees it's already selected so doesn't bring it to the foreground.  

I've worked around this by just clicking on the title bar after opening an emacs file, but it would be nice not having to do this every time I open a file from the command line.  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]