From unknown Mon Aug 18 02:45:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31795: 26.1; Undecorated frame resize issues on macOS Resent-From: Boris Buliga Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jun 2018 07:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 31795@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15287901172919 (code B ref -1); Tue, 12 Jun 2018 07:56:03 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2018 07:55:17 +0000 Received: from localhost ([127.0.0.1]:43999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSe96-0000l0-Sk for submit@debbugs.gnu.org; Tue, 12 Jun 2018 03:55:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSRir-0001kW-K9 for submit@debbugs.gnu.org; Mon, 11 Jun 2018 14:39:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSRik-0000uU-HK for submit@debbugs.gnu.org; Mon, 11 Jun 2018 14:39:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSRik-0000uQ-Dd for submit@debbugs.gnu.org; Mon, 11 Jun 2018 14:39:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSRii-0001Ko-HR for bug-gnu-emacs@gnu.org; Mon, 11 Jun 2018 14:39:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSRig-0000tT-IW for bug-gnu-emacs@gnu.org; Mon, 11 Jun 2018 14:39:12 -0400 Received: from mail-ot0-x22f.google.com ([2607:f8b0:4003:c0f::22f]:35584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSRig-0000tB-7s for bug-gnu-emacs@gnu.org; Mon, 11 Jun 2018 14:39:10 -0400 Received: by mail-ot0-x22f.google.com with SMTP id q17-v6so25001147otg.2 for ; Mon, 11 Jun 2018 11:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=d12frosted-io.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=/z5w1YHt+4Z3NWlsfEAS5ZL7vLM8Pn74s8+bFXYtaq8=; b=QpjBwqzuJPx+vtDk8xY4XVBtX3lKv4n2vCiKihlig7VYiwgl6ykvYz7HGJvjCiPtqK jBaTDpmaK3bb6cUo2ek7UUW1qElbk8a7uoWWUGSgbePzpWI5P0fhvT+k6ilRrx7aik4T AMaS417aPEP8xOuTL2HvFTaJ9PN4ctFO4tHdxa20ab+F1kl2ZLCUdZfDHTn+0vFxTYni eUspWtapaRL6/rFkwuiTw3o2Jkxct54hFC6gYnxEWn9TrDCYSdW/D/LF60lBRsMmM+69 0r43vi5Ixw1KZZtMsItuNxy9tgaLU/w74OtaL6ZK4nJ82C6B0SamsS4a1MlfsSZTooTz sGzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/z5w1YHt+4Z3NWlsfEAS5ZL7vLM8Pn74s8+bFXYtaq8=; b=bi/0yr5/6GDzbv3s1fBB/9eSi31JYo3nrUsqRkqceSAYx3ockxmL1NkG2senSeT3U7 jbz3ROXSO2pFjd1b1ylDiF+L31dUXr1DpQjGGygV7Dp5sloUj87PkLIWSMmmEBAYfDBN qfDXywDSWdWse6O5juvmwxdWi7hZE04FExjDhG9JRIdRmBSozbpWEfKKIA+jn3LVAzhs WUVpRHYetqUfIFUPA8VeyKCcF70JV+K/3POtLF45RK7zvShpUaGjtqlGhkWjG1/PBex1 tH0Hv8ZSe/XakONJ8Trm3K45JkyPSNbNM4zxjQJrvdL5HOy4V2+4lxtau0qKOVM1coz0 RrPQ== X-Gm-Message-State: APt69E1JH5w1UW0AQyZQ80NAbMaWV/2GaR6U6h/im2dpOXkDZN9wdlJK DBrjD3fdPgnVx+tCFqT+KTkj77DOeQFQ0X7jBEAJ6+CCsVU= X-Google-Smtp-Source: ADUXVKJ0YPqOywzEzvEfdDQMp6wYQBrP2wR+0rYkSgtb/v15MvCSZTXycK2K26N7BUuWL9Ze+lrKf6623bob+CMd+To= X-Received: by 2002:a9d:577d:: with SMTP id x58-v6mr250539oti.196.1528742348631; Mon, 11 Jun 2018 11:39:08 -0700 (PDT) MIME-Version: 1.0 From: Boris Buliga Date: Mon, 11 Jun 2018 21:38:57 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000a4c342056e6210e9" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Tue, 12 Jun 2018 03:55:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) --000000000000a4c342056e6210e9 Content-Type: text/plain; charset="UTF-8" Message-ID: --text follows this line-- 1. Create ~/undecorated.el file with following content: (add-to-list 'default-frame-alist '(undecorated . t)) 2. Start Emacs: $ emacs -Q --load ~/undecorated.el or (if you don't want to create files) $ emacs -q --execute "(add-to-list 'default-frame-alist '(undecorated . t))" 3. Try one of the following actions 3.1. M-x toggle-frame-fullsreen Frames' window (in macOS sense) becomes fullscreen. But it doesn't cover all screen, instead it remains of the same default size with black area around. 3.2. Use Spectacle.app (or similar application for resizing windows in macOS) Frame is not resized. In both cases I expect frames to properly resize. Note that calling toggle-frame-maximized after the startup works like a charm. I've tried patching src/nsterm.m file by chaning definition of FRAME_DECORATED_FLAGS from #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless to #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow and canBecomeMainWindow both return YES). But it didn't make the trick. Let me know if you need any additional information. In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31 built on builder10-10.porkrind.org Windowing system distributor 'Apple', version 10.3.1561 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. user-error: Beginning of history; no preceding item user-error: End of history; no default available Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt elec-pair time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 204085 7246) (symbols 48 20096 1) (miscs 40 44 157) (strings 32 28985 1457) (string-bytes 1 764133) (vectors 16 35057) (vector-slots 8 713646 16946) (floats 8 49 67) (intervals 56 197 0) (buffers 992 11)) Best regards, Boris --000000000000a4c342056e6210e9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Message-ID: <m2a7s1mavt.f= sf@gmail.com>
--text follows this line--

1. Create ~/undecor= ated.el file with following content:


=C2=A0= =C2=A0(add-to-list 'default-frame-alist '(undecorated . t))<= /span>

2. Start Emacs:

=C2=A0= =C2=A0
<= span class=3D"gmail-Apple-converted-space">=C2=A0$ emacs -Q --load ~= /undecorated.el

=C2=A0=C2=A0=C2=A0or= (if you don't want to create files)

=C2=A0=C2=A0=C2=A0$ emacs -q --execute "(add-to-list 'default= -frame-alist '(undecorated . t))"

3. Try one of the following actions

3.1. M-x toggle-frame-fullsree= n

<= span class=3D"gmail-Apple-converted-space" style=3D"color:rgb(0,0,0);font-f= amily:monospace;font-size:12px;font-weight:normal;text-decoration:none">=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0Fram= es' window (in macOS sense) becomes fullscreen. But it doesn't
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0cover all screen, instead it remains of the= same default size with
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0black area ar= ound.

3.2. Use Sp= ectacle.app (or similar application for resizing windows in
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0macOS)

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Frame is not resized.

In both cases I expect frames to properly resi= ze.

Note that cal= ling toggle-frame-maximized after the startup works like a
charm.

= I've tried patching src/nsterm.m file by chaning definition ofFRAME_DECORATED_FLAGS from

=C2=A0=C2=A0#define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorder= less

to

=C2=A0= =C2=A0#define FRAME_UNDECORATED_FLAGS = NSWindowStyleMaskBorderless |
=C2=A0= =C2=A0<= span class=3D"gmail-Apple-converted-space">=C2=A0NSWindowStyleMaskRe= sizable

and creat= ing EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow
and canBecomeMainWindow both return YES).

But it didn't make the trick.

Let me know if you = need any additional information.

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS a= ppkit-1348.17 Version 10.10.5 (Build 14F2511))
of = 2018-05-31 built on builder10-= 10.porkrind.org
Windowing system distributor &= #39;Apple', version 10.3.1561
Recent messages:=
For information about GNU Emacs and the GNU syste= m, type C-h C-a.
user-error: Beginning of history;= no preceding item
user-error: End of history; no = default available

Configured using:
'configure --with-ns '-= -enable-locallisppath=3D/Library/Application
Suppo= rt/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings= :

=C2=A0=C2=A0value of $LANG: en_GB.UTF-8
=C2=A0=C2=A0locale-co= ding-system: utf-8-unix

Major mode: Lisp Interaction
=
Minor modes in effect:
=C2=A0=C2=A0tooltip-mode: t=
=C2=A0=C2=A0global-eldoc-mode: t
=C2=A0eldoc-mode: t
=C2=A0=C2=A0electric-indent-mode: t
=C2=A0= =C2=A0mouse-wheel-mode: = t
=C2=A0=C2=A0tool-bar-mode: t
= =C2=A0<= span class=3D"gmail-Apple-converted-space">=C2=A0menu-bar-mode: t

=C2=A0=C2=A0file-name-shadow-mode: t
=C2=A0=C2=A0global-font-lock= -mode: t
=C2=A0=C2=A0font-lock-mode: t
=C2=A0=C2=A0blink-cursor= -mode: t
=C2=A0=C2=A0auto-composition-mode: t
=C2=A0=C2=A0auto-= encryption-mode: t
=C2=A0=C2=A0auto-compression-mode: t
=C2=A0=C2=A0line-number-mode: t
=C2=A0= =C2=A0transient-mark-mode: t
Load-path shadows:=
None found.

Features:
(shadow sort mail-extr em= acsbug message rmc puny seq byte-opt gv
bytecomp b= yte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derive= d epg
epg-config gnus-util rmail rmail-loaddefs mm= -decode mm-bodies mm-encode
mail-parse rfc2231 mai= labbrev gmm-utils mailheader sendmail rfc2047
rfc2= 045 ietf-drums mm-util mail-prsvr mail-utils thingatpt elec-pair
time-date tooltip eldoc electric uniquify ediff-hook vc-hook= s
lisp-float-type mwheel term/ns-win ns-win ucs-no= rmalize mule-util
term/common-win tool-bar dnd fon= tset image regexp-opt fringe
tabulated-list replac= e newcomment text-mode elisp-mode lisp-mode
prog-m= ode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-= lang misc-lang
vietnamese tibetan thai tai-viet la= o korean japanese eucjp-ms cp51932
<= span style=3D"color:rgb(0,0,0);font-family:monospace;font-size:12px;font-we= ight:normal;text-decoration:none;float:none;display:inline">hebrew greek ro= manian slovak czech european ethiopic indian cyrillic

chinese composite charscript charprop case-table epa-hook jka-cmpr-hook=
help simple abbrev obarray minibuffer cl-preloade= d nadvice loaddefs
button faces cus-face macroexp = files text-properties overlay sha1 md5
base64 form= at env code-pages mule custom widget hashtable-print-readable
backquote kqueue cocoa ns multi-tty make-network-process emacs)=

Memory informati= on:

((conses 16 204085 7246)
(symbols 48 20096 1)
(miscs 40 44 157)<= br style=3D"color:rgb(0,0,0);font-family:monospace;font-size:12px;font-weig= ht:normal;text-decoration:none">(strings 32 28985 1457)
(string-= bytes 1 764133)
(vectors 16 35057)
(vector-slots 8 713646 16946)
(floats 8 = 49 67)
(intervals 56 197 0)
(buffers 992 11))


Best regards,
Boris

--000000000000a4c342056e6210e9-- From unknown Mon Aug 18 02:45:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31795: 26.1; Undecorated frame resize issues on macOS Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jun 2018 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boris Buliga Cc: 31795@debbugs.gnu.org Received: via spool by 31795-submit@debbugs.gnu.org id=B31795.152883407819469 (code B ref 31795); Tue, 12 Jun 2018 20:08:02 +0000 Received: (at 31795) by debbugs.gnu.org; 12 Jun 2018 20:07:58 +0000 Received: from localhost ([127.0.0.1]:45383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSpa9-00053w-VG for submit@debbugs.gnu.org; Tue, 12 Jun 2018 16:07:58 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:36063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSpa9-00053g-7t; Tue, 12 Jun 2018 16:07:57 -0400 Received: by mail-wr0-f171.google.com with SMTP id f16-v6so283216wrm.3; Tue, 12 Jun 2018 13:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=t+ihej7cJGNMzTpVpsH9FAVluOoF7VL+FbliIzGxAQw=; b=r7aTwYR4QIE/2ituHLJ4y5+1Y1yTziPvYLVoNbUNrry/vsECG+P2roKpLGB8f3Pu7A XQGPLVtu2xB102r9wZvsruqwkReXZYLvvE9Z+C69krVYRiyjxD3Xn7Lo5mCcebTakOOL 8gEJ3FY/a62sz6gyrLNfCsbobZoGmGOd+cM6pveh+cCcZTnEaj765spVP3ofbnIkOiOY Fn5khgevaC3UH1/LKsEUWcUXvK3O7BtjEfWzRHyf/+bcWTuzvGDk9ZyIKIZ/hoxMexm6 oBIMJknu7dZPZ4oaJZzwFKRFQFSVNcyixZFrvz7rW5K0qGfR5B0Fzl2K/V+XZT9un6A3 Q7gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=t+ihej7cJGNMzTpVpsH9FAVluOoF7VL+FbliIzGxAQw=; b=Y88o7YFJgLDyk5Xh0bq0vWPdSlu3Vfr6JgGm/kh0ttIdaX1E0PArUAQSZuA9VNcnx4 Ca+E9PZezlIQFAyehllajSsCLp8kmVaY8Ei5AdYZ0sjOM3Zg8XZlMUD7tv3mRAmQQ3oc 6Or4CG1GjDM9rUxUpnvkaO/UlniBtBUccNsK36XudO1Uvp9mQXbi8Lh21398Lt+3Q+42 bP28D/taY97rtqyW1uraf0LXHlVI0xjGO1Rhjmm24/Uyp/1AHmwwd34ZitOsNIXol5Yo 6/FjXqM2R4FtFrl3+cot0OakIB4vV1kpVSk21xtghnox8krTOUUHUHaVfG/tyF7i8vCh J6XA== X-Gm-Message-State: APt69E3hU0N1Ecm+pZWZ+ny49C8D77/gqbG+TMuKllVu5oeI/9AF0/dB Z5QKDFwBeDRWymEpCM+58/w= X-Google-Smtp-Source: ADUXVKKzs9bQRPWum3jcxZaNBJb2vuJCaq+wx8iadAtm2XWGgyaTstKmHXJBWqTtdiz5Q8gzJ/3+UA== X-Received: by 2002:adf:9aa5:: with SMTP id a34-v6mr1839594wrc.50.1528834071473; Tue, 12 Jun 2018 13:07:51 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-2050-339f-0e48-d89b.holly.idiocy.org. [2001:8b0:3f8:8129:2050:339f:e48:d89b]) by smtp.gmail.com with ESMTPSA id e14-v6sm1117061wmh.17.2018.06.12.13.07.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 13:07:50 -0700 (PDT) Date: Tue, 12 Jun 2018 21:07:48 +0100 From: Alan Third Message-ID: <20180612200748.GB889@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) merge 31795 28512 thank you On Mon, Jun 11, 2018 at 09:38:57PM +0300, Boris Buliga wrote: > 3. Try one of the following actions > > 3.1. M-x toggle-frame-fullsreen > > Frames' window (in macOS sense) becomes fullscreen. But it doesn't > cover all screen, instead it remains of the same default size with > black area around. Hmm, this isn’t very good. Maybe we should be resetting the window style before and after toggling fullscreen. > 3.2. Use Spectacle.app (or similar application for resizing windows in > macOS) > > Frame is not resized. Unfortunately this is expected. Apparently macOS doesn’t like you changing the window style on the fly, and resizing breaks. The solution appears to be to recreate the NSWindow, or give up on NSWindowStyleMaskBorderless and switch to using NSFullSizeContentViewWindowMask and its relatives. > I've tried patching src/nsterm.m file by chaning definition of > FRAME_DECORATED_FLAGS from > > #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless > > to > > #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless | > NSWindowStyleMaskResizable I would expect that to work. Is the line break just because of your email client? If not then you need to escape the newline like this: #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless \ | NSWindowStyleMaskResizable > and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow > and canBecomeMainWindow both return YES). You don’t need this. IIRC EmacsFSWindow exists solely for non‐native fullscreen. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 12 16:11:38 2018 Received: (at control) by debbugs.gnu.org; 12 Jun 2018 20:11:38 +0000 Received: from localhost ([127.0.0.1]:45397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSpdh-00059f-Rw for submit@debbugs.gnu.org; Tue, 12 Jun 2018 16:11:38 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:34016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSpdg-00059Q-G6 for control@debbugs.gnu.org; Tue, 12 Jun 2018 16:11:36 -0400 Received: by mail-wm0-f52.google.com with SMTP id l15-v6so16140857wmc.1 for ; Tue, 12 Jun 2018 13:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Cc+Up2JSueVekM1BzTWHWJjGaWzZVmTytaERjC1+Zx4=; b=vBX6yiDO/au66+gdCLkdoILLh4FVdcbHT1X2xixocENjWkvL+S8Ky7HOeksiv74T+q cjH5YwOlVAmtrNT6Olr4Tv6n3t/7aKkX3mGJ0wknAs5dkPogbGYirWLW0BONEMzZl08w l7rA1CIOzXIVHYGGgADETlstZmR3xOQGF3Zxg/N8VcDJ7Wz9cMxDDRpuY+l/6svvZJcO 69g4s24Wx4HqE4lKR/BnF6tzlJN7ramDYzLG/i47DGiZwEfsIa2DxsB3g1LrhZlM9oJy EyOH9fq2BcyW7yeRvx5puJ2AhdYJpe8zkSeEOA1vSrE0Sa23q4y4rbZNavbyuB12Qm28 cmRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Cc+Up2JSueVekM1BzTWHWJjGaWzZVmTytaERjC1+Zx4=; b=VHwdWhGagRpYbgR3KdKpnpTzUpTmuQC2ph0PPpptKAnVHzh2TTGRBrq9FoPWzmc3bl y02e5oeg4E43AO1cvkl+/SJX06649jT96sD0xTqjtl10tkoLqMr6PsOCw98vd+P/rmPi zbXdu5CrIwcRr1Qm9w5IRXgfUdIkUnm/wF11P+Nsu+4LAwTT1+icLG08elXvZ11JCh8K oHXeS6G8t4hE3jEcFFw5ECjO9EcyElHGxn0qnFW8pdWbWHgPFFhhJidP5RsY/GcJEGDb 1lPgL+KoptJ+E0nnkpXOPndeiOvKB+d7zivD/INw35UKegdbq8k4FeE+9FyXJhK6jzsI bQlA== X-Gm-Message-State: APt69E2n48BEsNEy/Bg9NQBIlgMCuc52IykuApvXMlRAFMAs60Z3XEV3 gLgJUYKqge6LuTArZtxAJ/odxQtB X-Google-Smtp-Source: ADUXVKIO1wpGdmigcQ+LXJZQtISishWcd3j7xB/5Vt8NczB/t0hxjuyo78CUVOcMyxnTZSiDrx8K9w== X-Received: by 2002:a1c:ae94:: with SMTP id x142-v6mr1404998wme.22.1528834290456; Tue, 12 Jun 2018 13:11:30 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-2050-339f-0e48-d89b.holly.idiocy.org. [2001:8b0:3f8:8129:2050:339f:e48:d89b]) by smtp.gmail.com with ESMTPSA id a8-v6sm1572468wrc.18.2018.06.12.13.11.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 13:11:29 -0700 (PDT) Date: Tue, 12 Jun 2018 21:11:27 +0100 From: Alan Third To: GNU bug tracker automated control server Subject: Re: Processed (with 1 errors): Re: bug#31795: 26.1; Undecorated frame resize issues on macOS Message-ID: <20180612201127.GC889@breton.holly.idiocy.org> References: <20180612200748.GB889@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) severity 28512 minor merge 31795 28512 thank you On Tue, Jun 12, 2018 at 04:08:02PM -0400, GNU bug tracker automated control server wrote: > Processing commands for control@debbugs.gnu.org: > > > merge 31795 28512 > bug#28512: 26.0.60; undecorated frames on macOS 10.13 do not resize properly > bug#31795: 26.1; Undecorated frame resize issues on macOS > Mismatch - only bugs in same state can be merged: > Values for `severity' don't match: > #28512 has `normal'; > #31795 has `minor' > > > thank you > Stopping processing here. > > Please contact help-debbugs@gnu.org if you need assistance. > > GNU bugs database, http://debbugs.gnu.org/ -- Alan Third From unknown Mon Aug 18 02:45:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#31795: 26.1; Undecorated frame resize issues on macOS Resent-From: Boris Buliga Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jun 2018 04:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: alan@idiocy.org Cc: 31795@debbugs.gnu.org Received: via spool by 31795-submit@debbugs.gnu.org id=B31795.152886299320133 (code B ref 31795); Wed, 13 Jun 2018 04:10:01 +0000 Received: (at 31795) by debbugs.gnu.org; 13 Jun 2018 04:09:53 +0000 Received: from localhost ([127.0.0.1]:45631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSx6W-0005Ee-Qu for submit@debbugs.gnu.org; Wed, 13 Jun 2018 00:09:53 -0400 Received: from mail-ot0-f171.google.com ([74.125.82.171]:33237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSx6U-0005ER-NL for 31795@debbugs.gnu.org; Wed, 13 Jun 2018 00:09:51 -0400 Received: by mail-ot0-f171.google.com with SMTP id h6-v6so1434298otj.0 for <31795@debbugs.gnu.org>; Tue, 12 Jun 2018 21:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=d12frosted-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g6SU0oyNyAWIp4d14VQYQUOEEiDisFYss6gjuIOIjyY=; b=mmZhDDq8Gkr6oi+GVQRc9ZgXNRE4+L42EIz0S1I5wPC17yvj4umtubjBZuUW8BlGD3 EgnyrhqPCJdZ5eJYRxDpjrhjSlT9T2HbrDXSJ2MxN+GunkC6bxsfbJzPS6AwwIbhhquf BzugKtB7ehs7x/VhiMu8o/HtK+hZKb2x32HtppzVsxz1ELTMijZaqAmpUgPlNdLhlxnW ixezt/yNEEIMfcT37fxZC6oBooDx5r+xpyxR5fm9VaPz9oWmnd425L4Yn5+hfaChtuF1 UkdOJNlhR+QZC0xgVnDMgImWVWgT/R761b3ADXVwKpId0CgXCgfdh3vtv5gG2cDxSCiu 1U4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g6SU0oyNyAWIp4d14VQYQUOEEiDisFYss6gjuIOIjyY=; b=OFOOklL5+JI8wDQ0AV5hmwtgA7dyx0MiGVfjamUhL2xMdk6Wfq8B/r/u2dWEXTBeNi lxk1jM9dVJz1W9raN+fum896dqUcZE4Y3YzvtiWGdIBkATIYrWw8EEqnSpXrPDRiNNed NLimYFP0KBmeclteXQDAxIVcLAY3hpmLa6sJJytW/akqRMu7Ne4Dkz4aRuRoP517Dkvv 9PqwKvaPOvPrQ0sbvj/5Mpz/yL/716UgzD+BBOUAH0IPO2C0WjVXG0wm5OJapOMQeDC3 rc7VGL9RQh5TeGEKg9MIGjJFmdmmCZnJbzjUQnSxh0i8NgfeiY6dU6zhOkmkV5c1Wx7i U0Zg== X-Gm-Message-State: APt69E06GijnpEvil4Ktu1R5PIzcUs9XhY5sTDE5+7JDROXztdVCdgt3 w0vhYW+eFgt4eyak8V2Qy+2G2Akp2QBoQvMjW9pT1g== X-Google-Smtp-Source: ADUXVKKDGgspXbtSzUc8QxOCanGwN0bc4UcjH5x08cQskbnbk7Hz0mfabkSJQSRI1fvg/4TLBFTP/1Luw+bqWD+g10E= X-Received: by 2002:a9d:5250:: with SMTP id q16-v6mr1938062otg.229.1528862984941; Tue, 12 Jun 2018 21:09:44 -0700 (PDT) MIME-Version: 1.0 References: <20180612200748.GB889@breton.holly.idiocy.org> In-Reply-To: <20180612200748.GB889@breton.holly.idiocy.org> From: Boris Buliga Date: Wed, 13 Jun 2018 07:09:33 +0300 Message-ID: Content-Type: multipart/alternative; boundary="00000000000020c615056e7e278c" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000020c615056e7e278c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Alan, Thank you for your reply! > merge 31795 28512 Apparently, my search-fu has failed me as I didn't know about ticket 28512 before submitting new one. Thanks for linking. That ticket actually reveals some insights on why the whole thing with borderless mask doesn't behave as I want it to behave. As you say in your message: > Apparently macOS doesn=E2=80=99t like you changing the window style on th= e fly, and > resizing breaks. As it turns out, you can achieve goal by creating a window without NSWindowStyleMaskTitled regardless the undecorated flag value. It's not a solution in general way, but in case someone is interested, I can share a patch. Though it would be nice to make it working with undecorated frame option. > and switch to using NSFullSizeContentViewWindowMask and its relatives. I should try this out. > Hmm, this isn=E2=80=99t very good. Maybe we should be resetting the windo= w style > before and after toggling fullscreen. Maybe. Because (let's say) it's not useful as is :) > I would expect that to work. OK, so I am not the only one :) > Is the line break just because of your email client? Exactly. Originally I've put it in one line. >> and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow >> and canBecomeMainWindow both return YES). > You don=E2=80=99t need this. IIRC EmacsFSWindow exists solely for non=E2= =80=90native > fullscreen. I was desperate. On Tue, 12 Jun 2018 at 23:07, Alan Third wrote: > merge 31795 28512 > thank you > > On Mon, Jun 11, 2018 at 09:38:57PM +0300, Boris Buliga wrote: > > > 3. Try one of the following actions > > > > 3.1. M-x toggle-frame-fullsreen > > > > Frames' window (in macOS sense) becomes fullscreen. But it doesn't > > cover all screen, instead it remains of the same default size with > > black area around. > > Hmm, this isn=E2=80=99t very good. Maybe we should be resetting the windo= w > style before and after toggling fullscreen. > > > 3.2. Use Spectacle.app (or similar application for resizing windows in > > macOS) > > > > Frame is not resized. > > Unfortunately this is expected. Apparently macOS doesn=E2=80=99t like you > changing the window style on the fly, and resizing breaks. The > solution appears to be to recreate the NSWindow, or give up on > NSWindowStyleMaskBorderless and switch to using > NSFullSizeContentViewWindowMask and its relatives. > > > I've tried patching src/nsterm.m file by chaning definition of > > FRAME_DECORATED_FLAGS from > > > > #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless > > > > to > > > > #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless | > > NSWindowStyleMaskResizable > > I would expect that to work. Is the line break just because of your > email client? If not then you need to escape the newline like this: > > #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless \ > | NSWindowStyleMaskResizable > > > > and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindo= w > > and canBecomeMainWindow both return YES). > > You don=E2=80=99t need this. IIRC EmacsFSWindow exists solely for non=E2= =80=90native > fullscreen. > > -- > Alan Third > --=20 Cheers, Boris --00000000000020c615056e7e278c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey Alan,

