My goal is to resize Emacs frame on start to make its width 120 chars and center the frame. To compute offset i'm using this:
(let* ((width-left (- (x-display-pixel-width) (frame-pixel-width))) (frame-left-offest (/ width-left 2))) (add-to-list 'default-frame-alist (cons 'left frame-left-offest)))
The problem is that
(frame-pixel-width) during the app launch gives me one width and when the app has started it gives me another width (the proper one, which i need). So the result is wrong. I'm not sure why that happens and what's the proper way to do it.