[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56457: 29.0.50; set-frame-width and frame-width are not exactly comp
From: |
Po Lu |
Subject: |
bug#56457: 29.0.50; set-frame-width and frame-width are not exactly complimentary |
Date: |
Sat, 09 Jul 2022 16:21:09 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Pankaj Jangid <pankaj@codeisgreat.org> writes:
> If I set it to "t" then my toggle function also works correctly. And the
> new frames are launched with frame-width 80. Here is my slightly updated
> lisp,
>
> (custom-set-variables
> '(frame-resize-pixelwise t))
>
> (defun my/cycle-frame-width ()
> "Cycle \"frame-width\"."
> (interactive)
>
> (let ((width (frame-width)))
> (if (and (> width 75) (< width 85))
> (set-frame-width nil (* width 2))
> (set-frame-width nil (/ width 2)))
> (message "Frame size: %sx%s" (frame-width) (frame-height))))
> (global-set-key (kbd "<f9>") 'my/cycle-frame-width)
>
> The only issue now is that, the "(message..." statement prints width as
> 83. I don't know why. If I evaluate (frame-width), it shows 80.
Then that's a known problem with PGTK. I will look into it some more in
the near future, but it's probably a GTK bug.