Thank you for your= reply!

> merge 31795 28512

Apparently, my search-fu has failed me as I didn't know about tic= ket 28512
before submitting new one. Thanks for linking.

That ticket actually reveals some insights on why the whol= e thing with
borderless mask doesn't behave as I want it to b= ehave. As you say in your
message:

> = Apparently macOS doesn=E2=80=99t like you changing the window style on the = fly, and
> resizing breaks.

As it tur= ns out, you can achieve goal by creating a window without
NSWindo= wStyleMaskTitled regardless the undecorated flag value. It's not a
solution in general way, but in case someone is interested, I can sha= re a patch.

Though it would be nice to make it wor= king with undecorated frame option.

> and switc= h to using NSFullSizeContentViewWindowMask and its relatives.
I should try this out.

> Hmm, this = isn=E2=80=99t very good. Maybe we should be resetting the window style
> before and after toggling fullscreen.

M= aybe. Because (let's say) it's not useful as is :)

> I would expect that to work.

OK, so = I am not the only one :)

> Is the line break ju= st because of your email client?

Exactly. Original= ly I've put it in one line.

>> and creat= ing EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow
&= gt;> and canBecomeMainWindow both return YES).

= > You don=E2=80=99t need this. IIRC EmacsFSWindow exists solely for non= =E2=80=90native
> fullscreen.

