From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Q4 - the bottom edge of Emacs doesn't stick to the taskbar Date: Sun, 15 Dec 2024 17:55:16 +0000 Message-ID: References: <2ff7232e-1643-8f64-8371-9c32dac343af@gmail.com> <86ldwhs7z4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12035"; mail-complaints-to="usenet@ciao.gmane.io" To: Eli Zaretskii , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 15 18:55:56 2024 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 1tMsqS-0002xg-Bp for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 15 Dec 2024 18:55:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMsq2-0002iO-1v; Sun, 15 Dec 2024 12:55:30 -0500 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 1tMspx-0002eJ-BP for help-gnu-emacs@gnu.org; Sun, 15 Dec 2024 12:55:26 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMspu-000125-N9; Sun, 15 Dec 2024 12:55:25 -0500 Original-Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BFFuD2v002876; Sun, 15 Dec 2024 17:55:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=h+ypfQ9sA0IK/vKWvORN5fBdTQLIt6JbNz37peFH/nk=; b= JR9NlhKup+Lm2Ep0+PhqtPadQtbr8HmBTVeF7soO/HOkJUM/7dGqMG7iYQTIqLqA oZMW7U4/w0+jHuF+739G6WieDEyGDgxKeKZGxqXHxHvWfRl3Qwoezd3LfvKGt0bE /fnra/aMB4rqZlTc3avGsUiFi9L2GMFlMknL6bHYbuZf8n6XQkbr9WiKMukeYxqZ lCfmC1X5YcFsvnqPN+ImDvKfE5LnNRXszsAlIjtbKfTwTy+zrc9WN19ZbQ78tiHu /Bgf7xQ/CShT47OAJYGjOtih9rHbHOKzw2CXhEBi/84XUbBtH5zZcYgdFplZHFt7 R0vI5SMWMwNFqO2Ymv0oow== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 43h22chs2t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 15 Dec 2024 17:55:19 +0000 (GMT) Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4BFH4v7e010902; Sun, 15 Dec 2024 17:55:19 GMT Original-Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2042.outbound.protection.outlook.com [104.47.51.42]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 43h0f68jck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 15 Dec 2024 17:55:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AkKtYzNWC2NTTDMTVNk+xb+K9lCMg6npNh3SVHTngYgYcf6iGh3N8AGphOIH4cs5lyhKJBbNa0eLqenrJdMf8FD5Vrbza7YY+A8u3qcGaheICVgXpEmS0St2Kw/ZuV7i9DQRUYTGvur50vy4nHwZac3/zX8epe78oX+f7yY5WNsb+dppshvYf/86tqna0UorsolwMEvo0GBHVFwgpz/p28CLFAaNeMQhX04BqamIfZnlDfh9p9FLKoQDMWUHC+vm8ybTssO32v5OP3Vx7DLrClqgJXUyC+rLgF5ssKRq4NUzY8b4tnwnuxACRK1EBa1Hto3fxtVCAPthvpp2Vg8WNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=h+ypfQ9sA0IK/vKWvORN5fBdTQLIt6JbNz37peFH/nk=; b=JJbc8SK3PLBM/Ft9rX0x3ni0vTaz/VO6r1Rgu3WMh9rUQkpaEAmT3/ab5GwBhpZM63GC+7BtyXyGcH44uNsgsiOhksLWEjE/imgBdQHyW4TABhk2msS6JHwhM6jX4KHKHr07vnsTZ/VA8cTx1lt9zEknRemr0yWGZYf8DJS3UlyusawAtvEa5bjWe781etETL5LQC9msQsiArqCqlNcZcmp+o1QDYrorBho2D9udH6Yq/ZTmaEp7xQiKekUwzOVE9qWoKUET3c8yIjfXnwi2SBfd+lL3ZDMlYWP5LihxWdW4ZCbdtoRCUoH02LaI0ZF02AhMbH3mdt1TmtkxR9C2gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h+ypfQ9sA0IK/vKWvORN5fBdTQLIt6JbNz37peFH/nk=; b=dApEdKJspG1MDAn+NEuYgGdBLQ/zMnu3t6nIfP6pWFIS3Vk1V4bojjYZf/d+Hk1LNv4ePx/UkRNHZdoRXEoFcvY+zmV0Ijirl5Hn7q+WhNcgL9S3DeZnNWxHoce4+FgmZ1217+jWeU+BBaqDgBhCgcQG0ZQL+jfvXh5e9TNxUXQ= Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com (2603:10b6:5:3aa::24) by DM4PR10MB6014.namprd10.prod.outlook.com (2603:10b6:8:ad::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.20; Sun, 15 Dec 2024 17:55:16 +0000 Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324]) by DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324%5]) with mapi id 15.20.8251.015; Sun, 15 Dec 2024 17:55:16 +0000 Thread-Topic: [External] : Re: Q4 - the bottom edge of Emacs doesn't stick to the taskbar Thread-Index: AQHbTsW8vXWYAh8sc0qKSq0xWDAeUbLnhKjQ In-Reply-To: <86ldwhs7z4.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR10MB5232:EE_|DM4PR10MB6014:EE_ x-ms-office365-filtering-correlation-id: d7b6156e-b028-4fab-0dd8-08dd1d31a21b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?puhIICJ+SILmgskA21/czjtgZUgo3FXGKU+jPvg8Qoqd+AG9aI5J/xfhO+xw?= =?us-ascii?Q?YyiDA7M3qcoiumGwWTJ0A1zfnrhAfX0gNfaMtdjjr4uVPVTewNa65Y/NZQ7c?= =?us-ascii?Q?Qp6+J7Dk7WuOqKLTRYPWRKqLgmZmx0/Me0SCPQuuioY6t+qELRPJjl2gSH9M?= =?us-ascii?Q?Z3TtHrfgscbfeBJzpZOQQ338wNBzn8GbXQXF3409Pg7TZov2ABbZI2rbpcaX?= =?us-ascii?Q?PcNS5gyefGWsfXyLZuZYEQb99bquU0xvhIG20mheZYPY2eCZMG50kvwKDt9E?= =?us-ascii?Q?Z2j/qmw3VWunQ/zXj+Y0+HoCyRwNAP8HAkWDxiGezVHmXkRNrj6ARpDo9/qA?= =?us-ascii?Q?wHAfgzzCSOki8dUrUTmJhItHm2PTXhlxVSpIry8E0vt+h7wZHj0/1u/3Z6xB?= =?us-ascii?Q?bN8qaD5qhE0mqivZS0NGq7ZhrQYfEFhXFUEH7aX7+WY5ZvQBeNhxCBrxe5j+?= =?us-ascii?Q?MxS0Y8hR2cgkoUE3OlABCrk4iEvELXacLF6NtFesDywg/Wp0s7IVPteWF/nh?= =?us-ascii?Q?1GUc7KsA6yl/lZDP2QYA2amleo97t9WXbokroh8QnV/lfjTSm2BeJRVkD+Em?= =?us-ascii?Q?mAR+K5DhIkDkZm6sSBWSL9+GNh9Hlf3QQOLGjUO5MoXEFASG7Pqk6dF8wsyO?= =?us-ascii?Q?j8sFj x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB5232.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YIdsSCGzZzx6SzqwmCKt1XAelLJrFxtsU/zlQrBfqeW6fbi7E4Y7rqb46mWI?= =?us-ascii?Q?vI8wqKMJfMwAnG/LOhG4xj936DxaS3i/udG33C8eKiNnsnpepPoGUAXWzzRg?= =?us-ascii?Q?T6hkTEQW9gvHoxYpTTrt0myQUXRTCvOI0GRTBA+AsF9QnCB0YOQpO4sg8Qj+?= =?us-ascii?Q?ZNXMdbX7fvTH+kr1AwqSchd9lT82U1hpA8/wJFovTKiKHOQthecO0er01BHs?= =?us-ascii?Q?BpsotN+h3G0FYD0gASIgxclj50Zysk5iHEGKzY4nIrpxZZfSRmH6WbfSsLA4?= =?us-ascii?Q?KRhjFkXev73nkbcFZWYwexEwW84dnxGRVuyJkf4gxkGST/XjamqnLKtIDSah?= =?us-ascii?Q?xyuB272ZJVtnGUDkaRsFddqurLUsw1jJD0p2AY2KjQGhcgQHR4teRE9mO/Mt?= =?us-ascii?Q?t1+JHf0ejeZ9oyUWruUnRTK/tte799ldot9+5Fyi0u6B5nyd5GYCiBe0CyF5?= =?us-ascii?Q?xTT7mbADkEJoq56ju7pYLmUBa68d1Xg13LHDCPKYrxSlMSEOzLZeyH0qf8lA?= =?us-ascii?Q?0aNBt0DVM7IQZqkCfMUVaf5RNI2VWooljGkOHYa4Kd7yPlLJgdFg0gxVc+wi?= =?us-ascii?Q?YxKMGiSNMxpsQS3pBMYs7CvBSKXaWlMpGwp/0m4f5F7hqQ3wY6o0EspimOUt?= =?us-ascii?Q?au X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: oKxQsqBdacoS1BA+6VWfDSVl6sjz+SnTSwOVzRlMjk/dOL7EB7RA2nihUVwSe6atL7ed1eB7aCsZmMJN2Qe0eXzF7WJN4zlPBanF9mR3r/oPBGsnw0LMp7+bf0crQ9P9AaM9XTit603jzQxWVSxRhUqIbqci6CR8fss5C9Yzx1AhusJgDRAarvrvxFp3MjPV4uWl5WcS2MpR9fJvkZI6N93rgEs/6NVuhzjiytMCDkhkarRI1Jv5oFYmBOw7Xz227kYWPxOmk/J0oszUzN3XoIXOFQKsmWDn+t/ZaWuVbNd68kZKNhZB139gYzd7HU2noUSNJ7W4s0azGVQA7OPg65AqkAbXHkOqiZHyiaTBoLgjvJDyVC9xkSRzJUDNOcB2dMV5bVoVqQIC7dcs//Ogs1YDdn/BW/x556LBB1papkOZI1U/SzNW1/Tw5fnSsh5hynE+ygbzBQyTNgbNikpQqtew/sT47lJNSb0P5UyZV+w6sSDoM4J69Z+b0OVSmPlWvXY945iZnzEqhXaL2493OoNQNFiH58uGy/4h5iAvo3qNh/ApiV4fxfnBxIs7+swImgUZupLS4lFhMFSXDj+tviNiK60C/eWbhQd+OIA3Imo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5232.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7b6156e-b028-4fab-0dd8-08dd1d31a21b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2024 17:55:16.6390 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: c5UtgZ7mfSMgbWfR6XU287Xe1E0d4BwtVqw0nAzqzHLgdvhqNofAh8+7OHDnNLIwLD7Iu+OFmKD/CkzT1dyriw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6014 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-15_08,2024-12-13_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412150155 X-Proofpoint-GUID: Y0feWo_0jbBp-H4dAEjaq-cPbVIsdm4e X-Proofpoint-ORIG-GUID: Y0feWo_0jbBp-H4dAEjaq-cPbVIsdm4e Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148812 Archived-At: > > > When I use this > > > > > > *(add-to-list 'default-frame-alist '(height . 1.0))* > > > > > > to tell Emacs be of all height, it takes it too literaly, and its > > > bottom edge is shown hidden behind the taskbar line. What should > > > I do to make it stick to the taskbar's up border? > > > > 1. Emacs knows nothing about the MS Windows task bar. >=20 > That's not true: see display-monitor-attributes-list. Yes (starting with Emacs 24.4). I tried to keep things simple in my answer. To take advantage of `display-monitor-attributes-list' in this context, I do this kind of thing (in `frame-cmds.el'): ___ `Non-nil option `available-screen-pixel-bounds' lets you set the upper left and lower right coordinates of the available screen space: (defcustom available-screen-pixel-bounds nil "Upper left and lower right of available screen space for tiling frames. Integer list: (x0 y0 x1 y1), where (x0, y0) is the upper left position and (x1, y1) is the lower right position. Coordinates are in pixels, measured from the screen absolute origin, (0, 0), at the upper left. If this is nil, then the available space is calculated. That should give good results in most cases." :type '(choice (const :tag "Calculate automatically" nil) (list :tag "List of (x0 y0 x1 y1)" (integer :tag "X0 (upper left) - pixels from screen left") (integer :tag "Y0 (upper left) - pixels from screen top") (integer :tag "X1 (lower right) - pixels from screen left" ) (integer :tag "Y1 (lower right) - pixels from screen top"))) :group 'Frame-Commands) With the default value nil, the screen space is calculated using `display-monitor-attributes-list', like this: (defun frcmds-available-screen-pixel-bounds () "Returns a value of the same form as option `available-screen-pixel-bound= s'. This represents the currently available screen area." (or available-screen-pixel-bounds ; Use the option value, if availabl= e. (if (fboundp 'mac-display-available-pixel-bounds) ; macOS-specific. (mac-display-available-pixel-bounds) (if (fboundp 'display-monitor-attributes-list) ; Emacs 24.4+ (let ((attss (display-monitor-attributes-list)) (x0 most-positive-fixnum) (y0 most-positive-fixnum) (x1 0) (y1 0) geom) (dolist (atts attss) (setq geom (cdr (assq 'geometry atts)) x0 (min x0 (nth 0 geom)) y0 (min y0 (nth 1 geom)) x1 (max x1 (nth 2 geom)) ;; Use `max' for the height too, but it does ;; not account for taskbar etc. y1 (max y1 (nth 3 geom)))) (list x0 y0 x1 y1)) ;; Punt. Assume only one monitor. (list 0 0 (x-display-pixel-width) (x-display-pixel-height)))))) But AFAIK, Emacs still knows nothing about the task bar _per se_. (Please correct me if I'm wrong, Eli, with some specifics.) You would need to get the actual size and position info from your Windows Settings. You can set the size using a new name, "TaskbarSi", under HKEY_CURRENT_USER\Software\Microsoft\Windows= \CurrentVersion\Explorer\Advanced. But perhaps, for a given Windows version you can rely on the default values. Then there's the title bar of a Windows frame. For that I just use 27 as the default value for MS Windows, in this option `window-mgr-title-bar-pixel-height'. But you can consult registry (key WindowMetrics, CaptionHeight =3D -15 * pixel-height) for the exact value you have. =20 (defcustom window-mgr-title-bar-pixel-height (cond ((eq window-system 'mac) 22) ;; For older versions of macOS, 40 might be better. ((eq window-system 'ns) 50) (t 27)) "Height of frame title bar provided by the window manager, in pixels. You might alternatively call this constant the title-bar \"width\" or \"thickness\"." :type 'integer :group 'Frame-Commands) This is what I use for the pixel height of a frame: (defun frcmds-frame-pixel-height (frame) "Pixel height of FRAME, including the window-manager title bar and menu-b= ar. For the title bar, `window-mgr-title-bar-pixel-height' is used. For the menu-bar, the frame char size is multiplied by frame parameter `menu-bar-lines'. But that parameter does not take into account menu-bar wrapping." (+ window-mgr-title-bar-pixel-height (frame-pixel-height frame) (if (not (eq window-system 'x)) 0 (+ (* (frame-char-height frame) (cdr (assq 'menu-bar-lines (frame-parameters frame)))))))) HTH. ___ https://www.emacswiki.org/emacs/download/frame-cmds.el