diff options
author | Jan D <jan.h.d@swipnet.se> | 2010-09-17 11:04:35 +0200 |
---|---|---|
committer | Jan D <jan.h.d@swipnet.se> | 2010-09-17 11:04:35 +0200 |
commit | fb0cf781a1e22c3e9198811f57b72a023b865969 (patch) | |
tree | 58038f4b3f2546e7b39fd89f0089e42f57a5206f /lisp/dframe.el | |
parent | 1a9dc3b588164a97382127f51f1dda9e74abcf3d (diff) | |
download | emacs-fb0cf781a1e22c3e9198811f57b72a023b865969.tar.gz |
Expose tool-bar pixel width to lisp and use it for speedbar (Bug#7048)
* dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width
in calculating new frame position. Add more space between new and
parent on the left.
* frame.c (Ftool_bar_pixel_width): New function to expose tool
bar's pixel width to Lisp.
Diffstat (limited to 'lisp/dframe.el')
-rw-r--r-- | lisp/dframe.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/dframe.el b/lisp/dframe.el index bfa672cdec5..2e550d8dd78 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -430,7 +430,8 @@ a cons cell indicating a position of the form (LEFT . TOP)." (unless (or (not window-system) (eq window-system 'pc)) (let* ((pfx (dframe-frame-parameter parent-frame 'left)) (pfy (dframe-frame-parameter parent-frame 'top)) - (pfw (frame-pixel-width parent-frame)) + (pfw (+ (tool-bar-pixel-width parent-frame) + (frame-pixel-width parent-frame))) (pfh (frame-pixel-height parent-frame)) (nfw (frame-pixel-width new-frame)) (nfh (frame-pixel-height new-frame)) @@ -459,7 +460,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." (- (x-display-pixel-height) (car (cdr pfy)) pfh) (car (cdr pfy))))) (cond ((eq location 'right) - (setq newleft (+ pfx pfw 5) + (setq newleft (+ pfx pfw 10) newtop pfy)) ((eq location 'left) (setq newleft (- pfx 10 nfw) @@ -471,7 +472,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." ;; extra 10 is just dressings for window ;; decorations. (let* ((left-guess (- pfx 10 nfw)) - (right-guess (+ pfx pfw 5)) + (right-guess (+ pfx pfw 10)) (left-margin left-guess) (right-margin (- (x-display-pixel-width) right-guess 5 nfw))) |