I was d= esperate.

On Tue, 12 J= un 2018 at 23:07, Alan Third <alan@id= iocy.org> wrote:
merge 31795= 28512
thank you

On Mon, Jun 11, 2018 at 09:38:57PM +0300, Boris Buliga wrote:
<create an undecorated frame>
> 3. Try one of the following actions
>
> 3.1. M-x toggle-frame-fullsreen
>
>=C2=A0 =C2=A0 =C2=A0 Frames' window (in macOS sense) becomes fullsc= reen. But it doesn't
>=C2=A0 =C2=A0 =C2=A0 cover all screen, instead it remains of the same d= efault size with
>=C2=A0 =C2=A0 =C2=A0 black area around.

Hmm, this isn=E2=80=99t very good. Maybe we should be resetting the window<= br> style before and after toggling fullscreen.

> 3.2. Use Spectacle.app (or similar application for resizing windows in=
>=C2=A0 =C2=A0 =C2=A0 macOS)
>
>=C2=A0 =C2=A0 =C2=A0 Frame is not resized.

Unfortunately this is expected. Apparently macOS doesn=E2=80=99t like you changing the window style on the fly, and resizing breaks. The
solution appears to be to recreate the NSWindow, or give up on
NSWindowStyleMaskBorderless and switch to using
NSFullSizeContentViewWindowMask and its relatives.

> I've tried patching src/nsterm.m file by chaning definition of
> FRAME_DECORATED_FLAGS from
>
>=C2=A0 =C2=A0#define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderles= s
>
> to
>
>=C2=A0 =C2=A0#define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderles= s |
>=C2=A0 =C2=A0 NSWindowStyleMaskResizable

I would expect that to work. Is the line break just because of your
email client? If not then you need to escape the newline like this:

=C2=A0 =C2=A0 #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless \=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | NSWindowStyleMaskRes= izable


> and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWind= ow
> and canBecomeMainWindow both return YES).

You don=E2=80=99t need this. IIRC EmacsFSWindow exists solely for non=E2=80= =90native
fullscreen.

--
Alan Third


--
Cheers,
Boris
--00000000000020c615056e7e278c--