From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#9366: Display geometry change hook Date: Mon, 21 Sep 2020 09:26:01 +0200 Message-ID: <5d5c2107-f7bf-62b1-85af-4acac89c7ce6@gmx.at> References: <4E55DACA.6080401@harpegolden.net> <87363dpyz3.fsf@gnus.org> <838sd53h9c.fsf@gnu.org> <0984dc8a-220f-c461-3888-435c4046f803@gmx.at> <837dso25el.fsf@gnu.org> <1a7ac173-93b7-292a-3dc0-05c68c5be414@gmx.at> <83tuvszjs0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21783"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 9366@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 21 09:27:57 2020 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 1kKGEv-0005Z0-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 09:27:57 +0200 Original-Received: from localhost ([::1]:51982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKGEt-0000tN-N1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Sep 2020 03:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKGE2-0000t1-Bh for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 03:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKGE2-0001GF-2S for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 03:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKGE1-0008Li-VG for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2020 03:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Sep 2020 07:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9366 X-GNU-PR-Package: emacs Original-Received: via spool by 9366-submit@debbugs.gnu.org id=B9366.160067317432022 (code B ref 9366); Mon, 21 Sep 2020 07:27:01 +0000 Original-Received: (at 9366) by debbugs.gnu.org; 21 Sep 2020 07:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:53245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKGDG-0008KQ-F2 for submit@debbugs.gnu.org; Mon, 21 Sep 2020 03:26:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:56537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKGDE-0008KD-Ds for 9366@debbugs.gnu.org; Mon, 21 Sep 2020 03:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600673163; bh=aHoEahucH/3elQ8KDBLiXw2+vpY+5hSGPEMO8F7UmVE=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=CH3zZb4DwYB5Qy4m7zcSE15yXXi9/NmH/U/w/dIPhf/Qt7+kYAKeaOH7Tm99ZF6sj hltD/z7ZOi+xAVVQSb9P2iED2MKYSo65oeVUb8kJ+VWAteJ9udwdKW96VFtj6UtLYL vTi7+FPKibtW9aot+hWNH44flKCTIiuaB+ET5aK0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.38]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McpJg-1ku9Bx1oaA-00a0CY; Mon, 21 Sep 2020 09:26:03 +0200 In-Reply-To: <83tuvszjs0.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:vF23aUGR3lmPnXx2gguyXfH5/9xYrUySbaVic84dIorNZPWrz8n L/0ijt4iGIvj/z/w10ZFxuGaQz2sUMblVKGd6lmta7Ddg2J2GLyb10UCO0HZ7puiJe6mLPS KKohSQLL/qYxWINAXVKjn3YxciLb39q5kyDoz6mEJd+15o2bTN04C7SUpOMP/rQbevgNMYW eeDJYvxPuEc4edPnaIAIQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:GSbN2poy5Ts=:MmY6fyGx3Nn9LOC+uQKlc2 pRWinW2kQINLJdNwrsXgdKyajBuaZzxbVx1jNqmiyMxIKRq90JCmSpbaNmBO2ufsvShENNr8n 7mZzqqNARyeNRvmrOKwl+BBWIAI/3rpl+l6FPBeYxUjUX+0r+8K6SdVnwDt6OvUQhhAyZXy+K np4Xj7Ojn2LIuPrWUIWnQfRtxTvg0dDT8v71Q29bGuk53Mrb76oRD56q7/SxcxANpJABcSYPw O+hCLyES8gcmC+nRh0FN1ysYjXQHuvVYBaed4qfi1Ga/vlPjh0Xlmm2jBRrmPfTxe7J4/Kg3s H7wiMs39/32eAV4vAWd1AG9W/rUIXQ2D6emRyVAF7YWHVl9BQ9bzltIg4Ruo8PGN+KyAMnPm7 AhxDinLzD1M4R6Z1AYdQShWSXRmbanKcuRYK7nGgrMlRC/GqFA4syGxm9mskDZ4oY1ae3u26J 8JhTfI1p5kTSHSiSZMvXn9yLvEntOvKT14KkOsYrlLVeu6xLGK+tJyGxb5TDYYlOMIO0gNMU6 eOQ4f+Ucd7UINMzQeKUR1QugWMxO9s9jHzlfHfiziuVjNyi26vtaFg2fdSMWiTb7oGmmVKkUv sI0wxdk4cW/DUf/48uSmAiMxDb8MIxMWAqZKJXUIEzKasfE/1d8pi990M/pM0YOEx4tlFknUh 4PcSIaesldbOxP5oWYMwPsZqfL+zGfu+YAndinpqJBcA0+U2hL4Ui75yg7kAt1tjHHPC4ZnLv 5lIqHtwhFpQ7X3PrhewTM8r34QyHpWgXKi1rFCWh3pR+qCvRL16TPJSS4FTTZGR614cRDntm 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" Xref: news.gmane.io gmane.emacs.bugs:188556 Archived-At: >> > Would it work to test the display geometry from focus-in-hook? >> >> Sounds expensive > > How so? Is the API which we use to determine the display geometry > expensive? I meant expensive in the sense that Emacs would poll the display geometry in every focus event with maybe a handful of people ever making use of it. > Any quantitative data about that? > >> And what about a user who currently has no frame on that display but >> might consider switching to it when its geometry meets certain >> requirements? > > Is this an important use case? I don't know. I never plug a monitor into a running session. >> > Or >> > from a timer? >> >> To poll the geometry? Sounds much too expensive too. > > Same question as above. We currently have several timers running in > every session, so a timer that ticks, say, once a second doesn't sound > too expensive to me. Especially since this will most probably be an > optional feature. You mean when the value of 'display-geometry-change-hook' is non-nil, for example. >> If and when the underlying windowing system informs us of display >> changes, I would just react to them. What's speaking against it? > > The proposed solution was only for X, and using an optional component > at that. I'd rather find a solution that would work on all supported > platforms and required no special APIs. But it would probably rely on 'display-monitor-attributes-list' and thus use its APIs. And on Windows, for example, the "special" API is already there in WM_DISPLAYCHANGE and I suppose the other platforms should be able to handle fullscreen frames after a display change in a similar way too. In either case it's no great deal. I won't implement it because I've sworn to never change the resolution of a running system again (once an xfce Debian here insisted for weeks to come up with a 640x480 screen resolution because it did not trust my monitor's repeat frequency) and master still struggles with the (funcall eldoc-documentation-function) issue. martin