From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Boris Buliga Newsgroups: gmane.emacs.help Subject: [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t Date: Thu, 7 Jun 2018 21:15:26 +0300 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1528402749 20327 195.159.176.226 (7 Jun 2018 20:19:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2018 20:19:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 22:19:05 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fR1N8-0005Ap-Mx for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2018 22:19:02 +0200 Original-Received: from localhost ([::1]:60026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fR1PF-0005mJ-Rb for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2018 16:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQzRk-0008GK-Qn for help-gnu-emacs@gnu.org; Thu, 07 Jun 2018 14:15:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQzRj-0008Qc-EF for help-gnu-emacs@gnu.org; Thu, 07 Jun 2018 14:15:40 -0400 Original-Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:42676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQzRj-0008QT-88 for help-gnu-emacs@gnu.org; Thu, 07 Jun 2018 14:15:39 -0400 Original-Received: by mail-oi0-x229.google.com with SMTP id k190-v6so9473409oib.9 for ; Thu, 07 Jun 2018 11:15:38 -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=mVUBW7gzG57STeRQuoUMddA8z7kzpQl/IDX39P09vXs=; b=R3fIh5M7FmXpLGZ2SuorLGXXpSVK34GVfxltv3+yshCJ/KPi4ThDUpJg/h5/qtNuLD aJFhpw4qUZ6kVA/bRQhuN9gG6yddX+1+kvg/v0fhguavQlOifohQbf35IQSg1fuHdrnT bT1dgx6ynGHE52ZsORoQj5ShHzhQDtN4t6iAnmTSaGFXXZWpLgXKBRrwTRa7GsLuz8YS PfmX3NeQdUf8NtVf+M8M1NKpF71c7ntwKGUqMI3OlT2s9JQ8vFCUHebF8/RicShAjONF wmWcHE5a2F1QFveGS2bTiQAIX++Bn+0DuwaK0YkcWEMXONlX2dVb1a/ACcNgbmZkXwS1 ZoYg== 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=mVUBW7gzG57STeRQuoUMddA8z7kzpQl/IDX39P09vXs=; b=rf+ntlwvbvqGP/u1WdYRg2l813F4X39zdQscbxn41ybpzh4Zo7mUszcOefDgfNcZE/ uI7R3wm7/21lGwdD0Vt4ovQe+slixP9FO1oHFYpbs9KOFBgiMyW1wET0rB0BUfK+uWiI IVmPD704f7sYP5n1ku921ZT99S3xBIzU9cfwO+kYwAcIWtKBO5kzJtZp1eBU2Pj2HBOf 44kQAV5qAYnYx0722MY+KvMo0oJ4k+rkjEEyo+HZjpR2j7AKeK0x+xfIuQrZPf2jXrTM 5sfxx5EvLvVML0/A3ea5fHaFUy0GXxXBNZDKC1qJXuA9jH59IVQXojzRuIfyMFpLXtzE 3IXw== X-Gm-Message-State: APt69E2cnPcsjyjedF8Um0QiiOWLdaQry8WZpNP51ooIQXSS4YXPucEA Pxa7upxVbKMbABb+rCtaaI5UMIPE7j2MaaEg3N58l1Gigm8= X-Google-Smtp-Source: ADUXVKKzXht4b70W5/H8xC8WVPyM4L1Gvj2EMOJHnpafkY65WuQkJxPK+xnwZ6qDzCjAlHcUgRAbKq1Ety7kOO+hpc4= X-Received: by 2002:aca:d4c7:: with SMTP id l190-v6mr1548941oig.102.1528395337692; Thu, 07 Jun 2018 11:15:37 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::229 X-Mailman-Approved-At: Thu, 07 Jun 2018 16:20:36 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117025 Archived-At: Hey folks, With the release of Emacs 26.1 there is an option to create undecorated frames (without title, toolbar etc). This is possible by adding following code to your init.el file: (add-to-list 'default-frame-alist '(undecorated . t)) Or, for testing purposes, you can run it by starting emacs with as follows: $ emacs -q --execute "(add-to-list 'default-frame-alist '(undecorated . t))" After that, if you call toggle-frame-fullscreen, Emacs goes to native fullscreen mode and instead of resizing the frame to cover all screen it stays the same size as before toggling fullscreen, but with black space around. The other thing, if you are using applications like Spectacle (for quickly moving/resizing windows in macOS) or tile managers, then the Emacs frame is moved, but doesn't change the size. Does anyone know how to fix it? I've checked the implementation in src/nsterm.m file and tried modifying 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. It seems that my C/Objective-C -fu is not enough, so I ask for help. Just to make it clear, I've tried to test this using emacs provided by $ brew cask install emacs Version in 26.1 Would be glad for any advice/help. Cheers, Boris