Floating emacs frames aren't centered
i3 centers new floating windows by default. Except for Emacs frames. Those are stuck to the top left. I've triple checked the emacs docs and my dotemacs, and as far as I can tell, this should not be happening.
To be more specific, the default-frame-alist
variable contains default parameters for new frames. It does not contain the keys top
or left
in my config. According to the emacs docs, this should cause the window manager to do whatever it does by default.
To test this yourself, put this in your .i3/config
:
for_window [class="^Emacs$" instance="^floating$"] floating enable
And try:
emacs --geometry 50x50+200+200 --name floating
Or maybe:
emacs --daemon
emacsclient -c -F '((name . "floating") (width . 50) (height . 50))' some.file
Edit: Here's a log file of me reproducing the observed behaviour. It's probably much longer than necessary, but a search for "personal-org" will get you to where the interesting bits happen.
It'd be better if you could provide a log file. Make sure to close all other apps and restart i3 before reproducing and taking the log file.
Added a log file.
I don't have much time right now, but from what I can tell, emacs specifies a "leader" window for i3 and i3 centers the instance on top of that leader window. That may play a role here.
That's the first time I've heard of such a thing. I'm not sure what to make of it. Is there anything special about this leader window that would prevent it from being handled adequately by i3?
I suggest you file a bug on Github so that more people might look at it. If all you want is a quick fix for this, simply execute "position move center" after floating the window.