From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.help Subject: Re: Frame shifted upwards upon changing font size Date: Tue, 13 Sep 2022 13:22:48 +0000 Message-ID: References: <831qsf5x8j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26566"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , help-gnu-emacs@gnu.org To: uzibalqa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 13 15:23:28 2022 Return-path: Envelope-to: geh-help-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 1oY5su-0006j2-0n for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 15:23:28 +0200 Original-Received: from localhost ([::1]:40744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oY5ss-0001ww-N7 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 09:23:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY5sL-0001wZ-9v for help-gnu-emacs@gnu.org; Tue, 13 Sep 2022 09:22:53 -0400 Original-Received: from heytings.org ([95.142.160.155]:37458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY5sJ-0003ZS-Pz; Tue, 13 Sep 2022 09:22:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1663075369; bh=RDRgz1wa1Wwip5dJXha8t9ka0hSl7I4A8KoMfm7dRKs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=R39IKqtJ9/FVXbY61JRZ6w4iq43BuGcTdM1G5eLYi1mahMKbzAYHYqxfLk7t+Vp9i hsMkWosFEUFXN5WFyeQElj/1IF0J86Db2Vr1M0cD68uOS6pHzCbj4LLe/K/NzADlr2 qhbLPJA0q5bCbRXuWYddkKdSoy6Qm5Hsb9og5m182EOUrDi8jpEIeb8f7622RowmYI z9cVwg4jAj1pdR7QkHsN+WsQKA5zKk16m9aRiwc0z5YoLBsy0cY4T9xJfdysNvwB2i 37xR6VB6RTVfFQPRV7W+FJuzdDywr74muYdLm/6iW8TDIgX4dYrrvDY8gRPOIPZsVZ IIbtf+d8pM4dw== In-Reply-To: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org 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, SPF_HELO_PASS=-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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139445 Archived-At: > > Looks as if we need a new function that ensures the frame is centered. > (defun frame-center (&optional frame display) (interactive) (set-frame-position frame (/ (- (display-pixel-width display) (frame-pixel-width frame)) 2) (/ (- (display-pixel-height display) (frame-pixel-height frame)) 2)))