From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: [C source] What is gravity and the change_gravity argument? Date: Fri, 08 Jul 2022 21:05:17 +0800 Message-ID: <8735fb4uwi.fsf@yahoo.com> References: <87wncn3hhr.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 08 15:07:34 2022 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 1o9nhm-0003vA-2D for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 15:07:34 +0200 Original-Received: from localhost ([::1]:59546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9nhl-0003sO-3L for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Jul 2022 09:07:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9nfn-0000nS-Pq for emacs-devel@gnu.org; Fri, 08 Jul 2022 09:05:32 -0400 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]:44723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9nfm-0004dh-4m for emacs-devel@gnu.org; Fri, 08 Jul 2022 09:05:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657285527; bh=bHNftBjzonGRvowlfQNY5ypyTzCy9vNZg8pgOLtkQuU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=PLnLpe7lr3XIdu4AJqERGdc6Y2iQIzO0pe+b8P5Yc8Snm7TKJi26M1Nww+9ih7/ArKSj+EQMHwslkX/JG6x0NrIR6dtkuROh0pnd3bPwIvG3VCcydHopH0m2jtlgX2mbJrTasmaFKOYHrBfqJZ0ZsFtgtnh4RR8uHuumQ1vIDz8Npk6eAuPSRs7ffZwBPqYDhEeEON5zsYPWIy4blsvjaP9EOn1D4l/IqxlntFXcpLJIF7/UA1WIyKQ5wqyTWnEvoPCNb2Xq7ozznZYo6Cefa2BT1A1hQCGzeOXViDEpCe4YC6L40Mtg+cdTegW8oiZIxkTHoR36V7OtY1TphC0SLA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657285527; bh=BLWANaZnmttHoN/mXp4HmJX9JNdKnzWWnlcAMd415S1=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GebF3V5cEZCDohD3iRpZp7pBJEGl7TkI0Hr342Y9KgQK5k6HeSXnHMIPHTTYFLo1EcOyDx1DDdKF/zudyxPMyJ6r5cpv7Ou3qtVLqcCL5LUBPbFG/mFrHZGiSRRP8wQ0rMD2WkfMy8t/b5eZ3MWJf3TWR0qAWERcgJRAAhYwAFCAFNHUP0afEPLc/Lsq5TebvNTdY5Mdp25T5uyvo3a5xwKvz2NKWR/90VwSo2LP8/FZaxqdMSNqM2NuiREQZ3kqy+K7P5noVKGTk90GMI27cisqx8dv5LdyTsbVGs01wZRlq1cQOtcB5Ka76p7FM99SuHoOmgt95eIqfhk2rDyffA== X-YMail-OSG: .KIsB.MVM1l_Hy_WuwzbOQ9KS8hm6bYmpAdMzLN7NZKYk3oUSClYCcQ2BNkc1oU GJxSswk6KbZltiiVeRcqSV6mbPGrDoLtNR8jKXh42e3X1fsNI.CJRIasM5sjG21ZhhrEzEVQXfGF ZNZpeT_Nqs18BhLsqjNgClqDdj76BlY7yZDJxrzf3WuRZiO.LcHR68LcFcu6_WgvL41DeRV9VHoK DwXcHVkz0fdYM.s9D2rS24ysIAOT_TPz3BuenxigcB2TK6w70vyaQBZ6vGjvlkECjtQ5M6D.QC.1 Ac8Lj5sKJYDrxq3sAnV.dBJtVVxP3SO.tMSAxEzaPuL4JPxjh3.vXjRY7WKGbk1vtrxR5fwRnpW0 nI3ECbWI0Zw.dNBoasJYvz0CoYCr2PSrwIHTditj7S_ZjXqyI85wMcKjHb4QIkUA8YEK2jvp8a.G 6_nVwNsuHRNxcixRKKetbsNgZhycN4mwghiO6WaBfTcXHZBVOuNJygSL273heQRvDVIPCX6ZkFUJ UqrqUxHNNrHVVT4Yb1xJY_85QboCxCBjYUezm9vGeEt0DYdYDG91fNI24rQwdj4wKwXlv7B9wuMM 3GWMzynS6J_o2NZEGBFr90zYfgRgUqpsQEK7KSHfU8CMpR6T4RgCKtKn_3XxRu7dnj_83j2lM41d hebUJlV2fnoudlsFK5IHTTo.pdEI6UV5HwE88oT8voGBBfDfrNUxRxahS7SU037OtNATl6sK1ZrJ yJDGmKyg7hO.Jb7LReEu8uqK7UpZ3F9LjcbMdaaWIiP6XD.8Wk8KkLmi4k1blRgGcCA_e4QhLReC wKlwJQH5gJrSoegWt1PebRAKE8jQaPCTq3FsJPrRgE X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Fri, 8 Jul 2022 13:05:27 +0000 Original-Received: by hermes--canary-production-sg3-67975bbd4b-w2clr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b9a4a27f83cd5eafc7583f0950b08848; Fri, 08 Jul 2022 13:05:21 +0000 (UTC) In-Reply-To: <87wncn3hhr.fsf@disroot.org> (Akib Azmain Turja's message of "Fri, 08 Jul 2022 18:40:16 +0600") X-Mailer: WebService/1.1.20381 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:291959 Archived-At: Akib Azmain Turja writes: > X and PGTK uses that 'change_gravity' argument, I can't understand what > they are doing with them. I searched the internet and found several > answers[1], but couldn't make any sense. `change_gravity' means to actually change the position of the frame's outer window, and to reset the window gravity to NorthWestGravity. If it is 0, then we ignore the value of xoff and yoff, preserve the current window gravity, and simply restore the previously set frame position. X has two gravities: the window gravity and bit gravity. The window gravity defines how a window is repositioned when its parent is resized. The bit gravity describes how the contents of the window are moved or obscured when it is resized. I think the values are quite self explanatory.