help-gnu-emacs
[Top][All Lists]
Advanced

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

Trouble with toggling fullscreen mode


From: Alex Bennee
Subject: Trouble with toggling fullscreen mode
Date: Sun, 25 Oct 2009 20:39:50 +0000

Hi,

I'm having trouble with toggling full-screen mode on my netbook. The
first problem is that the frame size isn't set properly without
explicitly being adjusted, e.g:

(defun toggle-fullscreen (&optional f)
  (interactive)
  (unless f
    (setq f (selected-frame)))
  (if (frame-parameter f 'fullscreen)
      (progn
        ; FS->Normal
        (message "Fullscreen->Normal")
        (set-frame-parameter f 'fullscreen nil)
        (set-frame-width (selected-frame) 86)
        (set-frame-height (selected-frame) 24))
    ; Normal->FS
    (message "Normal->Fullscreen")
    (set-frame-parameter f 'fullscreen 'fullboth)
    (set-frame-width f fullscreen-width)
    (set-frame-height f fullscreen-height)))

Secondly this function doesn't always work, however if I put a
(sleep-for 1) between the set-frame-parameter and the
set-frame-width/height it works fine.

Is there some function I can call the forces a redrawing of the screen
taking into account the new frame parameters?

Is there any way to query the maximum physical screen size in terms of
frame width and height units?

My emacs version is: "GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+
Version 2.16.6)  of 2009-09-29 on x86-7.fedora.phx.redhat.com"

-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]