From unknown Tue Jun 24 06:53:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22549 <22549@debbugs.gnu.org> To: bug#22549 <22549@debbugs.gnu.org> Subject: Status: 25.0.50; Tooltips placed outside of screen limits Reply-To: bug#22549 <22549@debbugs.gnu.org> Date: Tue, 24 Jun 2025 13:53:25 +0000 retitle 22549 25.0.50; Tooltips placed outside of screen limits reassign 22549 emacs submitter 22549 ofv@wanadoo.es (=C3=93scar Fuentes) severity 22549 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 03 23:05:29 2016 Received: (at submit) by debbugs.gnu.org; 4 Feb 2016 04:05:29 +0000 Received: from localhost ([127.0.0.1]:58635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRBAf-0002yh-In for submit@debbugs.gnu.org; Wed, 03 Feb 2016 23:05:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34239) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRBAd-0002yV-RS for submit@debbugs.gnu.org; Wed, 03 Feb 2016 23:05:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRBAX-00060E-V0 for submit@debbugs.gnu.org; Wed, 03 Feb 2016 23:05:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRBAX-00060A-S3 for submit@debbugs.gnu.org; Wed, 03 Feb 2016 23:05:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRBAX-0004kq-26 for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 23:05:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRBAS-0005zJ-2e for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 23:05:20 -0500 Received: from smtp10.acens.net ([86.109.99.134]:31125 helo=smtp.movistar.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRBAR-0005xD-OK for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 23:05:15 -0500 X-CTCH-RefID: str=0001.0A0B0203.56B2CDF4.0051, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56623BC804C0FE52 for bug-gnu-emacs@gnu.org; Thu, 4 Feb 2016 04:05:08 +0000 From: ofv@wanadoo.es (=?utf-8?Q?=C3=93scar?= Fuentes) To: bug-gnu-emacs@gnu.org Subject: 25.0.50; Tooltips placed outside of screen limits Date: Thu, 04 Feb 2016 05:05:07 +0100 Message-ID: <87zivh2k98.fsf@telefonica.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) emacs -Q M-x toggle-frame-fullscreen Place the mouse pointer on some element of the mode line and wait for the tooltip. The tooltip frame is partially invisible because its top left coordinates are determined from the mouse pointer position and, as it is positioned near the bottom of the screen, there is no room left for the tooltip. A tooltip may also be partially hidden because it has no enough horizontal space when the mouse pointer is near the right edge of the screen. The MS Windows port places the tooltips taking into account the screen edges. In GNU Emacs 25.0.50.29 (x86_64-unknown-linux-gnu, X toolkit) of 2016-01-21 built on qcore Repository revision: 5293d1bdb3e665a565af032a163004c976328cc2 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 System Description: Ubuntu 15.10 Configured using: 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid' Configured features: XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB LUCID X11 Important settings: value of $LANG: C locale-coding-system: nil From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 10:55:54 2016 Received: (at 22549) by debbugs.gnu.org; 4 Feb 2016 15:55:54 +0000 Received: from localhost ([127.0.0.1]:60440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMGA-0000qt-My for submit@debbugs.gnu.org; Thu, 04 Feb 2016 10:55:54 -0500 Received: from mout.gmx.net ([212.227.17.22]:60435) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMG9-0000qg-6m for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 10:55:53 -0500 Received: from [192.168.1.100] ([212.95.7.3]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LoJDJ-1ZpoaX0x6v-00gIrv; Thu, 04 Feb 2016 16:55:44 +0100 Message-ID: <56B3747B.1000303@gmx.at> Date: Thu, 04 Feb 2016 16:55:39 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= , 22549@debbugs.gnu.org Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> In-Reply-To: <87zivh2k98.fsf@telefonica.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zGVdJcoyFLp1lodhTjOQI+4O/VA88zqMdkMYCQD/wdVCk67wHFq XdwCXbFI4uuPJu8evFbVLtgp8CgJ3MLxE1vfiNGFEmDkzWr9me6cZdlqktibzm+nGb4Tj7C w0yenv2arttvt9qz5iPPGi0JIp/ZIOduV7X98YzGLOtb7gmV0jHp9Zq6wcgqEwJsCDqxI2R EuKhRsjEyV8uZu5NZeZOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:xHkIqOIyHQM=:qTpxMTEJmetGMhuBQ0RNqv gEpxuRcGGlT2VpuD8HlzTEzfMzy0uvKFory6++HnOJD0NqjvnAAeFp+7FNwM8SJ+6mHL311N3 j5CLCqnv5P8KGcvcfdMFjvOkg3Norr61YnR2ODqqUmsTJbTA4ia+JbrcI+6s0bJs9IbYkNtpu yJaIK6BA7cnNK+YX1tOmiiU7v0ItrXZF2OTiAGjmxiuPv/Eh1w9ngi1TU0Q7fF/+LJ4spI/ao Of6Gc5hy0mNMCtJodhBweUA0yorjQJ725tOnc92Kk7scmb51CDm82VFPyDPuTaqJzoYbNvWK+ i91vFtHj7jLGblZ+DePRyvcKDMqzsxtMF1q/lDEnHfSvPEptv73JGOVAoaCCHw2MpmhC+fiG/ v4uOYc8CMTFjBtwaHbFBPjLxIhk53Z6q91BJJUAS9R/wueVvCQvFFI1A+1hynyswey8h9B0Ib leMZOCalgjqKo+jafFu6be1s2n9AV61vCDh+7Z7MGYd/BkoISGiBViPHqDxyKWIkYtOgLL6K3 +alu6e4xOkIaD/cuINX0huDLGURRk+pYIAJfm1NwtdobHeHp/INv8XQKKq5q+kBjnUnZ1kMU+ Gsn/5Eap8hgJXYKGzwvgmbv9ftFlOtqCGWEiz0fU8hc9pT0ECC4AqzmyDRv1v1Kaiowi8BuxP vPKT8RwZTVNIL0+BVJVxLQKKiEaGUWy6RQNfCw78qTKEWUcDpFohGtdoO3M9nW4BEE+fHvgkJ ktMsNf0W/jjcj44H9J0SQzdvlKzhp26RCfmr3kZgAmgria1XYvTapbKFinbovbC52RIMG/UtQ 6OH7pAtmc6okxKCHlVKJze+rTQhpw== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > emacs -Q > M-x toggle-frame-fullscreen > > Place the mouse pointer on some element of the mode line and wait for > the tooltip. The tooltip frame is partially invisible because its top > left coordinates are determined from the mouse pointer position and, as > it is positioned near the bottom of the screen, there is no room left > for the tooltip. > > A tooltip may also be partially hidden because it has no enough > horizontal space when the mouse pointer is near the right edge of the > screen. I cannot reproduce this. In any case the calculations for the x- and y-position of the tooltip take into account the size of the tooltip and the width and height of the display as can be easily seen from the code of compute_tip_xy. If you see any truncation of a tooltip at a certain position, please step with GDB through the respective part of the code to find out what happened. > The MS Windows port places the tooltips taking into account the screen > edges. So does the Lucid port. Something else must be at work here. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 11:20:57 2016 Received: (at 22549) by debbugs.gnu.org; 4 Feb 2016 16:20:57 +0000 Received: from localhost ([127.0.0.1]:60446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMeO-0001R8-Ot for submit@debbugs.gnu.org; Thu, 04 Feb 2016 11:20:56 -0500 Received: from relaycp04.dominioabsoluto.net ([217.116.26.100]:52519) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMeN-0001Qu-52 for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 11:20:56 -0500 Received: from smtp.movistar.es (smtp08.acens.net [86.109.99.132]) by relaycp04.dominioabsoluto.net (Postfix) with ESMTP id 7960B643D1; Thu, 4 Feb 2016 17:20:48 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0205.56B37A60.0199, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56A8ACDF00A5118D; Thu, 4 Feb 2016 16:20:48 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> Date: Thu, 04 Feb 2016 17:20:47 +0100 In-Reply-To: <56B3747B.1000303@gmx.at> (martin rudalics's message of "Thu, 04 Feb 2016 16:55:39 +0100") Message-ID: <87r3gs30rk.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: >> A tooltip may also be partially hidden because it has no enough >> horizontal space when the mouse pointer is near the right edge of the >> screen. > > I cannot reproduce this. In any case the calculations for the x- and > y-position of the tooltip take into account the size of the tooltip and > the width and height of the display as can be easily seen from the code > of compute_tip_xy. If you see any truncation of a tooltip at a certain > position, please step with GDB through the respective part of the code > to find out what happened. > >> The MS Windows port places the tooltips taking into account the screen >> edges. > > So does the Lucid port. Something else must be at work here. I think I know what is happening. I have two monitors, side by side, simulating a continuous display. The monitor on the left side, where Emacs is displayed, has a vertical resolution of 1050 pixels while the monitor on the right side has a vertical resolution of 1200 points. Emacs is using the vertical resolution of the virtual display (the largest of the two monitors, i.e. 1200 points) instead of the resolution of the monitor that hosts the Emacs frame. Something similar happens for the horizontal overflow: the dimensions of the virtual desktop are used instead of the dimensions of the monitor. I've seen similar issues on the past for other applications, and they were fixed, eventually. The key here is that, while the two monitors belong to a single desktop, it can't be considered a continuous surface. For instance: the window manager never gives to a window a default position that makes it overlap over the two monitors, unless the window is so big that doesn't fit on one monitor. Ditto for maximizing: windows maximize on one monitor, not on the whole virtual desktop (Emacs does this right, so it already knows how to query the resolution of the current monitor.) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 11:43:47 2016 Received: (at 22549) by debbugs.gnu.org; 4 Feb 2016 16:43:47 +0000 Received: from localhost ([127.0.0.1]:60496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRN0V-000223-0v for submit@debbugs.gnu.org; Thu, 04 Feb 2016 11:43:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49943) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRN0U-00021p-0B for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 11:43:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRN0L-0003Rf-Ii for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 11:43:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRN0L-0003Rb-Ew; Thu, 04 Feb 2016 11:43:37 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4310 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRN0K-0003T0-0t; Thu, 04 Feb 2016 11:43:36 -0500 Date: Thu, 04 Feb 2016 18:43:21 +0200 Message-Id: <83vb64whna.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?=D3scar?= Fuentes In-reply-to: <87r3gs30rk.fsf@wanadoo.es> (message from =?iso-8859-1?Q?=D3s?= =?iso-8859-1?Q?car?= Fuentes on Thu, 04 Feb 2016 17:20:47 +0100) Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22549 Cc: rudalics@gmx.at, 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > From: Óscar Fuentes > Date: Thu, 04 Feb 2016 17:20:47 +0100 > Cc: 22549@debbugs.gnu.org > > >> The MS Windows port places the tooltips taking into account the screen > >> edges. > > > > So does the Lucid port. Something else must be at work here. > > I think I know what is happening. > > I have two monitors, side by side, simulating a continuous display. The > monitor on the left side, where Emacs is displayed, has a vertical > resolution of 1050 pixels while the monitor on the right side has a > vertical resolution of 1200 points. Emacs is using the vertical > resolution of the virtual display (the largest of the two monitors, i.e. > 1200 points) instead of the resolution of the monitor that hosts the > Emacs frame. > > Something similar happens for the horizontal overflow: the dimensions of > the virtual desktop are used instead of the dimensions of the monitor. I arrived at the same conclusion by looking at the X code: the APIs called by x_display_pixel_height and x_display_pixel_width return information about the entire virtual screen, not about the current monitor. We need to use different APIs in the case of tooltip positioning. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 12:06:12 2016 Received: (at 22549) by debbugs.gnu.org; 4 Feb 2016 17:06:12 +0000 Received: from localhost ([127.0.0.1]:60526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRNMC-0004BM-MI for submit@debbugs.gnu.org; Thu, 04 Feb 2016 12:06:12 -0500 Received: from mout.gmx.net ([212.227.17.20]:53909) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRNMA-0004B9-Ld for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 12:06:11 -0500 Received: from [192.168.1.100] ([212.95.7.3]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MZlEg-1alncN2iZq-00LY1K; Thu, 04 Feb 2016 18:06:01 +0100 Message-ID: <56B384F4.8040208@gmx.at> Date: Thu, 04 Feb 2016 18:05:56 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> In-Reply-To: <87r3gs30rk.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:EQILCnFwLASLNuVKLAf49H2qY5mLv7jxGmIwXgPpe+DqyHb0GA7 sI+65sNinSSa0MstP9UrvHX0BpkywXP3pgWZhgCXbdkVIHCXKUuofp+ntkqyprvj2GS8HZA q+/SgA3NrLFVLoquUPBaRPnqM0wApqZOdlflVj5mhnFaXhtrCVlrBnrMBwgNbnPtYBqQB4I sDzD8qGVMO6Mm5jKjk3/A== X-UI-Out-Filterresults: notjunk:1;V01:K0:NCSaSCoLjDA=:oQJIpPukalwKNmxizk+NE5 +/hjiPZjExVRKZWoDad9GZuonvPPFNaM+7AWHYg11eunYiHhxUh4ApbqVPvGaEp/nlNsoV7LS ggC1+nsoX0mQi9Gi3qka2b6+0r0tsTarK14Yt4Qh/6MAKe68WL4IMnwoZaphEKjHwr0Nng6Nf njE/Rc97LgFtp1Zs5o3xYJs2JfJPYWVcCC3MQFRYhic7pvdGZRhOsT9ZytMcAJEoNp6to0VJA wFjPSBCWQzmxDg1HrKNtPgYvyyo2JqCHMy7s9L1Gogl8KuWgVqpVHxuz+6FSg4ckZXv3D+Q/K DKFYpo0eMI/wZhwW6V8goVVpzrqRz5GiuVdtti9zasTUoaQevMNCQ4XUUU2QaFHK53PT1QU4b hTUqijlEUjUMVqehZisSmtp0cLxPExpqdOpymBorrJf+YxAp2uEgMuDQqgwhnj4ghxFN3mql2 VkKLQbEWnp8QgsYuMcGeYLiKyYQEe9J9qj+WuZqHCftS9kS7/v1kw8d42KNN5giObUe8uNpiI limCXwtzChqPpoJ25EUlNEaph7Eq6ZUnlUBwQvuKvtjPia3wPK+KA9lvpiSpmlNw+5xMyYjjl AhmAIqGsjOwgdBMdAmIl799MdXl1n2sCm11ISVLV70VberjzrAqyO+jJfC/CtX08v/587aIZH uDusR/hShd7Ouh4mpN8RHZ3E1jsDAajcB0rLEoplMOQSLFOnJH28T7pVS4DLt9LB+1NS+9VQq dJB314bLmj/B7f9r4tUk0/4kxctsuGgjdeXgWrrcL0SXyN/g+ibt4ktYG47Xl/+08Fj5NE2LZ aKOD8pwIDWLYc+ZXeWTsH8bwAlZlA== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > I think I know what is happening. > > I have two monitors, side by side, simulating a continuous display. I expected something like that. > The > monitor on the left side, where Emacs is displayed, has a vertical > resolution of 1050 pixels while the monitor on the right side has a > vertical resolution of 1200 points. Emacs is using the vertical > resolution of the virtual display (the largest of the two monitors, i.= e. > 1200 points) instead of the resolution of the monitor that hosts the > Emacs frame. Did you check via =E2=80=98x-display-pixel-width=E2=80=99 and =E2=80=98x-= display-pixel-height=E2=80=99 and the selected frame on either of your monitors? And what does =E2=80=98x-display-monitor-attributes-list=E2=80=99 return?= > Something similar happens for the horizontal overflow: the dimensions = of > the virtual desktop are used instead of the dimensions of the monitor.= > > I've seen similar issues on the past for other applications, and they > were fixed, eventually. The key here is that, while the two monitors > belong to a single desktop, it can't be considered a continuous surfac= e. > For instance: the window manager never gives to a window a default > position that makes it overlap over the two monitors, unless the windo= w > is so big that doesn't fit on one monitor. Ditto for maximizing: windo= ws > maximize on one monitor, not on the whole virtual desktop (Emacs does > this right, so it already knows how to query the resolution of the > current monitor.) It's the window manager that maximizes the frame and tells Emacs the required coordinates so no querying should occur here. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 14:16:31 2016 Received: (at 22549) by debbugs.gnu.org; 4 Feb 2016 19:16:31 +0000 Received: from localhost ([127.0.0.1]:60638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRPOJ-0000Qu-I4 for submit@debbugs.gnu.org; Thu, 04 Feb 2016 14:16:31 -0500 Received: from relaycp01.dominioabsoluto.net ([217.116.26.68]:44936) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRPOH-0000Qf-Iw for 22549@debbugs.gnu.org; Thu, 04 Feb 2016 14:16:30 -0500 Received: from smtp.movistar.es (smtp08.acens.net [86.109.99.132]) by relaycp01.dominioabsoluto.net (Postfix) with ESMTP id 66A244717; Thu, 4 Feb 2016 20:16:22 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0206.56B3A386.00F9, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56A8ACDF00A9B9A4; Thu, 4 Feb 2016 19:16:22 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> Date: Thu, 04 Feb 2016 20:16:21 +0100 In-Reply-To: <56B384F4.8040208@gmx.at> (martin rudalics's message of "Thu, 04 Feb 2016 18:05:56 +0100") Message-ID: <87d1sc2smy.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: > Did you check via =E2=80=98x-display-pixel-width=E2=80=99 and =E2=80=98x-= display-pixel-height=E2=80=99 > and the selected frame on either of your monitors? > > And what does =E2=80=98x-display-monitor-attributes-list=E2=80=99 return? On the monitor with 1680x1050 resolution: (x-display-pixel-width) 3280 (x-display-pixel-height) 1200 (x-display-monitor-attributes-list) (((name . "DVI-0") (geometry 0 0 1680 1050) (workarea 0 0 1680 1050) (mm-size 474 296) (frames #) (source . "XRandr")) ((name . "VGA-0") (geometry 1680 0 1600 1200) (workarea 1680 0 1600 1200) (mm-size 350 262) (frames) (source . "XRandr"))) On the monitor with 1600x1200 resolution: (x-display-pixel-width) 3280 (x-display-pixel-height) 1200 (x-display-monitor-attributes-list) (((name . "DVI-0") (geometry 0 0 1680 1050)=20 (workarea 0 0 1680 1050) (mm-size 474 296) (frames) (source . "XRandr")) ((name . "VGA-0") (geometry 1680 0 1600 1200) (workarea 1680 0 1600 1200) (mm-size 350 262) (frames #) (source . "XRandr"))) From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 05 12:44:52 2016 Received: (at 22549) by debbugs.gnu.org; 5 Feb 2016 17:44:52 +0000 Received: from localhost ([127.0.0.1]:34641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRkR9-00030i-Q0 for submit@debbugs.gnu.org; Fri, 05 Feb 2016 12:44:52 -0500 Received: from mout.gmx.net ([212.227.15.18]:51548) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRkR8-00030S-5k for 22549@debbugs.gnu.org; Fri, 05 Feb 2016 12:44:50 -0500 Received: from [192.168.1.100] ([212.95.7.47]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LzKmP-1Zx2DJ2y0H-014WXZ; Fri, 05 Feb 2016 18:44:40 +0100 Message-ID: <56B4DF82.8040106@gmx.at> Date: Fri, 05 Feb 2016 18:44:34 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> In-Reply-To: <87d1sc2smy.fsf@wanadoo.es> Content-Type: multipart/mixed; boundary="------------030508060601040705040902" X-Provags-ID: V03:K0:K5CMWwwfmiEKtBETEtCHIQsFuY199V22jj2R/SM6729wnKnGOwR isfG840pub/thzZEbgCjG0A0CCCPdUF4x8ZewUI3yPFWsOeq4gCOVW/UwIQ+jLKMIIlmAS2 NHWBi1JGCm7eTCeEB9rrIMwZA40rTvS+0/5NjkdcB06Mw2jIHCLACxIE0ELejKgmPusWdQ9 jJggT5yV9J1XYgrkW2AyQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Caamr3Mqhko=:kfLNJ9FoXFxRd2zNHgPtaN 3H4Z5UsDknJQ6cnGOAnNnU1i/iyHnV+ND2lMEKxcCANiFLc5Ph29JlEhtEEiw5pZ/wEI8oW5A AwfE5ZhVP+d3ss27GsEKenJPMoknvOEICNSQEU8PsyLlDUgW/f1PhhS167V51luqReal5xb6r dKod+D0qShcGRD4V7to7O5XjqKSIKQbYdQuhDP+9RUOSekdITdYTUK42aWXRcZTK8FTpUMtd3 XAg2/5m4H+z/0TPteqdaawwql1zBAxz08w6ZVu82tz9YE5KxhNilweNPqQBScwUQQNo5t4fEh sYsnbXa0/pehbQK08zsqXOfw3FW1HvufSeT+fn1loGTDebiKbYCm8BDzwtR9+Z1OkRszTSYMA umeJksNaUyrPXjuB+J4tpiLMPWjqfpNG4PNC5vDoo8Qsd6cpzJ8Ct3OIqxgMocb1sOtIJjLWS 3trK7Z15jUi0tF5AgKXcC/loSTbFJfDEmSBbYykUNxczSFEezv4+nPpvUjAh97wEO5Poh2/cw qZCOYClRVF6XPkEgIw+2/F3AnLmYxohtkkaZx5vpLiB9lUR/ZI6puHYeuG4YbRUaPpgPGCBBI dYgxWYBm4T3NqRS6jDsjes1bBUqe1iDDqoNosHaDHMxUVFAHlmMQnrYufhWfOeCwssw15giJL wRgCfiuXryfUK/YeN0GUWw1z99ylOnZtW22bb+Sda3ykSF9qGeJGS8LuU3WNVl5G8dwToEKG2 GlRPkypBaxH1MU+pU1DyZ3xHRWrFvKxD65tQfZR0s54iEc5YtJxZTiDKG7lDUBWdjXnsPuU/I w1dPG+R X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) This is a multi-part message in MIME format. --------------030508060601040705040902 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Please try the attached patch. Glenn gave a recipe how to emulate multiple monitors with a single one but I'm a bit reluctant to test it. My display resolution setup is somewhat fragile. Thanks, martin --------------030508060601040705040902 Content-Type: text/plain; charset=windows-1252; name="xfns.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xfns.diff" LS0tIGEvc3JjL3hmbnMuYworKysgYi9zcmMveGZucy5jCkBAIC01NjgzLDYgKzU2ODMsNyBA QCBjb21wdXRlX3RpcF94eSAoc3RydWN0IGZyYW1lICpmLCBMaXNwX09iamVjdCBwYXJtcywg TGlzcF9PYmplY3QgZHgsIExpc3BfT2JqZWN0CiAgIGludCB3aW5feCwgd2luX3k7CiAgIFdp bmRvdyByb290LCBjaGlsZDsKICAgdW5zaWduZWQgcG1hc2s7CisgIGludCBtaW5feCwgbWlu X3ksIG1heF94LCBtYXhfeTsKCiAgIC8qIFVzZXItc3BlY2lmaWVkIHBvc2l0aW9uPyAgKi8K ICAgbGVmdCA9IEZjZHIgKEZhc3NxIChRbGVmdCwgcGFybXMpKTsKQEAgLTU2OTUsNDUgKzU2 OTYsNzUgQEAgY29tcHV0ZV90aXBfeHkgKHN0cnVjdCBmcmFtZSAqZiwgTGlzcF9PYmplY3Qg cGFybXMsIExpc3BfT2JqZWN0IGR4LCBMaXNwX09iamVjdAogICBpZiAoKCFJTlRFR0VSUCAo bGVmdCkgJiYgIUlOVEVHRVJQIChyaWdodCkpCiAgICAgICB8fCAoIUlOVEVHRVJQICh0b3Ap ICYmICFJTlRFR0VSUCAoYm90dG9tKSkpCiAgICAgeworICAgICAgTGlzcF9PYmplY3QgZnJh bWUsIGF0dHJpYnV0ZXMsIG1vbml0b3IsIGZyYW1lcywgZ2VvbWV0cnk7CisKKyAgICAgIC8q IERlZmF1bHQgbWluIGFuZCBtYXggdmFsdWVzLiAgKi8KKyAgICAgIG1pbl94ID0gMDsKKyAg ICAgIG1pbl95ID0gMDsKKyAgICAgIG1heF94ID0geF9kaXNwbGF5X3BpeGVsX3dpZHRoIChG UkFNRV9ESVNQTEFZX0lORk8gKGYpKTsKKyAgICAgIG1heF95ID0geF9kaXNwbGF5X3BpeGVs X2hlaWdodCAoRlJBTUVfRElTUExBWV9JTkZPIChmKSk7CisKICAgICAgIGJsb2NrX2lucHV0 ICgpOwogICAgICAgWFF1ZXJ5UG9pbnRlciAoRlJBTUVfWF9ESVNQTEFZIChmKSwgRlJBTUVf RElTUExBWV9JTkZPIChmKS0+cm9vdF93aW5kb3csCiAJCSAgICAgJnJvb3QsICZjaGlsZCwg cm9vdF94LCByb290X3ksICZ3aW5feCwgJndpbl95LCAmcG1hc2spOwogICAgICAgdW5ibG9j a19pbnB1dCAoKTsKKworICAgICAgWFNFVEZSQU1FIChmcmFtZSwgZik7CisgICAgICBhdHRy aWJ1dGVzID0gRnhfZGlzcGxheV9tb25pdG9yX2F0dHJpYnV0ZXNfbGlzdCAoZnJhbWUpOwor CisgICAgICB3aGlsZSAoQ09OU1AgKGF0dHJpYnV0ZXMpKQorCXsKKwkgIG1vbml0b3IgPSBY Q0FSIChhdHRyaWJ1dGVzKTsKKwkgIGZyYW1lcyA9IEZhc3NxIChRZnJhbWVzLCBtb25pdG9y KTsKKwkgIGlmIChDT05TUCAoZnJhbWVzKSAmJiBFUSAoZnJhbWUsIFhDQVIgKFhDRFIgKGZy YW1lcykpKSkKKwkgICAgeworCSAgICAgIGdlb21ldHJ5ID0gRmFzc3EgKFFnZW9tZXRyeSwg bW9uaXRvcik7CisJICAgICAgaWYgKENPTlNQIChnZW9tZXRyeSkpCisJCXsKKwkJICBtaW5f eCA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgxKSwgZ2VvbWV0cnkpKTsKKwkJICBtaW5f eSA9IFhJTlQgKEZudGggKG1ha2VfbnVtYmVyICgyKSwgZ2VvbWV0cnkpKTsKKwkJICBtYXhf eCA9IG1pbl94ICsgWElOVCAoRm50aCAobWFrZV9udW1iZXIgKDMpLCBnZW9tZXRyeSkpOwor CQkgIG1heF95ID0gbWluX3kgKyBYSU5UIChGbnRoIChtYWtlX251bWJlciAoNCksIGdlb21l dHJ5KSk7CisJCX0KKworCSAgICAgIGJyZWFrOworCSAgICB9CisKKwkgIGF0dHJpYnV0ZXMg PSBYQ0RSIChhdHRyaWJ1dGVzKTsKKwl9CiAgICAgfQoKICAgaWYgKElOVEVHRVJQICh0b3Ap KQogICAgICpyb290X3kgPSBYSU5UICh0b3ApOwogICBlbHNlIGlmIChJTlRFR0VSUCAoYm90 dG9tKSkKICAgICAqcm9vdF95ID0gWElOVCAoYm90dG9tKSAtIGhlaWdodDsKLSAgZWxzZSBp ZiAoKnJvb3RfeSArIFhJTlQgKGR5KSA8PSAwKQotICAgICpyb290X3kgPSAwOyAvKiBDYW4g aGFwcGVuIGZvciBuZWdhdGl2ZSBkeSAqLwotICBlbHNlIGlmICgqcm9vdF95ICsgWElOVCAo ZHkpICsgaGVpZ2h0Ci0JICAgPD0geF9kaXNwbGF5X3BpeGVsX2hlaWdodCAoRlJBTUVfRElT UExBWV9JTkZPIChmKSkpCisgIGVsc2UgaWYgKCpyb290X3kgKyBYSU5UIChkeSkgPD0gbWlu X3kpCisgICAgKnJvb3RfeSA9IG1pbl95OyAvKiBDYW4gaGFwcGVuIGZvciBuZWdhdGl2ZSBk eSAqLworICBlbHNlIGlmICgqcm9vdF95ICsgWElOVCAoZHkpICsgaGVpZ2h0IDw9IG1heF95 KQogICAgIC8qIEl0IGZpdHMgYmVsb3cgdGhlIHBvaW50ZXIgKi8KICAgICAqcm9vdF95ICs9 IFhJTlQgKGR5KTsKLSAgZWxzZSBpZiAoaGVpZ2h0ICsgWElOVCAoZHkpIDw9ICpyb290X3kp CisgIGVsc2UgaWYgKGhlaWdodCArIFhJTlQgKGR5KSArIG1pbl95IDw9ICpyb290X3kpCiAg ICAgLyogSXQgZml0cyBhYm92ZSB0aGUgcG9pbnRlci4gICovCiAgICAgKnJvb3RfeSAtPSBo ZWlnaHQgKyBYSU5UIChkeSk7CiAgIGVsc2UKICAgICAvKiBQdXQgaXQgb24gdGhlIHRvcC4g ICovCi0gICAgKnJvb3RfeSA9IDA7CisgICAgKnJvb3RfeSA9IG1pbl95OwoKICAgaWYgKElO VEVHRVJQIChsZWZ0KSkKICAgICAqcm9vdF94ID0gWElOVCAobGVmdCk7CiAgIGVsc2UgaWYg KElOVEVHRVJQIChyaWdodCkpCiAgICAgKnJvb3RfeCA9IFhJTlQgKHJpZ2h0KSAtIHdpZHRo OwotICBlbHNlIGlmICgqcm9vdF94ICsgWElOVCAoZHgpIDw9IDApCisgIGVsc2UgaWYgKCpy b290X3ggKyBYSU5UIChkeCkgPD0gbWluX3gpCiAgICAgKnJvb3RfeCA9IDA7IC8qIENhbiBo YXBwZW4gZm9yIG5lZ2F0aXZlIGR4ICovCi0gIGVsc2UgaWYgKCpyb290X3ggKyBYSU5UIChk eCkgKyB3aWR0aAotCSAgIDw9IHhfZGlzcGxheV9waXhlbF93aWR0aCAoRlJBTUVfRElTUExB WV9JTkZPIChmKSkpCisgIGVsc2UgaWYgKCpyb290X3ggKyBYSU5UIChkeCkgKyB3aWR0aCA8 PSBtYXhfeCkKICAgICAvKiBJdCBmaXRzIHRvIHRoZSByaWdodCBvZiB0aGUgcG9pbnRlci4g ICovCiAgICAgKnJvb3RfeCArPSBYSU5UIChkeCk7Ci0gIGVsc2UgaWYgKHdpZHRoICsgWElO VCAoZHgpIDw9ICpyb290X3gpCisgIGVsc2UgaWYgKHdpZHRoICsgWElOVCAoZHgpICsgbWlu X3ggPD0gKnJvb3RfeCkKICAgICAvKiBJdCBmaXRzIHRvIHRoZSBsZWZ0IG9mIHRoZSBwb2lu dGVyLiAgKi8KICAgICAqcm9vdF94IC09IHdpZHRoICsgWElOVCAoZHgpOwogICBlbHNlCi0g ICAgLyogUHV0IGl0IGxlZnQtanVzdGlmaWVkIG9uIHRoZSBzY3JlZW4tLWl0IG91Z2h0IHRv IGZpdCB0aGF0IHdheS4gICovCi0gICAgKnJvb3RfeCA9IDA7CisgICAgLyogUHV0IGl0IGxl ZnQganVzdGlmaWVkIG9uIHRoZSBzY3JlZW4gLS0gaXQgb3VnaHQgdG8gZml0IHRoYXQgd2F5 LiAgKi8KKyAgICAqcm9vdF94ID0gbWluX3g7CiB9CgoK --------------030508060601040705040902-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 05 17:35:02 2016 Received: (at 22549) by debbugs.gnu.org; 5 Feb 2016 22:35:02 +0000 Received: from localhost ([127.0.0.1]:34914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRoxy-0008DY-Fb for submit@debbugs.gnu.org; Fri, 05 Feb 2016 17:35:02 -0500 Received: from smtp11.acens.net ([86.109.99.135]:59166 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRoxv-0008Cy-Vu for 22549@debbugs.gnu.org; Fri, 05 Feb 2016 17:35:01 -0500 X-CTCH-RefID: str=0001.0A0B0205.56B5238D.003D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56AAB89E00A5D0E5; Fri, 5 Feb 2016 22:35:06 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> Date: Fri, 05 Feb 2016 23:34:52 +0100 In-Reply-To: <56B4DF82.8040106@gmx.at> (martin rudalics's message of "Fri, 05 Feb 2016 18:44:34 +0100") Message-ID: <87d1sa23cj.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) martin rudalics writes: > Please try the attached patch. Glenn gave a recipe how to emulate > multiple monitors with a single one but I'm a bit reluctant to test it. > My display resolution setup is somewhat fragile. The first problem with the patch is that it crashes when there is not an Emacs frame on some of the monitors. This is solved changing the `if' to: if (CONSP (frames) && !NILP (XCDR (frames)) && EQ (frame, XCAR (XCDR (frames)))) { The next problem is that the condition EQ (frame, XCAR (XCDR (frames))) is always false, which makes sense because `frame' is the tooltip frame (unless I'm misunderstanding what XSETFRAME does) and it is not listed on `frames'. For going ahead I "corrected" this with struct frame *sf = XFRAME (selected_frame); XSETFRAME (frame, sf); which is wrong when there is more than one frame, because the tooltip may be shown for a frame that is not the selected one (showing tooltips for other than the selected frame seems inappropriate to me, but that's how Emacs behaves right now). Then, as the comparision only takes into account the first frame listed on `frames', even if `frame' where correct (the frame that triggered the tooltip) it could fail when there is more than one Emacs frame on the same monitor. I observed that the tooltip is correctly placed when the right conditions (see below) are satisfied. What is missing is to determine the parent frame of the tooltip frame, instead of using just the selected one as I did, and to search for that frame on the list of frames associated to the current monitor, instead of just testing the first frame on the list. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 05 18:52:22 2016 Received: (at 22549) by debbugs.gnu.org; 5 Feb 2016 23:52:22 +0000 Received: from localhost ([127.0.0.1]:34929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRqAn-00038B-SW for submit@debbugs.gnu.org; Fri, 05 Feb 2016 18:52:22 -0500 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:38081) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRqAl-00037t-LG for 22549@debbugs.gnu.org; Fri, 05 Feb 2016 18:52:21 -0500 Received: from smtp.movistar.es (smtp09.acens.net [86.109.99.133]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 368EBBFA19E; Sat, 6 Feb 2016 00:52:12 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0205.56B535AC.0036, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56A37EDC010B7F16; Fri, 5 Feb 2016 23:52:12 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> Date: Sat, 06 Feb 2016 00:52:10 +0100 In-Reply-To: <56B4DF82.8040106@gmx.at> (martin rudalics's message of "Fri, 05 Feb 2016 18:44:34 +0100") Message-ID: <8760y21zrp.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain We can use the coordinates to determine the monitor. The patch below works. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=tooltip_pos.diff diff --git a/src/xfns.c b/src/xfns.c index 9624ac5..a0182cd 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5683,6 +5683,7 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object int win_x, win_y; Window root, child; unsigned pmask; + int min_x, min_y, max_x, max_y; /* User-specified position? */ left = Fcdr (Fassq (Qleft, parms)); @@ -5695,45 +5696,74 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object if ((!INTEGERP (left) && !INTEGERP (right)) || (!INTEGERP (top) && !INTEGERP (bottom))) { + Lisp_Object frame, attributes, monitor, geometry; + + /* Default min and max values. */ + min_x = 0; + min_y = 0; + max_x = x_display_pixel_width (FRAME_DISPLAY_INFO (f)); + max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)); + block_input (); XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, &root, &child, root_x, root_y, &win_x, &win_y, &pmask); unblock_input (); + + XSETFRAME(frame, f); + attributes = Fx_display_monitor_attributes_list (frame); + + while (CONSP (attributes)) + { + monitor = XCAR (attributes); + geometry = Fassq (Qgeometry, monitor); + if (CONSP (geometry)) + { + min_x = XINT (Fnth (make_number (1), geometry)); + min_y = XINT (Fnth (make_number (2), geometry)); + max_x = min_x + XINT (Fnth (make_number (3), geometry)); + max_y = min_y + XINT (Fnth (make_number (4), geometry)); + if (min_x <= *root_x && *root_x < max_x + && min_y <= *root_y && *root_y < max_y) + { + break; + } + } + + attributes = XCDR (attributes); + } } if (INTEGERP (top)) *root_y = XINT (top); else if (INTEGERP (bottom)) *root_y = XINT (bottom) - height; - else if (*root_y + XINT (dy) <= 0) - *root_y = 0; /* Can happen for negative dy */ - else if (*root_y + XINT (dy) + height - <= x_display_pixel_height (FRAME_DISPLAY_INFO (f))) + else if (*root_y + XINT (dy) <= min_y) + *root_y = min_y; /* Can happen for negative dy */ + else if (*root_y + XINT (dy) + height <= max_y) /* It fits below the pointer */ *root_y += XINT (dy); - else if (height + XINT (dy) <= *root_y) + else if (height + XINT (dy) + min_y <= *root_y) /* It fits above the pointer. */ *root_y -= height + XINT (dy); else /* Put it on the top. */ - *root_y = 0; + *root_y = min_y; if (INTEGERP (left)) *root_x = XINT (left); else if (INTEGERP (right)) *root_x = XINT (right) - width; - else if (*root_x + XINT (dx) <= 0) + else if (*root_x + XINT (dx) <= min_x) *root_x = 0; /* Can happen for negative dx */ - else if (*root_x + XINT (dx) + width - <= x_display_pixel_width (FRAME_DISPLAY_INFO (f))) + else if (*root_x + XINT (dx) + width <= max_x) /* It fits to the right of the pointer. */ *root_x += XINT (dx); - else if (width + XINT (dx) <= *root_x) + else if (width + XINT (dx) + min_x <= *root_x) /* It fits to the left of the pointer. */ *root_x -= width + XINT (dx); else - /* Put it left-justified on the screen--it ought to fit that way. */ - *root_x = 0; + /* Put it left justified on the screen -- it ought to fit that way. */ + *root_x = min_x; } --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 04:31:00 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 09:31:00 +0000 Received: from localhost ([127.0.0.1]:35129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRzCl-0002Iy-S1 for submit@debbugs.gnu.org; Sat, 06 Feb 2016 04:31:00 -0500 Received: from mout.gmx.net ([212.227.15.19]:58153) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRzCk-0002Ig-0S for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 04:30:58 -0500 Received: from [192.168.1.101] ([212.95.7.47]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LuOYx-1a0en41Aut-011mx7; Sat, 06 Feb 2016 10:30:45 +0100 Message-ID: <56B5BD3E.1000305@gmx.at> Date: Sat, 06 Feb 2016 10:30:38 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <87d1sa23cj.fsf@wanadoo.es> In-Reply-To: <87d1sa23cj.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:aqj9x5n4x8j08bLAWqUok3H1LZe4hg5BF/BnDhE9XKe0FJmK0d2 7cxqy399lC1nauYUnRMnR/+y4dRi24Za3DAGp4fc0D0QkbVcNesul8mdyS/H52oi/5Jobm8 gQOqsJ6aUsBEMJ6dfw6JhYA2uzNu2HtNESIcTA7gH/qdNSkQZ3iI/g7ygGwlNDX49qI0q/N UYPZB5UdV7f+hlVobZRVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:PrOVbuTxQPw=:55B6IZQ4zD4INBIULUx4HA cJOYFRnadjb1SSXAWppIKygJhSZAgeSUd/G4ZNkGXQD6FPzJWaeuA/SthhKfxDm9K6Bf0vJpD /m2lHmYlI+IJGET4BIAwjX9LKfpgpWIC/wBcd8b5r3woNWYRNJgkFK8aR0O1Gp5n26eIPIzuz MlxoIJjM35qQigCgOFk1V4bFzv25X9ecTCvjH7Mews1y+lY4eyE38JEbLJ8UYCU8buzcFbr2X uUGwVUjuK/PqlK+rg9rpOLASNO6KX1o4nMnXTp4JrMSbBk4ypgPIxhSIYIDgifre7NRlEAGt0 y8TCXcY/u453POQiw1CWdboQVegfh5zeCD7b9lvWhoNxw113hWHaaoiuFcEsjkcYW9VskUQWD GvhHryQAnu5jEuLKOAAI6N9j08tW/zdRUmVTukfciMvDTSCQj7krQsQzm0iYbs0ausCrSIUhT dmcYosB7vt0cZz1PM1J9xWUxJfznk3yaUARKLtPQ6jb0TBcpvyXh1MsonZMsPDT2iUnRVk6EJ e8efY+m1FOCX7ffeU4ZhG8Y7Eu4CpXYzJu2/2xGPFEYgXF/nYoFrBMWFot7FPKjUP154OpV+r qErzci1Sxyj0j+aADpdXVPy93I5KvU7RAmbQCM0+soyjy7V9h5T7puksemkjUD08T0XUkMVTS 8AiRlmvxTYBrKR8Set7T2UlcRnuQivpp3/hmkX6hDogmxruF1uOnThBl3MDAc9tKr6Av5+K6O lcmlRA5WASYADpbbmL5suDe3MgGDzE9PbJ6zneIySDdwuhUTQz2ocr8mbkOgmxEhy9quitT4C ADJKG8cCAzTWith/Nk70IZqYmzmyA== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > The first problem with the patch is that it crashes when there is not = an > Emacs frame on some of the monitors. This is solved changing the `if' > to: > > if (CONSP (frames) && !NILP (XCDR (frames)) > && EQ (frame, XCAR (XCDR (frames)))) Silly me. I was looking for Fcadr, didn't find it and just grabbed whatever there was without thinking of the consequences. Translating code back from Elisp to C is a PITA. And I don't want to tear apart =E2=80=98x-display-monitor-attributes-list=E2=80=99 for the pr= esent purpose, especially not on Emacs-25. Maybe I can convince Yamamoto Mitsuharu to provide a C-friendly interface for master. > The next problem is that the condition > > EQ (frame, XCAR (XCDR (frames))) > > is always false, which makes sense because `frame' is the tooltip fram= e > (unless I'm misunderstanding what XSETFRAME does) and it is not listed= > on `frames'. Another silliness. With GTK, FRAME is the original frame and I stepped through this with GDB on a GTK build only and it obviously worked. With Lucid, FRAME is the tooltip frame and I just looked at the results which were OK since I have only one monitor. > For going ahead I "corrected" this with > > struct frame *sf =3D XFRAME (selected_frame); > XSETFRAME (frame, sf); > > which is wrong when there is more than one frame, because the tooltip > may be shown for a frame that is not the selected one (showing tooltip= s > for other than the selected frame seems inappropriate to me, but that'= s > how Emacs behaves right now). Maybe someone will find a use case for it. Let's not bother now but simply agree that the selected frame might be on another monitor and so could be the wrong frame. > Then, as the comparision only takes into account the first frame liste= d > on `frames', even if `frame' where correct (the frame that triggered t= he > tooltip) it could fail when there is more than one Emacs frame on the > same monitor. I don't understand you here. There can be any number of frames on the "right" monitor. The important thing is to get the monitor of the frame where the tooltip shall be shown. > I observed that the tooltip is correctly placed when the right > conditions (see below) are satisfied. > > What is missing is to determine the parent frame of the tooltip frame,= =2E.. that's the one passed via FRAME to =E2=80=98x-show-tip=E2=80=99 and= we just have to pass it on to compute_tip_xy ... > instead of using just the selected one as I did, and to search for tha= t > frame on the list of frames associated to the current monitor, instead= > of just testing the first frame on the list. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 04:31:00 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 09:31:00 +0000 Received: from localhost ([127.0.0.1]:35131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRzCm-0002J0-3G for submit@debbugs.gnu.org; Sat, 06 Feb 2016 04:31:00 -0500 Received: from mout.gmx.net ([212.227.15.18]:58720) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRzCk-0002Ih-Fx for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 04:30:58 -0500 Received: from [192.168.1.101] ([212.95.7.47]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MGBB1-1aDuKE35DL-00FB5g; Sat, 06 Feb 2016 10:30:49 +0100 Message-ID: <56B5BD43.1070302@gmx.at> Date: Sat, 06 Feb 2016 10:30:43 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> In-Reply-To: <8760y21zrp.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:SYCyZDZrUSsakiK5aybzvw5C6xDaW46mWY9wAQbSMp2X0e06+4E O77DEvjWrN8bLna29W4o5Z/mBDyMGEnagvcuCxi3jcOs2GDm+T/RfiJI4QKeTZVK+v3eUyy 0PojUhrjb3CtkUSvlK1N2pGZR9xfxbP7a3UKsr5A1Ejz42IyCe3VaWHv5ZYN6nE8GLaN3RM EsBSp6D4uYU7y0Cc/0AFQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:lbc4aRIuKtg=:YFL4Hqe55llEd4CEGDdCCD PSoqM0CqmGbVpGomV/jrehkmWQkGzYdrOiKXzIRazdgrOD8lfA80dcjBisCC2lGtxE7e60FV/ hq1m0+vHX/Y13J0mBgOXxTiKYCXZmhyjMtdMx+vqsfzk9N82D7Jm1QyqTqgtyZMLDaHamlOWp AnhA+t7wCLouEoXV/FFS3MtDxkQZhEjGYnnpzOtQtLStsaW7Y/S+75yYiYC1eLtDBCv0rq0Zg ihlKsOMh6vh5RjyNx/QsOpsoW7NzdQ2KBd5jZwOWN4uwIczI0C2erKug9kSk3EC3g5LnkuYue GBh0ahhQ64t9ypgqhziSbhBTioohPath80uDAXK1FsfbumNTemqiSiXZvVzPgLAxn8HG7M/s1 UoGR/Omzdd74kpxhuK0wCEM3wMqAUZQMdALw6nntg5dnrfP/faCnn+zcF0bAjwHbrJApQ98Ru g+SW1UcLQchumbcwQd2vOCwX1cPDMIRBOwvR38+kyPQhzMwKAu1YU7fpvToEnSdAolg+5oiP+ 7nya/P6w/afRkvNL9GmylTMwF4L+I2X7j+Owe4bkSAiSeaNrt+FMF6DSBHODbW9jmRPyRjqSb +v46j3ijlIO1DV+hb8LKxrCg9IIA8Gx1nqwkKx4U2eUG4n43Tk87cttyreBfLW4UE3zTK+PO1 vQZQAH7Lk4M+yxq0GrtUGcGRQumlwYP7Az823bzODrpwCM9Y84zBw1AUXJrL9Y1CvmE8ALEHh lLvbUCxxridGmHQKvipFzStA8T7s4sda9IAfDuouRtoNQQp/lOyzv02iFo8we8kKjtvHw+Ia+ G9scPVBYYczD/r86SewGhnS+4Q7SQ== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > We can use the coordinates to determine the monitor. The patch below > works. Good idea. But do that only if =E2=80=98x-display-monitor-attributes-lis= t=E2=80=99 returns more than one monitor so we do not needlessly loop in (and possibly compromise) the one monitor case. Or (tediously) assign + min_x =3D XINT (Fnth (make_number (1), geometry)); + min_y =3D XINT (Fnth (make_number (2), geometry)); + max_x =3D min_x + XINT (Fnth (make_number (3), geometry));= + max_y =3D min_y + XINT (Fnth (make_number (4), geometry));= only if the subsequent test + if (min_x <=3D *root_x && *root_x < max_x + && min_y <=3D *root_y && *root_y < max_y) would succeed. There's no guarantee that =E2=80=98x-display-monitor-attributes-list=E2=80= =99 works on all systems, especially on those where neither Xinerama nor XRandr are installed. IIRC older versions of the latter might also have problems when a monitor is added/removed during a session. The fallback should always give the same results as the present code, but who knows ... And just to make sure: Can we rely on the fact that XQueryPointer always gives reliable results with multiple monitors and its present arguments? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 12:07:01 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 17:07:01 +0000 Received: from localhost ([127.0.0.1]:36037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS6K5-0006R7-BL for submit@debbugs.gnu.org; Sat, 06 Feb 2016 12:07:01 -0500 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:49684) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS6K2-0006Qo-Fs for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 12:06:59 -0500 Received: from smtp.movistar.es (smtp22.acens.net [86.109.99.146]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 3DDB4BFA133; Sat, 6 Feb 2016 18:06:51 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0203.56B6282B.004F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56663A22051FADE0; Sat, 6 Feb 2016 17:06:51 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> Date: Sat, 06 Feb 2016 18:06:49 +0100 In-Reply-To: <56B5BD43.1070302@gmx.at> (martin rudalics's message of "Sat, 06 Feb 2016 10:30:43 +0100") Message-ID: <87y4axzs2e.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable martin rudalics writes: >> We can use the coordinates to determine the monitor. The patch below >> works. > > Good idea. But do that only if =E2=80=98x-display-monitor-attributes-lis= t=E2=80=99 > returns more than one monitor so we do not needlessly loop in (and > possibly compromise) the one monitor case. I don't think that performance considerations are applicable here. About compromising the one monitor case: in theory, the monitor's geometry is always the right thing to use for calculating the tooltip position, not x_display_pixel_width/height. For instance: it is possible to configure X for having a desktop area larger than the monitor's resolution, IIRC. > Or (tediously) assign > > + min_x =3D XINT (Fnth (make_number (1), geometry)); > + min_y =3D XINT (Fnth (make_number (2), geometry)); > + max_x =3D min_x + XINT (Fnth (make_number (3), geometry)); > + max_y =3D min_y + XINT (Fnth (make_number (4), geometry)); > > only if the subsequent test > > + if (min_x <=3D *root_x && *root_x < max_x > + && min_y <=3D *root_y && *root_y < max_y) > > would succeed. > There's no guarantee that =E2=80=98x-display-monitor-attributes-list=E2= =80=99 works on > all systems, especially on those where neither Xinerama nor XRandr are > installed. IIRC older versions of the latter might also have problems > when a monitor is added/removed during a session. The fallback should > always give the same results as the present code, but who knows ... See the attached patch. If we can't use the monitor's geometry, we default to the old code. > And just to make sure: Can we rely on the fact that XQueryPointer always > gives reliable results with multiple monitors and its present arguments? Dunno. I know nothing about X Windows. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=tooltip_pos2.diff diff --git a/src/xfns.c b/src/xfns.c index 9624ac5..20ac627 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5683,6 +5683,7 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object int win_x, win_y; Window root, child; unsigned pmask; + int min_x, min_y, max_x, max_y = -1; /* User-specified position? */ left = Fcdr (Fassq (Qleft, parms)); @@ -5695,45 +5696,81 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object if ((!INTEGERP (left) && !INTEGERP (right)) || (!INTEGERP (top) && !INTEGERP (bottom))) { + Lisp_Object frame, attributes, monitor, geometry; + block_input (); XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, &root, &child, root_x, root_y, &win_x, &win_y, &pmask); unblock_input (); + + XSETFRAME(frame, f); + attributes = Fx_display_monitor_attributes_list (frame); + + /* Try to determine the monitor where the mouse pointer is and + its geometry. See bug#22549. */ + while (CONSP (attributes)) + { + monitor = XCAR (attributes); + geometry = Fassq (Qgeometry, monitor); + if (CONSP (geometry)) + { + min_x = XINT (Fnth (make_number (1), geometry)); + min_y = XINT (Fnth (make_number (2), geometry)); + max_x = min_x + XINT (Fnth (make_number (3), geometry)); + max_y = min_y + XINT (Fnth (make_number (4), geometry)); + if (min_x <= *root_x && *root_x < max_x + && min_y <= *root_y && *root_y < max_y) + { + break; + } + max_y = -1; + } + + attributes = XCDR (attributes); + } + } + + /* It was not possible to determine the monitor's geometry, so we + assign some sane defaults here: */ + if ( max_y < 0 ) + { + min_x = 0; + min_y = 0; + max_x = x_display_pixel_width (FRAME_DISPLAY_INFO (f)); + max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)); } if (INTEGERP (top)) *root_y = XINT (top); else if (INTEGERP (bottom)) *root_y = XINT (bottom) - height; - else if (*root_y + XINT (dy) <= 0) - *root_y = 0; /* Can happen for negative dy */ - else if (*root_y + XINT (dy) + height - <= x_display_pixel_height (FRAME_DISPLAY_INFO (f))) + else if (*root_y + XINT (dy) <= min_y) + *root_y = min_y; /* Can happen for negative dy */ + else if (*root_y + XINT (dy) + height <= max_y) /* It fits below the pointer */ *root_y += XINT (dy); - else if (height + XINT (dy) <= *root_y) + else if (height + XINT (dy) + min_y <= *root_y) /* It fits above the pointer. */ *root_y -= height + XINT (dy); else /* Put it on the top. */ - *root_y = 0; + *root_y = min_y; if (INTEGERP (left)) *root_x = XINT (left); else if (INTEGERP (right)) *root_x = XINT (right) - width; - else if (*root_x + XINT (dx) <= 0) + else if (*root_x + XINT (dx) <= min_x) *root_x = 0; /* Can happen for negative dx */ - else if (*root_x + XINT (dx) + width - <= x_display_pixel_width (FRAME_DISPLAY_INFO (f))) + else if (*root_x + XINT (dx) + width <= max_x) /* It fits to the right of the pointer. */ *root_x += XINT (dx); - else if (width + XINT (dx) <= *root_x) + else if (width + XINT (dx) + min_x <= *root_x) /* It fits to the left of the pointer. */ *root_x -= width + XINT (dx); else - /* Put it left-justified on the screen--it ought to fit that way. */ - *root_x = 0; + /* Put it left justified on the screen -- it ought to fit that way. */ + *root_x = min_x; } --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 13:09:38 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 18:09:38 +0000 Received: from localhost ([127.0.0.1]:36046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS7Ig-0007sC-IW for submit@debbugs.gnu.org; Sat, 06 Feb 2016 13:09:38 -0500 Received: from mout.gmx.net ([212.227.15.19]:57479) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS7If-0007s0-NI for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 13:09:38 -0500 Received: from [192.168.1.100] ([212.95.7.107]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Ma1pn-1akc1H1OOd-00LpAV; Sat, 06 Feb 2016 19:09:28 +0100 Message-ID: <56B636CF.2020609@gmx.at> Date: Sat, 06 Feb 2016 19:09:19 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> In-Reply-To: <87y4axzs2e.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:wB2moTiFWiYNGzOxJuRBzgsoJxo1d7xGUbk2x8WzJgBwLUarhYW SvnvNb2W/sg7RQZCYVnYFUfNoFE6M6geTllRzvkCKM3Dc45m8oF59FSDXBco1ixXVqeLXYC evuadL2i19SZieNJb86iaRKxtp03AIYF7+0obFva6OkQnIdnDHrRbOyLD3c+ps55jJZpX5I CHeqIg8FfOKQZZqGxOxsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:NYI8UCy1yIw=:m2Zyxj1BG8Ihro3Y/gXKLO LHg8Lz/2ybP4S4Ct9WPqkMk7OwnPklMWpkbXABJYfOWST+rXJS5IydnFAyEZ6nahIMcnauaQB gRCRLeEOV/HsIj9PHH1PhnkjEZRpLsqVXiORLLblWjpWrdft0tPRwheYwx00AHyjOm3Gj4Own WeyzxPw9+8XvYYt89Ck/oa8Fvl3REt2c3WlRn+toA6e1Hr9Cmoa9Nikxw6G5BtCcik2hLxEra dvk8d85D37BwYsYpLI6ojGNHRHYUt+2kjIHcD3OidrrN8oDpTGQPNXlxFwtFDflMGex7BPMVF ePPJBAXbZNPUSJwF3GokUjs4TIwW+9bD7ogenypitLSyaANIFapQYUaCH58JQ6JJOmcMm6Gfh opDehcBie9t800u3ehNKI1wmfGAwEKdU7EfJomFiAA8Kc/X7E2tTM5s/VS9JPGcR7Z0DZj+5h iouE3Z4UR53XGdOrqilTNkn/u85SauIxamkKoBUBZIji+3jqJf7wwpzoz72a/KYlX1XDEkb71 wuTloyC3HAxWBPhaTgIzGpzJKAZ9nA4ra68F+wjhjjT0ruE6V+86w9hLkw9JX+pOC25nynMck mnLRE1FUiXbUVYSygxvfAP6kRfIme9bjg8KgF1mZeTOTImRQbEVAORctyQYv8j3ADEHKxixTZ swEPU9UAKZWK3gIlVkqHd9n/jPYjr1loseFqQ1dZTi5bPktNHBAibWfRztNkPh+UaXrnOaJmz VjiuMkrjc+0hjDKb13VCUnSekScp4v6mUGM+3fDYpTOWxeed2w+HXmtFT2aUV4BvGWlNaIJ6y 5OP6HQyU2scbKu7p2w3ZovIXaCEfg== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > I don't think that performance considerations are applicable here. Abo= ut > compromising the one monitor case: in theory, the monitor's geometry i= s > always the right thing to use for calculating the tooltip position, no= t > x_display_pixel_width/height. For instance: it is possible to configur= e > X for having a desktop area larger than the monitor's resolution, IIRC= =2E But =E2=80=98x_display_pixel_height=E2=80=99 returns the value of 'Height= OfScreen' which is what we need for the one monitor case. >> There's no guarantee that =E2=80=98x-display-monitor-attributes-list=E2= =80=99 works on >> all systems, especially on those where neither Xinerama nor XRandr ar= e >> installed. IIRC older versions of the latter might also have problem= s >> when a monitor is added/removed during a session. The fallback shoul= d >> always give the same results as the present code, but who knows ... > > See the attached patch. If we can't use the monitor's geometry, we > default to the old code. My concern was less that =E2=80=98x-display-monitor-attributes-list=E2=80= =99 would not assign a value to max_y. My concern was that that value could be wrong. Anyway. Better install your initial patch then. It's cleaner and we'll see soon enough whether it causes any problems. >> And just to make sure: Can we rely on the fact that XQueryPointer alw= ays >> gives reliable results with multiple monitors and its present argumen= ts? > > Dunno. I know nothing about X Windows. Have you tried with a frame that spans both monitors? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 13:53:01 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 18:53:01 +0000 Received: from localhost ([127.0.0.1]:36061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS7ye-0000SG-Bh for submit@debbugs.gnu.org; Sat, 06 Feb 2016 13:53:01 -0500 Received: from smtp20.acens.net ([86.109.99.144]:27579 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS7yc-0000S3-8k for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 13:52:59 -0500 X-CTCH-RefID: str=0001.0A0B0205.56B64103.0062, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56B309D80036507C; Sat, 6 Feb 2016 18:52:51 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> Date: Sat, 06 Feb 2016 19:52:50 +0100 In-Reply-To: <56B636CF.2020609@gmx.at> (martin rudalics's message of "Sat, 06 Feb 2016 19:09:19 +0100") Message-ID: <87r3gpzn5p.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) martin rudalics writes: > But =E2=80=98x_display_pixel_height=E2=80=99 returns the value of 'Height= OfScreen' which > is what we need for the one monitor case. Ok. > My concern was less that =E2=80=98x-display-monitor-attributes-list=E2=80= =99 would not > assign a value to max_y. My concern was that that value could be wrong. > > Anyway. Better install your initial patch then. It's cleaner and we'll > see soon enough whether it causes any problems. My initial patch is not better because it doesn't protect against the possible lack of information on x-display-monitor-attributes-list you mentioned above and on your previous e-mail. If that structure has not the correct geometry info about the current monitor, the variables max/min_x/y are guaranteed to be wrong. My last patch provides some protection against that circunstance, so I'll feel better committing it. (BTW, the path is basically yours, not mine. I just corrected some issues but the 90% was written by you, so I'll feel a bit uneasy taking credit for it.) >>> And just to make sure: Can we rely on the fact that XQueryPointer always >>> gives reliable results with multiple monitors and its present arguments? >> >> Dunno. I know nothing about X Windows. > > Have you tried with a frame that spans both monitors? Just tried. It seems to work fine: for a frame that spawns both monitors, the tooltip is correctly positioned taking into account the coordinates of the mouse cursor and the geometry of the corresponding monitor. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 14:44:43 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 19:44:43 +0000 Received: from localhost ([127.0.0.1]:36082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS8mh-0001fU-Mj for submit@debbugs.gnu.org; Sat, 06 Feb 2016 14:44:43 -0500 Received: from mout.gmx.net ([212.227.15.19]:64910) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS8mg-0001fI-Ac for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 14:44:42 -0500 Received: from [192.168.1.100] ([212.95.7.107]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MQRWm-1abzci1fFk-00TpDA; Sat, 06 Feb 2016 20:44:32 +0100 Message-ID: <56B64D17.5050607@gmx.at> Date: Sat, 06 Feb 2016 20:44:23 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> In-Reply-To: <87r3gpzn5p.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:OmDZfCQlGjASQmHG0/4u0ogJnRn/eFrxjkjx7TvCRAWxkxuvArq 1DtHsVvZnMUXCiwDzNHpRXaE7dY9O4gJzFtgut5zYoidqgh6L+xxrPxeTxftqZsxuKqBgrX 4sEXSe8QA+L6zgQqQOaDFddQwZwNB3SDC5m7AEnNmGlLiqToZfzkepCQTS8FY8+JIk/Ty0m n44qfzSjb6bTL4WkJRynQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:OUaGRTkbJ8E=:xt+U/kvKK8XiBTHiJaJNti 9OZ+GWSlZrCsC5E/SI3K7o37E/3LA6+kocv0iECggl5xj8KGqTmNp9u7CR6clWsrfubNYcHbk QrBZVnhJwbtcX2cthYB0mjhRqS+ezYzgHHRBVj03Cd2oVjJpe4FTTUTUJMI6EYPOm8Nshh5HA 7vC6M7a3nOX8E4s+D+Evc3JwGI7oK8RvjhRvPLEVbkZbqf+4WpOuzvIMtD4DHHIrvq/z6mrxU btSJDXflIbs5w8au1A69uFXHp21VnzKCTxGDha4Kp6rse1UhNqyp5c2RXg90MvoC+i76vgbq1 KaNssRkAtgz4OIUxbYW5bf1uP2aZL+WFKT+vwS/c831P6LD7p7f2hjWu9i1lUl3S8QDCzqWjU B2YplA8b3H5EzmRPut5B5XcdKBzt9DWyA0a0e/+grscgmJbzYW1rSczzVDoCjpkJIfTcMLpXn D5SxCaU7mzKSYljtDJGgvOUeoj1YY3wQHto7LunlH5Isg6bPm2g6gGvPtVAHYmGGrDhjTHl+2 t1mYWJcUlMRjP/d0jSbJ+rto22mLDghWIXiuKOtpRwSIgcRf6ECghmbCDQAb/FcW5JN3oAvIj ++NYLyjzseFILt+nQ3+HrHlMLH3O8hJRMotBAPGbRhOkDfZIsEyugP9Vuj9hgzvPI6ZVpgqNi bse8M2vOGd0QAV7rF3s2GnSlwA8fqfeTHjGTjE01DrGn8pNA1aN+ochFQP6d03hczk9RsJqH9 YxQg3RmqLP6EbwxtXWJ8rb7ilC/OPM8GuChqZPFeh0QiK6rkel/Nljh9C3GF7kk6mUH+hk8bN 5ct24s8Pcpcs0PJkM4D+aW+teTpKg== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > My initial patch is not better because it doesn't protect against the > possible lack of information on x-display-monitor-attributes-list you > mentioned above and on your previous e-mail. If that structure has not > the correct geometry info about the current monitor, the variables > max/min_x/y are guaranteed to be wrong. My last patch provides some > protection against that circunstance, so I'll feel better committing it. I'd still prefer something like if (CONSP (attributes)) while (CONSP (attributes)) ... your new code ... else ... the old code ... but I leave it to you. I feel uneasy talking about changes I can't really test here. > (BTW, the path is basically yours, not mine. I just corrected some > issues but the 90% was written by you, so I'll feel a bit uneasy taking > credit for it.) 80% of my code was stolen from the person who wrote the Windows code. I suppose it was Andy Moreton but I can't find the corresponding ChangeLog entry now. So don't bother ;-) >> Have you tried with a frame that spans both monitors? > > Just tried. It seems to work fine: for a frame that spawns both > monitors, the tooltip is correctly positioned taking into account the > coordinates of the mouse cursor and the geometry of the corresponding > monitor. I suppose you tested with underlying text very near the dividing screen edge. When you drag the frame with the mouse from left to right and back does the tooltip "jump" accordingly from one monitor to the other? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 14:49:21 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 19:49:21 +0000 Received: from localhost ([127.0.0.1]:36090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS8rB-0001nF-01 for submit@debbugs.gnu.org; Sat, 06 Feb 2016 14:49:21 -0500 Received: from mout.gmx.net ([212.227.15.18]:63413) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS8r9-0001n2-IK for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 14:49:19 -0500 Received: from [192.168.1.100] ([212.95.7.107]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MgL1q-1addK72YvG-00Njiu; Sat, 06 Feb 2016 20:49:09 +0100 Message-ID: <56B64E2E.5040006@gmx.at> Date: Sat, 06 Feb 2016 20:49:02 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> <56B64D17.5050607@gmx.at> In-Reply-To: <56B64D17.5050607@gmx.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:UR2zlRVyF90y7teT19FopowBX63HtqcxGhw98kaYIagEhpi+XXO PQKzOI2zmJrmUtsokkuopsm4zGjBqye27VSjA4AOnZlTuZ/kGbj3v6nNqn3EleS+AZ3xBWd 2MEyhkDZgvyWU9ye402qr0ozTUMIGFqB1aXOeX51wqAjk+zLsOz+aI6ej3OZwZpRiEI9XsP t4XnCfDPzE0xSEcMyzplA== X-UI-Out-Filterresults: notjunk:1;V01:K0:M0TrfqKbHp8=:EKP1KBrY31xoZ25VA+H3SS TdjoB+GTBu+SoGr7ZrDKFdFveDXcrh4ZLvgNBCnMcnOSSws8xV/a8zZqkWauqKaaz3HM0ycZj fX5/lHJvW77Bi4iLdyXtzgYhd4tDMAofXXDa3fLk9rA0XJZe2aBz33j2AmWFZb3Ns9rEwcMEL yxp7HMJDo/F4Pt/fVD/1JfLRqbxdqDL1ob4I8Lr39tsPC/bciU8PWR651cVak7s19p56phFaZ vZ61URqV4LBq++LhYEp/QvVv2jMMZpySpjialpFsSYBrJbyzfbRrRA4EXBq9cgOhDEZsCt07O PJCAKgxhWWtyaitpMwHK+EpzyLXzdLxb26BgTEriGHU03ELtchm/uZqM+4v5oc873CNo5aSZD tzo8HGxBJvG71DfAFaY2tG90RkpyBGBHiPO3rvabHDxQTDAPCVmL/LxXJM3zfPkcKLbbjbOzi mptY+SoPRH67vFvTjv4by8QMF5WZX9Mai3mx446SB0QtriJX1J8xDF/jQPp/FkOZXjt/uPu5M oL7oh9wlHi0hW0k07nlXDI5RxI25tjnGmX+QAcob5pKjpj3QHy+YtHeElRankoj8A0ZPV5a/Z BjaW60bgcvPKDRYR9NH/p3DQ8DmC6VKmHX4n06XBxRr2bjW4U3VMZg2DP6d/mqiPm/E2QqNyn HfbC6s6PEqQx8Y9H47LAzAhp+YKne78lS7aSNgeoagGNcGVsFd5dMatQtW6GHIG2QDsGFyv29 3OzpMs59CsdDErWqQyPnLW1vLI10U+t8qXz+LHMzuDTyVD6i42ADZlMDyXqSx3vjKaDqTcq/N Qwy1qIgKDhW8hPTwhT53IcjXSnFuw== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > I suppose you tested with underlying text very near the dividing screen > edge. When you drag the frame with the mouse from left to right and > back does the tooltip "jump" accordingly from one monitor to the other? No that's silly because the mouse must be on the frame border for dragging. So you have to release the mouse first and move it to the appropriate text. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 15:34:39 2016 Received: (at 22549) by debbugs.gnu.org; 6 Feb 2016 20:34:39 +0000 Received: from localhost ([127.0.0.1]:36103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS9Z1-0002sE-3p for submit@debbugs.gnu.org; Sat, 06 Feb 2016 15:34:39 -0500 Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:56929) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS9Yx-0002rw-TM for 22549@debbugs.gnu.org; Sat, 06 Feb 2016 15:34:37 -0500 Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id A71D7BFA1A3; Sat, 6 Feb 2016 21:34:28 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0204.56B658D4.00B7, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56623BC804F76084; Sat, 6 Feb 2016 20:34:28 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> <56B64D17.5050607@gmx.at> <56B64E2E.5040006@gmx.at> Date: Sat, 06 Feb 2016 21:34:27 +0100 In-Reply-To: <56B64E2E.5040006@gmx.at> (martin rudalics's message of "Sat, 06 Feb 2016 20:49:02 +0100") Message-ID: <87mvrdzigc.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549 Cc: 22549@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: >> I suppose you tested with underlying text very near the dividing screen >> edge. When you drag the frame with the mouse from left to right and >> back does the tooltip "jump" accordingly from one monitor to the other? > > No that's silly because the mouse must be on the frame border for > dragging. So you have to release the mouse first and move it to the > appropriate text. Furthermore, the tooltip frame isn't supposed to move once it is displayed, AFAIK. I'll commit the patch soon, but the bug will remain open until I check the MS Windows case. The test on Windows I mentioned at the beginning of this issue was not valid, because it used only monitor. It is frequent to connect MS Windows laptops to an external monitor and use both displays, effectively duplicating the setup I have on GNU/Linux: two monitors with different resolutions. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 16:23:59 2016 Received: (at 22549-done) by debbugs.gnu.org; 6 Feb 2016 21:23:59 +0000 Received: from localhost ([127.0.0.1]:36116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSAKl-00042Y-Gp for submit@debbugs.gnu.org; Sat, 06 Feb 2016 16:23:59 -0500 Received: from smtp11.acens.net ([86.109.99.135]:39761 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSAKj-00042K-NJ for 22549-done@debbugs.gnu.org; Sat, 06 Feb 2016 16:23:58 -0500 X-CTCH-RefID: str=0001.0A0B0203.56B66467.0037, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56AAB89E00B46DC7; Sat, 6 Feb 2016 21:24:04 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> <56B64D17.5050607@gmx.at> <56B64E2E.5040006@gmx.at> <87mvrdzigc.fsf@wanadoo.es> Date: Sat, 06 Feb 2016 22:23:50 +0100 In-Reply-To: <87mvrdzigc.fsf@wanadoo.es> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Sat, 06 Feb 2016 21:34:27 +0100") Message-ID: <87io21zg61.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22549-done Cc: 22549-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Committed on c77ffc8019bceb850a794c13f2e3ad991cc7e412 The MS Windows code already has code that manages the multi-monitor case. I tested that it works as expected. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 17:57:09 2016 Received: (at 22549-done) by debbugs.gnu.org; 6 Feb 2016 22:57:09 +0000 Received: from localhost ([127.0.0.1]:36147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSBmv-0006DF-5E for submit@debbugs.gnu.org; Sat, 06 Feb 2016 17:57:09 -0500 Received: from mout.gmx.net ([212.227.15.18]:50684) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSBmt-0006D3-Gi for 22549-done@debbugs.gnu.org; Sat, 06 Feb 2016 17:57:07 -0500 Received: from [192.168.1.100] ([212.95.7.107]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MbgKD-1aitrD0UeT-00J2gg; Sat, 06 Feb 2016 23:56:58 +0100 Message-ID: <56B67A31.6050702@gmx.at> Date: Sat, 06 Feb 2016 23:56:49 +0100 From: martin rudalics MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> <56B64D17.5050607@gmx.at> <56B64E2E.5040006@gmx.at> <87mvrdzigc.fsf@wanadoo.es> <87io21zg61.fsf@wanadoo.es> In-Reply-To: <87io21zg61.fsf@wanadoo.es> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:PbHthnjQT41BQrJbvH6CRWQTu7IUtbWxbnSQQLIWBkZKmGwQQ6R bB/QMdfQu0jZ2bZ8kyRlZPEq9WUO2YYfQnPwBo+qMtRIYuR/478r+5ETWxvYW7+Lrfdy8nm Lly00sGLK4YhPtMSMd8xcv0jDT9ygOKh/Y5YFcaML2wzb8FKEA/G7OOk+9lLl3jJUibv5wl Oss/fP2AwT+UdqFctHkMg== X-UI-Out-Filterresults: notjunk:1;V01:K0:/9+n52xyUas=:k50PDFHKcdizD42NuExrWc 6qlCSFpDF67ggAHoCZ3d8hmY7NhwvVxue98YqXuLZ+gxKTBfhTH0q+M2NRkL+l2Y/z1QWGUCN Py+gKurDRMFTb9XCG0ivdBpWLcCmXTBZqj1K3mJwAjKVeHVLS116cxtMVmMlzM0hQRYhAZi4p TnXqyjn0RXge1hW8yvGHzSIycWkjLTxhevEtXnyqwnMijzyXK+mJBmc8/xhLAikZkb9PzfL7D siYSHAlAa6hZ/hKmypOlxPimDYDeqyTZxITD7C0KvfE24FOQQSPtx4lsomCADML+PpzIj0jNF NwUQVSl0lTTiE31dFg5f6nm2DmiG5LtBKiwD0TmF0jYj5XpazxruZDpoR04Mwf++IsyDkE4kL pufSunoG/l395cgwguM5NN+M92jVXGh5KKBsXEYLR2rBIi6ro76doWo7YgiqWC2EhdEecWW+C SBjMWTmmxmfhSEZQ6ocTL8vSJyQRWgjtk/n/Mtx/PDL7q2SUcWq0wga9QnCrXzAssU+LY1JAh mJfUUI9x8B84qyjvch4/7x2s9Anvb1/BwOxF2pgH7uqknG1chlFL8Ku/eIOVHzh+/MQ+2Ho0q Pc3Ox5i4JO4qYrlBDQAZAPAwMO1LIJiWiBwZlgU1O4W8FDqUxqudMkbkaIZzMpfsOjO3yc6rl QtDPe8vlf/quMO951jxxxznZ8vXhWMx7VPYi5ocidONpY5vHqA3ryOvqMsr02u/P1P2nEk0p+ MsMB2AOmwrSbAmZ7QIT8bHMx17NMbujwzsiYbnZ2O4bKPf+hiRFWO3KIgyt0oDiobW6JU1IfE awLVkRROWNLSKSXXVfO098CMrUCtA== X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 22549-done Cc: 22549-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) > Committed on c77ffc8019bceb850a794c13f2e3ad991cc7e412 > > The MS Windows code already has code that manages the multi-monitor > case. I tested that it works as expected. Obviously so. 50% of the code you just committed _is_ straight from the MS Windows code you just tested ;-) martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 18:22:29 2016 Received: (at 22549-done) by debbugs.gnu.org; 6 Feb 2016 23:22:29 +0000 Received: from localhost ([127.0.0.1]:36166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSCBR-00070b-Gu for submit@debbugs.gnu.org; Sat, 06 Feb 2016 18:22:29 -0500 Received: from relaycp04.dominioabsoluto.net ([217.116.26.100]:33238) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSCBO-00070K-QE for 22549-done@debbugs.gnu.org; Sat, 06 Feb 2016 18:22:28 -0500 Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp04.dominioabsoluto.net (Postfix) with ESMTP id B635C64174; Sun, 7 Feb 2016 00:22:19 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0203.56B6802B.00A4, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56623BC804F8831C; Sat, 6 Feb 2016 23:22:19 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: martin rudalics Subject: Re: bug#22549: 25.0.50; Tooltips placed outside of screen limits References: <87zivh2k98.fsf@telefonica.net> <56B3747B.1000303@gmx.at> <87r3gs30rk.fsf@wanadoo.es> <56B384F4.8040208@gmx.at> <87d1sc2smy.fsf@wanadoo.es> <56B4DF82.8040106@gmx.at> <8760y21zrp.fsf@wanadoo.es> <56B5BD43.1070302@gmx.at> <87y4axzs2e.fsf@wanadoo.es> <56B636CF.2020609@gmx.at> <87r3gpzn5p.fsf@wanadoo.es> <56B64D17.5050607@gmx.at> <56B64E2E.5040006@gmx.at> <87mvrdzigc.fsf@wanadoo.es> <87io21zg61.fsf@wanadoo.es> <56B67A31.6050702@gmx.at> Date: Sun, 07 Feb 2016 00:22:18 +0100 In-Reply-To: <56B67A31.6050702@gmx.at> (martin rudalics's message of "Sat, 06 Feb 2016 23:56:49 +0100") Message-ID: <87egcpzaol.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22549-done Cc: 22549-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: >> The MS Windows code already has code that manages the multi-monitor >> case. I tested that it works as expected. > > Obviously so. 50% of the code you just committed _is_ straight from the > MS Windows code you just tested ;-) Oh, I was a bit puzzled by your mention of the "stolen" code, now I know from where it came :-) Thanks for your help. From unknown Tue Jun 24 06:53:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 06 Mar 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator