Subject: bug#17046: 24.3.50; On startup emacs frame has no minibuffer or windows decorations

From: Robert Marshall <[email-masked]>
Date: Fri, 21 Mar 2014 16:53:56 +0000

martin rudalics writes:
 >  >   > Once more (I'm confused): What I wanted you to try is to get that bad
 >  >   > frame (the one without title decoration and without minibuffer) back on
 >  >   > screen.  Let's call this the "bad base state".  Now please in that state
 >  >   > do:
 >  >   >
 >  >   > (1) Apply your window manager's key shortcut to maximize it and then the
 >  >   >      shortcut to restore its normal size.  Do title bar or minibuffer
 >  >   >      come back?
 >  >
 >  > No both in the 'maximized' state and on restored the window is exactly
 >  > the same (though in a different position relative to the rest of the
 >  > screen). The one difference is that the emacs frame which was
 >  > originally showing two windows
 > 
 > Do you mean the "bad base state" frame was showing two windows before
 > maximization?  Or do you mean the frame whose state was saved and should
 > have been restored was showing two windows?  Or does the "second window"
 > refer to the minibuffer window?
 > 
 >  > now only shows one window. I'm
 >  > including a screenshot of the maximised state. Other applications
 >  > maximise as expected - as does emacs when the desktop isn't loaded.
 >  > (I commented in a previous message that maximise isn't working
 >  > properly when the frame is in this state).
 > 
 > You mean it simply does not maximize, as can be seen on the screenshot.
 > Are the three buttons (minimize, maximize, delete) on the right of the
 > toolbar something you've seen before on your system?  I don't see them
 > on the screenshot you sent earlier.  What happens when you click on
 > them?  Finally, there are no scroll bars and no right fringes on this
 > frame which probably count as more bugs.

Sorry for the confusion I've caused here - those 3 buttons belong to
another application whose window I have shaded (so that the rest of it
is not visible). The emacs scroll bars and fringe disappear when the
window gets the maximise command.

When the maximise happens - as you see the frame doesn't appear to
change size but it does relocate - it starts off in the centre of the
screen and f11 causes it to move to the top left of the screen - so
the correct place - if only the rest of the frame were the correct
size! It would appear that the frame is only showing part of what
should be there - on further experimentation I've managed to
'maximise' so that the top window appears ok but the lower window only
displays a few lines with no mode line visible and C-x o takes me into
that area of around 3.5 lines and I could scroll up and down in that
window without a mode line.

> 
 >  > Is the maximise state happening but the border is only giving a
 >  > partial window and the other buffer is there but the frame cuts off
 >  > visibility?
 > 
 > The frame dump you sent earlier indicates that the Emacs frame/window
 > handling code considers everything in order.  This means that the bug
 > happens either in the communcation between window manager and Emacs or
 > that Emacs doesn't redraw the frame orderly.  But all this is dwarfed by
 > the fact that there's no title line and the strange buttons on the right
 > of the frame.
 > 
 >  >   > (2) In the bad base state type F11.  Does anything change?  Type F11
 >  >   >      again.  Does anything change this time?
 >  >
 >  > Exactly the same behaviour as in case (1)
 > 
 > Remarkable.  One clue less for the disappearance of the title line.
 > 
 >  > I exited the bad state emacs but with only one window shown in the
 >  > frame and then restarted emacs and the frame was displayed correctly!
 >  > I then displayed another buffer in a second window in that frame and
 >  > exited again. On a restart the problem was back.
 > 
 > I can only assure you that yours is the strangest behavior I've seen
 > over the past year.
 > 
 >  > The problem only seems to occur when the frame is trying to show 2
 >  > buffers?
 > 
 > OK.  I'm happy that the problem is reliably repeatable.  So please
 > proceed as follows:
 > 
 > (1) In the frame whose state you save, just before exiting it, do
 > `window--dump-frame' and post the contents of the *window-frame-dump*
 > buffer here and also the value of `desktop-saved-frameset' for control.

You mean before exiting emacs and that saving the desktop file and
with an un'maximised' bad frame? I get (evaluating it in *scratch*)
(see end of message - maybe I've misunderstood you here and you wanted
the output with just one window in the bad frame - the output from
that option is at the end)

frame pixel: 992 x 648   cols/lines: 124 x 36   units: 8 x 18
frame text pixel: 960 x 648   cols/lines: 120 x 36
tool: 0  scroll: 16  fringe: 16  border: 0  right: 0  bottom: 0

#<window 7>   parent: nil
pixel left: 0   top: 0   size: 992 x 630   new: 992
char left: 0   top: 0   size: 124 x 35   new: 124
normal: 1.0 x 1.0   new: nil

#<window 3 on .emacs>   parent: #<window 7>
pixel left: 0   top: 0   size: 992 x 314   new: 992
char left: 0   top: 0   size: 124 x 17   new: 124
normal: 1.0 x 0.5   new: nil
body pixel: 960 x 296   char: 120 x 16
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 18  divider: 0

#<window 8 on *scratch*>   parent: #<window 7>
pixel left: 0   top: 314   size: 992 x 316   new: 992
char left: 0   top: 17   size: 124 x 18   new: 124
normal: 1.0 x 0.5   new: nil
body pixel: 960 x 298   char: 120 x 16
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 18  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 630   size: 992 x 18   new: 0
char left: 0   top: 35   size: 992 x 1   new: 240
normal: 1.0 x 1.0   new: 0
body pixel: 960 x 18   char: 120 x 1
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 0  divider: 0

I then exit and here is desktop-saved-frameset

(setq desktop-saved-frameset [frameset 1 (21292 26291 660046 398000) (desktop . "206") "robert@poulenc" nil nil ((((font-backend xft x) (font . "-unknown-Inconsolata-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1") (font-parameter . "Inconsolata-12") (border-width . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divider-width . 0) (vertical-scroll-bars . right) (foreground-color . "DarkOrchid1") (background-color . "mint cream") (mouse-color . "#221f1e") (border-color . "black") (screen-gamma) (line-spacing) (left-fringe . 8) (right-fringe . 8) (scroll-bar-foreground . "#221f1e") (scroll-bar-background . "grey75") (menu-bar-lines . 1) (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-position . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (scroll-bar-width . 16) (alpha . 90) (horizontal-scroll-bars . t) (display-type . color) (background-mode . light) (cursor-color . "#221f1e") (sticky) (environment) (maximized) (frameset--id . "C8B6-55AF-6CE3-E1B1") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0") (explicit-name) (height . 36) (width . 120) (left . 590) (top . 94)) ((min-height . 8) (min-width . 10) (min-height-ignore . 4) (min-width-ignore . 6) (min-height-safe . 2) (min-width-safe . 2) (min-pixel-height . 144) (min-pixel-width . 80) (min-pixel-height-ignore . 72) (min-pixel-width-ignore . 48) (min-pixel-height-safe . 36) (min-pixel-width-safe . 16)) vc (pixel-width . 992) (pixel-height . 630) (total-width . 124) (total-height . 35) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 992) (pixel-height . 314) (total-width . 124) (total-height . 17) (normal-height . 0.5) (normal-width . 1.0) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars 16 2 t nil) (vscroll . 0) (dedicated) (point . 2818) (start . 2727))) (leaf (last . t) (pixel-width . 992) (pixel-height . 316) (total-width . 124) (total-height . 18) (normal-height . 0.5) (normal-width . 1.0) (buffer "WikipediaApplet.cpp" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars 16 2 t nil) (vscroll . 0) (dedicated) (point . 28638) (start . 28492)))))])

> 
 > (2) Repeat the experiment with two side-by-side windows (that is call
 > `split-window-right' before saving the desktop) and proceed as described
 > in (1).
 >

So just one buffer in the frame split into 2 side by side windows
(with the issues with two windows I'd been using split-window-below
and displaying another buffer in the second window).......

In attempting to restart to do this test I was unable to replicate the
error for some time, I started emacs 3-4 times without the problem,
eventually I got a bad frame and got the results below:

frame pixel: 992 x 648   cols/lines: 124 x 36   units: 8 x 18
frame text pixel: 960 x 648   cols/lines: 120 x 36
tool: 0  scroll: 16  fringe: 16  border: 0  right: 0  bottom: 0

#<window 11>   parent: nil
pixel left: 0   top: 0   size: 992 x 630   new: 992
char left: 0   top: 0   size: 124 x 35   new: 124
normal: 1.0 x 1.0   new: 1.0

#<window 3 on .emacs>   parent: #<window 11>
pixel left: 0   top: 0   size: 496 x 630   new: 496
char left: 0   top: 0   size: 62 x 35   new: 62
normal: 0.5 x 1.0   new: 0.5
body pixel: 464 x 612   char: 58 x 34
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 18  divider: 0

#<window 12 on .emacs>   parent: #<window 11>
pixel left: 496   top: 0   size: 496 x 630   new: 496
char left: 62   top: 0   size: 62 x 35   new: 62
normal: 0.5 x 1.0   new: 0.5
body pixel: 464 x 612   char: 58 x 34
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 18  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 630   size: 992 x 18   new: 0
char left: 0   top: 35   size: 124 x 1   new: 124
normal: 1.0 x 1.0   new: 0
body pixel: 960 x 18   char: 120 x 1
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 0  divider: 0

(setq desktop-saved-frameset [frameset 1 (21292 27767 934040 895000) (desktop . "206") "robert@poulenc" nil nil ((((font-backend xft x) (font . "-unknown-Inconsolata-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1") (font-parameter . "Inconsolata-12") (border-width . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divider-width . 0) (vertical-scroll-bars . right) (foreground-color . "DarkOrchid1") (background-color . "mint cream") (mouse-color . "#221f1e") (border-color . "black") (screen-gamma) (line-spacing) (left-fringe . 8) (right-fringe . 8) (scroll-bar-foreground . "#221f1e") (scroll-bar-background . "grey75") (menu-bar-lines . 1) (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-position . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (scroll-bar-width . 16) (alpha . 90) (horizontal-scroll-bars . t) (display-type . color) (background-mode . light) (cursor-color . "#221f1e") (sticky) (environment) (maximized) (frameset--id . "C8B6-55AF-6CE3-E1B1") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (icon-name) (visibility . icon) (display . ":0") (explicit-name) (height . 37) (width . 120)) ((min-height . 4) (min-width . 20) (min-height-ignore . 2) (min-width-ignore . 12) (min-height-safe . 1) (min-width-safe . 4) (min-pixel-height . 72) (min-pixel-width . 160) (min-pixel-height-ignore . 36) (min-pixel-width-ignore . 96) (min-pixel-height-safe . 18) (min-pixel-width-safe . 32)) hc (pixel-width . 992) (pixel-height . 648) (total-width . 124) (total-height . 36) (normal-height . 1.0) (normal-width . 1.0) (combination-limit) (leaf (pixel-width . 496) (pixel-height . 648) (total-width . 62) (total-height . 36) (normal-height . 1.0) (normal-width . 0.5) (buffer ".emacs" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars 16 2 t nil) (vscroll . 0) (dedicated) (point . 4262) (start . 3837))) (leaf (last . t) (pixel-width . 496) (pixel-height . 648) (total-width . 62) (total-height . 36) (normal-height . 1.0) (normal-width . 0.5) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars 16 2 t nil) (vscroll . 0) (dedicated) (point . 4262) (start . 3837)))))])

Restarted emacs and it came up with a bad frame, in case I misunderstood 
(1) here's window--dump-frame with just one window visible in the frame

frame pixel: 992 x 666   cols/lines: 124 x 37   units: 8 x 18
frame text pixel: 960 x 666   cols/lines: 120 x 37
tool: 0  scroll: 16  fringe: 16  border: 0  right: 0  bottom: 0

#<window 3 on *scratch*>   parent: nil
pixel left: 0   top: 0   size: 992 x 648   new: 648
char left: 0   top: 0   size: 124 x 36   new: 34
normal: 1.0 x 1.0   new: nil
body pixel: 960 x 630   char: 120 x 35
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 18  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 648   size: 992 x 18   new: 0
char left: 0   top: 36   size: 124 x 1   new: 1
normal: 1.0 x 1.0   new: 0
body pixel: 960 x 18   char: 120 x 1
width left fringe: 8  left margin: 0  right margin: 0
width right fringe: 8  scroll-bar: 16  divider: 0
height header-line: 0  mode-line: 0  divider: 0

And on exit .emacs.desktop contains

(setq desktop-saved-frameset [frameset 1 (21292 27934 99775 17000) (desktop . "206") "robert@poulenc" nil nil ((((font-backend xft x) (font . "-unknown-Inconsolata-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1") (font-parameter . "Inconsolata-12") (border-width . 0) (internal-border-width . 0) (right-divider-width . 0) (bottom-divider-width . 0) (vertical-scroll-bars . right) (foreground-color . "DarkOrchid1") (background-color . "mint cream") (mouse-color . "#221f1e") (border-color . "black") (screen-gamma) (line-spacing) (left-fringe . 8) (right-fringe . 8) (scroll-bar-foreground . "#221f1e") (scroll-bar-background . "grey75") (menu-bar-lines . 1) (tool-bar-lines . 1) (title) (wait-for-wm . t) (fullscreen) (tool-bar-position . top) (icon-type . t) (auto-raise) (auto-lower) (cursor-type . box) (scroll-bar-width . 16) (alpha . 90) (horizontal-scroll-bars . t) (display-type . color) (background-mode . light) (cursor-color . "#221f1e") (sticky) (environment) (maximized) (frameset--id . "C8B6-55AF-6CE3-E1B1") (frameset--mini t . t) (modeline . t) (minibuffer . t) (unsplittable) (icon-name) (visibility . t) (display . ":0") (explicit-name) (height . 37) (width . 120) (left . 590) (top . 94)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 6) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 72) (min-pixel-width . 80) (min-pixel-height-ignore . 36) (min-pixel-width-ignore . 48) (min-pixel-height-safe . 18) (min-pixel-width-safe . 16)) leaf (pixel-width . 992) (pixel-height . 648) (total-width . 124) (total-height . 36) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected . t) (hscroll . 0) (fringes 8 8 nil) (margins nil) (scroll-bars 16 2 t nil) (vscroll . 0) (dedicated) (point . 4262) (start . 3837))))])

Robert
-- 
Robert Marshall