Subject: bug#27357: 26.0.50; Emacs starts fullscreen in Ubuntu 17.04

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 14 Jun 2017 14:33:31 +0200

In 16.10, things worked as normal, but in Ubuntu 17.04 Emacs starts in
fullscreen mode.  That is, emacs -Q says:

(frame-parameter nil 'fullscreen)
maximized

If I say "emacs -geometry 20x20 -Q", then Emacs isn't fullscreen, but
instead starts with a frame that is approximately 84 characters by 46
characters.

This is on a HiDPI screen:

larsi@mouse:~$ dconf read /com/ubuntu/user-interface/scale-factor
{'eDP1': 11, 'eDP-1': 12}

Emacs 25 appears to behave the same as git Emacs, so whatever's going on
isn't a new bug, I think.

I tried grepping through the Emacs source code to find out what sets the
`maximized' value, and it's perhaps the get_current_wm_state thing?  I'm
not sure.

I also note that Emacs has a gaggle of options to switch fullscreen mode
on, but apparently none to switch it off?  

In GNU Emacs 26.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2017-06-07 built on stories
Repository revision: 62523863780d3894c92f84dd474278eeddc4a0e0
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Debian GNU/Linux 8.7 (jessie)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no