GNU bug report logs - #61710
30.0.50; frame parameter `(fullscreen . maximized)' does not work with PGTK and emacsclient --create-frame

Previous Next

Package: emacs;

Reported by: Alynx Zhou <alynx.zhou <at> suse.com>

Date: Wed, 22 Feb 2023 14:56:01 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #17 received at 61710 <at> debbugs.gnu.org (full text, mbox):

From: Alynx Zhou <alynx.zhou <at> suse.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61710 <at> debbugs.gnu.org
Subject: Re: bug#61710: 30.0.50; frame parameter `(fullscreen . maximized)'
 does not work with PGTK and emacsclient --create-frame
Date: Thu, 23 Feb 2023 01:28:27 +0800
On 2/23/23 01:11, Eli Zaretskii wrote:
>> Date: Thu, 23 Feb 2023 00:34:43 +0800
>> Cc: 61710 <at> debbugs.gnu.org
>> From: Alynx Zhou <alynx.zhou <at> suse.com>
>>
>> On 2/22/23 23:31, Eli Zaretskii wrote:
>>>> Date: Wed, 22 Feb 2023 21:27:42 +0800
>>>> From:  Alynx Zhou via "Bug reports for GNU Emacs,
>>>>    the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>>>
>>>> This problem could be reproduced with those minimal steps:
>>>>
>>>> 1. `emacs -Q --eval "(add-to-list 'default-frame-alist '(fullscreen .
>>>> maximized))" --daemon`
>>>
>>> I think any customizations that need a real display should be done
>>> from server-after-make-frame-hook, not at startup time.  Did you try
>>> that?
>>
>> Well, I did not try the hook, however, I think first this just adds
>> default parameter, and it actually makes effect when `make-frame` is
>> called, at that time client already sends server its display. Plus, GTK
>> allows to set maximized before window is shown, this means the window
>> will maximized once mapped, which is just what I want.
> 
> But what exactly "maximized" means depends on the display geometry,
> and the daemon doesn't have access to that, since it doesn't
> initialize the X connection.
> 

I've read server.el for the whole afternoon, and I think when 
`make-frame` is called, Emacs server already gets Wayland Display from 
client (this bug only happens in Wayland as I mentions).

And actually Emacs doesn't need to get display geometry before maximize, 
in Wayland it works in this way: a window requires to maximize to 
compositor, and compositor decides to make it maximize, it will then 
send the width and height to window via configure event, and all of 
those are handled by GTK so I don't think Emacs should take care of 
those actually.

Plus, if I don't open file via emacsclient (just call `emacsclient 
--create-frame`), the newly create frame is maximized properly, so I 
guess that it is not a display related issue.

>> I also tried the X11 GTK version, it does not have this bug.
> 
> Then maybe the problem is not where I think it is.  Sorry.

Nevermind, I am appreciate that you take time on my problem. :-)

Alynx




This bug report was last modified 2 years and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.