From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about child frames + menu bar Date: Tue, 17 Sep 2024 16:25:12 +0300 Message-ID: <86bk0mbefb.fsf@gnu.org> References: <082cd34e-0b45-4376-a6db-eee7e016bb4a@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Gerd =?iso-8859-1?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 17 15:26:17 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqYDg-0002Bs-SX for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Sep 2024 15:26:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqYDV-0003VC-OR; Tue, 17 Sep 2024 09:26:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqYDU-0003V3-Hg for emacs-devel@gnu.org; Tue, 17 Sep 2024 09:26:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqYDT-00018R-RF; Tue, 17 Sep 2024 09:26:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SiSkE/3/d6ZUHb8Ns9/SSr3VcQFGOMGr6N7GMt4jVtU=; b=evFHLmKa1YYv4+ZnKUER lPRtlAmdVywIuv7STmjCbO1Uc3PZLYooJ0FEaVbv2jhBD6K7WgDnakq0+Pt9M+mN6YvEC9jXmNndi yI/P0zZ+cKz0VYWs1nNM1QUS5yx81BgrxOcszQbTSg88bukr+05TDn/qCWMYqmw9Orj4qkJix0DB1 T++0+PVrF47V4ivj/FlMHZHkugd5aeTCvBz4GV0PCva0a+ZSg81J8aUYhV81SYMj6CAzXcfyK1lfn o2hwbr6y6YR6jrMQBhziFoTsLnjbCTVShgNU/htavVXdSemH5LVAKEJW34jpdP/dAc74f370v0OtP EfLRtN48svzvcA==; In-Reply-To: (message from Gerd =?iso-8859-1?Q?M=F6llmann?= on Tue, 17 Sep 2024 12:47:24 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323694 Archived-At: > From: Gerd Möllmann > Cc: Emacs Devel > Date: Tue, 17 Sep 2024 12:47:24 +0200 > > martin rudalics writes: > > >> Do you perhaps remember what this change was about? I read the bug that > >> the commit message references but couldn't figure out how this bug is > >> related. Or, maybe, is there something special about menu bars on child > >> frames, like they may not have a menu bar, or something? > > > > As far as this change for the selected frame case > > > > - update_menu_bar (sf, true, false); > > + > > + if (!FRAME_PARENT_FRAME (sf)) > > + update_menu_bar (sf, true, false); > > > > is concerned, I can only guess that when I tried to fix the bug above I > > noticed that we did call update_menu_bar for the case that the selected > > frame is a child frame and tried to avoid that. The rationale was that > > when I implemented child frames, I noticed that menu bars don't work > > with child frames under X while they worked well on MS Windows. Now at > > that time there was a strict policy that we were not allowed to > > implement features that worked on non-free systems only. So I switched > > off menu bars in child frames everywhere and made the change above to be > > on the safe side. > > Thanks, that explains it, I guess, although on macOS child frames seem > to support menus, heaven knows how that works. > > > If you want to implement menu bars on TTY child frames, you probably > > will have to special case that here and maybe in other places as well. > > Hm, not sure what I should do. > > On one hand, I could suppress the menu bar on chlid frames in some way, > which would hopefully be easy (haven't looked, but maybe not accepting > menu-bar-lines changes to non-zero. > > Or I could make the condition "!PARENT_FRAME || on tty" plus fix the > menu position bug. Should also not be too difficult I guess, but a bit > more work. > > Any preferences, anyone? Are menu bars on child frame useful? what for? If they are not very useful (and it seems like they aren't given that we didn't have too many complaints), then I guess leaving them disabled on TTY child frames would be okay.