From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E9=99=88=E5=AE=87=E8=BF=AA?= Newsgroups: gmane.emacs.bugs Subject: bug#65183: 29.1; Child frame moving and resizing problems Date: Sat, 12 Aug 2023 14:55:46 +0100 Message-ID: References: <837cq3jmyk.fsf@gnu.org> <13c2f66e-861d-2ab3-6405-a2b57b29863b@gmx.at> <03272821-c79f-5e57-c368-f06baf050200@gmx.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004605150602ba303e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37117"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , 65183@debbugs.gnu.org, Eli Zaretskii To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 12 18:06:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qUr80-0009Vi-9t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Aug 2023 18:06:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUr7t-00061d-Iu; Sat, 12 Aug 2023 12:06: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 1qUr7r-0005zL-CY for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 12:06:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUr7r-0008JP-2b for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 12:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUr7q-0000jw-Tn for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E9=99=88=E5=AE=87=E8=BF=AA?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65183 X-GNU-PR-Package: emacs Original-Received: via spool by 65183-submit@debbugs.gnu.org id=B65183.16918563522819 (code B ref 65183); Sat, 12 Aug 2023 16:06:02 +0000 Original-Received: (at 65183) by debbugs.gnu.org; 12 Aug 2023 16:05:52 +0000 Original-Received: from localhost ([127.0.0.1]:56701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUr7f-0000jJ-MA for submit@debbugs.gnu.org; Sat, 12 Aug 2023 12:05:52 -0400 Original-Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]:60423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUp63-0000YG-8O for 65183@debbugs.gnu.org; Sat, 12 Aug 2023 09:56:07 -0400 Original-Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1c4d8eaa8ebso27602fac.0 for <65183@debbugs.gnu.org>; Sat, 12 Aug 2023 06:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691848557; x=1692453357; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6cxUeCQOy/8ONbXCt6Mwafy7/niEEpW/hsWNnTgcon4=; b=cSQWzEN9JO6o5tu1AjAk1bKChDSdhx1v9o09E8KBmLz4Rl64qVMnqS+wc+EUxVJjG+ 5dqe5vawjk/W5HkOiiW3euhnthL4KYxjJ1MSOT87d0RYXlw1Xfjm8QuZEFwBmTa8etcC 5+Wg63EOgSiF+yrcSMmK/dtP2Ov4sbXaqRoGxSH2cCxbGWPj3VIeYGzwIJ8c4Qwfac/D G9o6gsae7TpIC/6gvSGekxnu6ZMvT0/smQ+hi1g7eH7tzyULT1T7pG8KmJHxq+Dl1lWX meeTQ4SPcW947MEnwC9iYg0rTQifr1DwedJ0cWW0YyMftUJmt5RFJBrMyriTIko+vHCz imsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691848557; x=1692453357; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6cxUeCQOy/8ONbXCt6Mwafy7/niEEpW/hsWNnTgcon4=; b=NT1sPnUTpriA3oGOd/bsGzpfY5BabuvXHE/v+LP/5cz/d7hMU/Fv2ewfGo7ou31QEj FRFs5TaBdYbhyBvU45JO4UiySfTvZy4twDrYoseevw8mincJLQoUJjvbs3ie8WdOTZmq bBuycfMHJK8GI7UsuIMu9EIUWeaYwmWiHkkYrPxXBujtEtQ1sEt8Lc1yzvco3D0mtMiT ucGI+NXxU/ClDZlZFeGbUIfgEzbTJnySeueOJz2TEPaXjACy+5/F3NubAeSk7q2NkEGL mOb21VfWfV061rjKIeK6Qw3TLysphTHpf8DP3pf48kIWuEgJg3i2ev12RIZJ25dqViJF 2A9w== X-Gm-Message-State: AOJu0YzLUDm7kTeW0E+HNO7zvKLdN5fa064HLRni33tN5PhASY0BhoNC suyQzUa5YALWOdW1jARZnESqbtNlL1nJBtqIa38= X-Google-Smtp-Source: AGHT+IExIg4vgx7ohhcgIGvWnkN9+3kQgh9af+iPYTt3F4q6QPIvqKNQgF0hFdsO/7dKfw1rzCOvz71IBgVsVGwHq1Y= X-Received: by 2002:a05:6870:9629:b0:1bb:a3a8:c7c1 with SMTP id d41-20020a056870962900b001bba3a8c7c1mr5701002oaq.24.1691848557330; Sat, 12 Aug 2023 06:55:57 -0700 (PDT) In-Reply-To: <03272821-c79f-5e57-c368-f06baf050200@gmx.at> X-Mailman-Approved-At: Sat, 12 Aug 2023 12:05:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267314 Archived-At: --0000000000004605150602ba303e Content-Type: text/plain; charset="UTF-8" Of course, I'm happy to try writing this. But there is one thing that I don't know what the best solution is: how to reuse the code in the function `adjust_frame_size' (defined in src/frame.c, used by `set-frame-size')? I want to add two arguments: `new_x' and `new_y'. When `new_x' and `new_y' are the same with the current frame position, execute the original branch (`set_window_size_hook' or `resize_frame_window'); otherwise, call a move and resize function. But I have to rename this function to `adjust_frame_position_and_size'. For compatibility, I will also create a wrapper function called `adjust_frame_size', in which `adjust_frame_position_and_size' is called with the current frame position as the last two args so that the frame will be only resized but not moved. Do you think this is an appropriate solution? --0000000000004605150602ba303e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Of course, I'm happy to try writing this.

But there is one thing that I don't know what the bes= t solution is: how to reuse the code
in the function `adjust_= frame_size' (defined in src/frame.c, used by `set-frame-size')?
I want to add two arguments: `new_x' and `new_y'. When=C2=A0= `new_x' and `new_y' are the
same with the current frame = position, execute the original branch (`set_window_size_hook'
or `resize_frame_window'); otherwise, call a move and resize function.=
But I have to rename this function to `adjust_frame_position_and= _size'. For compatibility,
I will also crea= te a wrapper function called `adjust_frame_size<= span class=3D"gmail-ryNqvb">', in which
= `adjust_frame_position_and_size' is called with the current frame posit= ion as the last two args
so that the frame will be only resized b= ut not moved.
Do you think this is an appropriate solution?
=
--0000000000004605150602ba303e--