From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2015 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21348@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.144054333730472 (code B ref -1); Tue, 25 Aug 2015 22:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Aug 2015 22:55:37 +0000 Received: from localhost ([127.0.0.1]:38371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUN7w-0007vP-5k for submit@debbugs.gnu.org; Tue, 25 Aug 2015 18:55:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39222) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUN4e-0007qa-TE for submit@debbugs.gnu.org; Tue, 25 Aug 2015 18:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUN4d-0000R6-99 for submit@debbugs.gnu.org; Tue, 25 Aug 2015 18:52:12 -0400 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, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUN4d-0000R2-5f for submit@debbugs.gnu.org; Tue, 25 Aug 2015 18:52:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUN4b-0006NW-SX for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 18:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUN4a-0000QK-Nk for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 18:52:09 -0400 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:33923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUN4a-0000QA-Hy for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2015 18:52:08 -0400 Received: by oiey141 with SMTP id y141so110581989oie.1 for ; Tue, 25 Aug 2015 15:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=zWBtWpmYdDip2+gbFWIoM93iHxzeae6tINymrT15JKU=; b=fOEgaY1pTl4F9dgh+7chyoTDf9svq7w8BY6Uz8PE4dqZJK3yE5qrFOwvxnaT8R0eCx kmo4DSJIaa9jGmvffcp0k0ToGf+5XGJCasrHyTbLOeHdYIVJXQthHTvGsuPrqNz5KC2n MgiW/UidL/7njRdoO+knBo8yf3VdmO3cDzD/VzD5c6w0RgEF+B8jkWnOxaCDL4X3kv5U TIPYbWQaQvrweA2qhQFqyo0EXFsfHWtHOCi3xeVS6eS/xI2XGaZtYOZx8LvtVwo+Bf/i 1UNTW/AqBMcQ82JyFTxj4mAW4+inSLBkLEVYN+HR0OUSV+Gya4DXxuTxhCfJ9lN7sD9g hQ+Q== X-Received: by 10.202.104.92 with SMTP id d89mr28436209oic.37.1440543127711; Tue, 25 Aug 2015 15:52:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.60.131 with HTTP; Tue, 25 Aug 2015 15:51:28 -0700 (PDT) From: Ryan Prior Date: Tue, 25 Aug 2015 17:51:28 -0500 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Tue, 25 Aug 2015 18:55:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) I'm on Ubuntu 14.04.3 using a Dell XPS 13, which has screen resolution 3200x1800. In order to make the menus large enough to read, the screen is scaled at x2. However, at that scale setting, Emacs shows tooltips and menus at an offset a few inches down and to the right of the mouse pointer. Using the settings panel I can change the scaling factor. If I reduce it below 2, for example to 1.88, then Emacs displays menus and tooltips where I would expect. At a scale setting equal to or higher than 2x, the menus and tooltips are shifted down and to the right. In GNU Emacs 25.0.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-08-25 Repository revision: ef4c2eac6c6e1df8f40efde52d737d911cf2dcf9 Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.3 LTS Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: delete-selection-mode: t global-anzu-mode: t anzu-mode: t diff-auto-refine-mode: t global-auto-complete-mode: t auto-complete-mode: t origami-mode: t show-paren-mode: t global-hl-line-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading desktop...done Loading hl-line...done Loading paren...done Making url-show-status local to *http 127.0.0.1:60551* while let-bound! Wrote /home/ryan/.emacs.d/.emacs.desktop.lock Desktop: 1 frame, 5 buffers restored. For information about GNU Emacs and the GNU system, type C-h C-a. user-error: Beginning of history; no preceding item user-error: End of history; no default available Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils delight delsel dired-x solarized-theme solarized-definitions markdown-mode noutline outline autorevert filenotify dired anzu flymake compile comint ansi-color ring vc vc-dispatcher vc-git diff-mode network-stream nsm starttls tern-auto-complete auto-complete popup tern easy-mmode url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns mail-prsvr password-cache url-vars mailcap edmacro kmacro origami origami-parsers cl gv s ucs-normalize dash js advice byte-opt bytecomp byte-compile cl-extra help-mode cconv json imenu thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs finder-inf go-mode-autoloads info package easymenu epg-config paren hl-line desktop frameset cl-loaddefs pcase cl-lib cus-start cus-load time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 345073 13391) (symbols 48 32645 0) (miscs 40 334 142) (strings 32 55155 9852) (string-bytes 1 1623474) (vectors 16 47253) (vector-slots 8 817466 5450) (floats 8 250 54) (intervals 56 393 0) (buffers 976 16) (heap 1024 29843 1634)) From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2015 02:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Prior Cc: 21348@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144055729619122 (code B ref 21348); Wed, 26 Aug 2015 02:49:01 +0000 Received: (at 21348) by debbugs.gnu.org; 26 Aug 2015 02:48:16 +0000 Received: from localhost ([127.0.0.1]:38476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUQl5-0004yL-Tq for submit@debbugs.gnu.org; Tue, 25 Aug 2015 22:48:16 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:33382) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUQl3-0004yD-F7 for 21348@debbugs.gnu.org; Tue, 25 Aug 2015 22:48:14 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NTO006004LK0600@a-mtaout22.012.net.il> for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 05:48:12 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTO005XK54BZP20@a-mtaout22.012.net.il>; Wed, 26 Aug 2015 05:48:12 +0300 (IDT) Date: Wed, 26 Aug 2015 05:48:02 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83bndug3z1.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 1.0 (+) > From: Ryan Prior > Date: Tue, 25 Aug 2015 17:51:28 -0500 > > I'm on Ubuntu 14.04.3 using a Dell XPS 13, which has screen resolution > 3200x1800. In order to make the menus large enough to read, the screen > is scaled at x2. What does that mean? Which pixel coordinates are affected by this, and how could Emacs know that? > However, at that scale setting, Emacs shows tooltips and menus at an > offset a few inches down and to the right of the mouse pointer. > > Using the settings panel I can change the scaling factor. If I reduce it > below 2, for example to 1.88, then Emacs displays menus and tooltips > where I would expect. At a scale setting equal to or higher than 2x, the > menus and tooltips are shifted down and to the right. Sounds like some X API calls lie to us, but it's impossible to fix this without knowing which ones. From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2015 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Prior , 21348@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144057939419402 (code B ref 21348); Wed, 26 Aug 2015 08:57:02 +0000 Received: (at 21348) by debbugs.gnu.org; 26 Aug 2015 08:56:34 +0000 Received: from localhost ([127.0.0.1]:38554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUWVV-00052r-AX for submit@debbugs.gnu.org; Wed, 26 Aug 2015 04:56:33 -0400 Received: from mout.gmx.net ([212.227.17.22]:60703) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUWVS-00052h-52 for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 04:56:30 -0400 Received: from [194.166.86.236] ([194.166.86.236]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M6730-1YXicA3Z9u-00yCY9; Wed, 26 Aug 2015 10:56:28 +0200 Message-ID: <55DD7F38.7070506@gmx.at> Date: Wed, 26 Aug 2015 10:56:24 +0200 From: martin rudalics MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:cbbxnqrUYvjvTAQjo0Tg6gDzvDoRf/tt+vXg3AAFmUYx7b9iZm3 fSZFHexmIbHlQ5RlgmI264Cwsl7eNzSFbuJcs6eRaR3xQB6VkXIViiqv/9kJjNaGIJAIQTE lvWwtMD80z/5Ng0smEYq/YEVlMxzDcYBQmqXGgm5ortmbc/d8Fte1WMG0NaMpE5ZCUq+6qo e2GBuKUQDtfB7aZnqv6eg== X-UI-Out-Filterresults: notjunk:1;V01:K0:QsGvzN3A59c=:YOu9IReW/WtlHXhyZ+Lk0n lIyrT1gXgr7hUdZpMh+g3R3AKViMqRzq5psgpI2KbfbVYlz1xy+E2nZNOZDp2IGxKGqFxnq0N I8P06bjwhgBtMHfO27Y8ARjrrB326zCsxgYQ6on5+R8MrZLDDct1H1iIHow25LMDQhof2UegK bNlzfwVs07LfP14ZEJjKm7r5+/tar1n6mKy2Uu4ruzIEVtAtLl+3+TJivkMJEEzlpdah57PKL PVFI7G1axm9+Hr2qvQd79AQ6shFLOv6TNIyPktKCa+uqm51XMMnTIPUMh4uQ3QxAxUOPAJzD/ Pg4UHK7dtqC6Sc+hfD/F87GVA71gN7R+jot4i4O2WgcplKHZbHMQvd0InqQ1pmd4ZoiGvxOEf F/jbidH90XW6+DXahwOdq/jHXm2uCWBbVxDLi6fosw9tfvRh8oSfDxzOE0kUEkrGCIaqSi7xR d9l96MBOM1jKhiQ5MgUPj/2am/xvxk43K6HHWf4PcJx7nPVNFwQ45F5b20kcuTeQUoJKMuuR7 clEtJ40MSMY+ZW2gRlHWsU+rLFndmo0ziEW4XJF4/3yzyLOhgeoxhyaCD4vbUcjZWDhGNLEJa DWjYUoW0PoBsS2qHheBNxmDD4LHtXVAcoowX2TToYwIl7sv9gkAPumeZiZ4MblldTAeuA1shp 7s9qT4XHPEL+kEUPei0F4JCehf8Q7td85vef4Zrvl0wlLBMl++Dcq76xb8IB6xUKAA3FDTjMw AL7a96Fa6stCCwzhkw1JKWSxLOLCV1QWqbbuPA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) > I'm on Ubuntu 14.04.3 using a Dell XPS 13, which has screen resolution > 3200x1800. In order to make the menus large enough to read, the screen > is scaled at x2. > > However, at that scale setting, Emacs shows tooltips and menus at an > offset a few inches down and to the right of the mouse pointer. > > Using the settings panel I can change the scaling factor. If I reduce it > below 2, for example to 1.88, then Emacs displays menus and tooltips > where I would expect. At a scale setting equal to or higher than 2x, the > menus and tooltips are shifted down and to the right. What does evaluating for a maximized frame (frame-geometry) and (display-monitor-attributes-list) return for you? And please tell me whether mouse warping is also affected by this: Put (let ((position (window-absolute-pixel-position))) (set-mouse-absolute-pixel-position (car position) (cdr position))) into *scratch*, move point after it and type C-x C-e. Is the mouse pointer shifted from the upper left corner of the cursor glyph by the same amount as the menus and tooltips? martin From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2015 08:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Ryan Prior Cc: 21348@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144057940219423 (code B ref 21348); Wed, 26 Aug 2015 08:57:03 +0000 Received: (at 21348) by debbugs.gnu.org; 26 Aug 2015 08:56:42 +0000 Received: from localhost ([127.0.0.1]:38557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUWVe-00053C-1d for submit@debbugs.gnu.org; Wed, 26 Aug 2015 04:56:42 -0400 Received: from mout.gmx.net ([212.227.17.21]:55054) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUWVc-000535-PM for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 04:56:41 -0400 Received: from [194.166.86.236] ([194.166.86.236]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MO7Ca-1ZP0CX2l9w-005b56; Wed, 26 Aug 2015 10:56:37 +0200 Message-ID: <55DD7F40.1000109@gmx.at> Date: Wed, 26 Aug 2015 10:56:32 +0200 From: martin rudalics MIME-Version: 1.0 References: <83bndug3z1.fsf@gnu.org> In-Reply-To: <83bndug3z1.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:0R4Tj4GkCJqTvp3taiKkbzKgB05Oj5g+hsU1+/VPQGC+K57sTV1 XVh1STTnlwFzHaAGtCUvGYEnnB8aA6+ZN6yJpD+Op2lv+TUa6ElEi0rx6F3dr6xKDLXT+q+ eR81JfS6nAHTasoS1JmVT6lbthe3w0dj7LKyc3konF6N0ZT0nf4APi2mT3eNRtCrR+tR2o1 rbM5UspBv4qC1RX4xSt2Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:iTZwR2bZWuU=:uo1nL6pzNpQLeGFGufAEpr ZxFhR5Gj8g/njAtLQFdSrsDQLeJyl3BUgMYb7GuGYVdGwnT6sw/H0FCoxv4QLdO3Q+P83yeQx BJd0Ky0WU4zUNQjQXu2/8dTFge4EYbxkkPe0apRK6QDRlmbdtd5E9y5i8hyDKT+nyIQfS1pnV vWmLojSiW3+wi8cuMMqWAqI7OnwAoSS2azsFnL03fMVfyaqgDdhKz/4iS79TrZkhn5q2IIRzV 5reTUWisC48mRuqOt2WtQl8YjnA26eS1ZRj+GXPw5GKgzX/ra5ZZM+ktaC111OrKW0WlUutk3 8ZHfuTYNTu3CVxKgemHlpAK/KBaj3CfvepkSRd0PDfoNNP50syb3F5NvysY/HhXnR63oza4mi wLAOMq/XSVS3QZzwLbN6AFjpWehFIjsi9z0ZT8tZ2tTa9FibdsWStXl+rk5AB6sUtU0Po/Fnr QCCTd/d0Fi0SmD9EiDzf3nr8a7lIvCkp5Rb63z4j8MbAnKuENS+1VlypRkyZ4CnC5oJVNIfZ2 aqj+dRUXClzA0ZXEg7RngNllGqiUTlLQ4yP1Plv/RwHDZWFKEetoUVY9vj6z4xtc8s2nn0sZw /QdINAC7YHT17p4RQ+4K2IDvxWK9wCH2Ib3Q1hEaqEw7rUMKCIDli9TlTZrsjgDIO0PrxTxrW c8BwW9WxgGY+DoSfYZdw4zFEGO/KZDW3hB+7fgG6nDUNP6Z7ktPHzJhX2x0nQogFh/+BhNRv2 e3lnedy0wYC04dqAYvpI1JO6C4i478ohOgu22w== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) >> I'm on Ubuntu 14.04.3 using a Dell XPS 13, which has screen resolution >> 3200x1800. In order to make the menus large enough to read, the screen >> is scaled at x2. > > What does that mean? Which pixel coordinates are affected by this, > and how could Emacs know that? Via gtk_widget_get_scale_factor, I suppose. > Sounds like some X API calls lie to us, but it's impossible to fix > this without knowing which ones. In any case it will be a pain to fix this :-( martin From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2015 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 21348@debbugs.gnu.org, ryanprior@gmail.com Reply-To: Eli Zaretskii Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144060323327985 (code B ref 21348); Wed, 26 Aug 2015 15:34:02 +0000 Received: (at 21348) by debbugs.gnu.org; 26 Aug 2015 15:33:53 +0000 Received: from localhost ([127.0.0.1]:38938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUci1-0007HJ-DD for submit@debbugs.gnu.org; Wed, 26 Aug 2015 11:33:53 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:33178) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUchz-0007HA-Lq for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 11:33:52 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NTP00I004K04900@a-mtaout20.012.net.il> for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 18:33:50 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTP00IRN4KD0620@a-mtaout20.012.net.il>; Wed, 26 Aug 2015 18:33:50 +0300 (IDT) Date: Wed, 26 Aug 2015 18:33:49 +0300 From: Eli Zaretskii In-reply-to: <55DD7F40.1000109@gmx.at> X-012-Sender: halo1@inter.net.il Message-id: <83oahu5ajm.fsf@gnu.org> References: <83bndug3z1.fsf@gnu.org> <55DD7F40.1000109@gmx.at> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 1.0 (+) > Date: Wed, 26 Aug 2015 10:56:32 +0200 > From: martin rudalics > CC: 21348@debbugs.gnu.org > > >> I'm on Ubuntu 14.04.3 using a Dell XPS 13, which has screen resolution > >> 3200x1800. In order to make the menus large enough to read, the screen > >> is scaled at x2. > > > > What does that mean? Which pixel coordinates are affected by this, > > and how could Emacs know that? > > Via gtk_widget_get_scale_factor, I suppose. But if GTK knows about that, shouldn't it DTRT with tooltips automagically? In a GTK build the tooltips are presented by GTK, right? From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2015 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: martin rudalics , 21348@debbugs.gnu.org, ryanprior@gmail.com Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144060523931232 (code B ref 21348); Wed, 26 Aug 2015 16:08:02 +0000 Received: (at 21348) by debbugs.gnu.org; 26 Aug 2015 16:07:19 +0000 Received: from localhost ([127.0.0.1]:38977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUdEM-00087f-D3 for submit@debbugs.gnu.org; Wed, 26 Aug 2015 12:07:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55090) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUdEG-00087Q-MR for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 12:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUdEF-0007ee-WF for 21348@debbugs.gnu.org; Wed, 26 Aug 2015 12:07:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUdED-0007do-Dj; Wed, 26 Aug 2015 12:07:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZUdEB-0001iW-2Q; Wed, 26 Aug 2015 12:07:07 -0400 From: Glenn Morris References: <83bndug3z1.fsf@gnu.org> <55DD7F40.1000109@gmx.at> <83oahu5ajm.fsf@gnu.org> X-Spook: Worm AVIP wire transfer Small Pox ISEC electronic X-Ran: ('n]t5[FNdDcx3U/I(t71CL+{oqneg*u0myyW}#FPjQgVHb1SPVs0P#KD.lf;-00an`tCh X-Hue: blue X-Attribution: GM Date: Wed, 26 Aug 2015 12:07:06 -0400 In-Reply-To: <83oahu5ajm.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Aug 2015 18:33:49 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -6.4 (------) I assume this is the same as bug#20619 (see also #18429). Jan thought it would be "a huge undertaking" to fix. But presumably such issues will become increasingly common. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 12:08:24 2015 Received: (at control) by debbugs.gnu.org; 26 Aug 2015 16:08:24 +0000 Received: from localhost ([127.0.0.1]:38981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUdFP-00089S-U9 for submit@debbugs.gnu.org; Wed, 26 Aug 2015 12:08:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55817) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUdFO-00089K-Ha for control@debbugs.gnu.org; Wed, 26 Aug 2015 12:08:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUdFK-0000C1-FI for control@debbugs.gnu.org; Wed, 26 Aug 2015 12:08:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUdFK-0000Bw-Ca for control@debbugs.gnu.org; Wed, 26 Aug 2015 12:08:18 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZUdFJ-0001qT-T8 for control@debbugs.gnu.org; Wed, 26 Aug 2015 12:08:18 -0400 Subject: control message for bug 21348 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 26 Aug 2015 12:08:17 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -6.4 (------) merge 20619 21348 From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Aug 2015 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21348@debbugs.gnu.org, ryanprior@gmail.com Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144066229012139 (code B ref 21348); Thu, 27 Aug 2015 07:59:02 +0000 Received: (at 21348) by debbugs.gnu.org; 27 Aug 2015 07:58:10 +0000 Received: from localhost ([127.0.0.1]:39615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUs4Y-00039j-1Y for submit@debbugs.gnu.org; Thu, 27 Aug 2015 03:58:10 -0400 Received: from mout.gmx.net ([212.227.17.21]:59162) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZUs4W-00039a-IO for 21348@debbugs.gnu.org; Thu, 27 Aug 2015 03:58:08 -0400 Received: from [62.46.213.30] ([62.46.213.30]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Ln8gj-1Yo8nb19Mj-00hMYy; Thu, 27 Aug 2015 09:58:06 +0200 Message-ID: <55DEC308.7060400@gmx.at> Date: Thu, 27 Aug 2015 09:58:00 +0200 From: martin rudalics MIME-Version: 1.0 References: <83bndug3z1.fsf@gnu.org> <55DD7F40.1000109@gmx.at> <83oahu5ajm.fsf@gnu.org> In-Reply-To: <83oahu5ajm.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:vsrpZMIR0evpc4Dqmu8hTq5VWzmJUxJk7iF4wqD5V5y9A2O98tF e2t0KWHzMIe+HYUfGD/nfM3cDMrEO/Bs6xTDWfq05lAGoNSykyz7hFzRXswRNimCAAqFvtH WOuUPRWsDFV3cSkUnas0XP/Vp+Eyj6OFRvSVvQtYZtFIPRCMve6Qo/dJ3K9NBXT1prx5s7K NBUJEkFGe1eb0sC3uA1Vg== X-UI-Out-Filterresults: notjunk:1;V01:K0:QVP08G6TAI8=:SE5Pgm9P8fY93aGAE2Fd/0 N30Reqqp7Q2DoZOfP1VEQwJVFL6tHxJRBciGAXv5WJctkWNM3GY4BtUhDIyNhnfk9S2sTXF56 DG5EiEslaaNpHoyz9DVPH50DxKI4tk8JILYR/RXWVP/vDkdDygo+E63VcxfqFetB02PuoErG6 3rYzvgqjE1GVxVOqjloaBkUBE8znF66Y/OWpU3h9t0btUz9GyMkg0aUbAWo8wUprvGsPHA/Mx b+pUeaUi7+o8XPw895jXs/LfmDesHVILdiajo9/jbVYW99A2yWQ354f5BnpE41Ki+eVdXs1VX 2W+Ch9ugNvPbuRqlc04q/s9VojOlVeIpIHDuuRscZhL7lb5b2Ohw9h16cCriuv9Xwvs2xDMMw ATroqAg184r/vm28aAi/z1tK5/UvoyQoCTrq6zFNLRrkx39pvYqsE+14KmYvbDm3ZObcQR7r1 7iBlzqd8AZmfUClFRDQMBTpC0/4JeR4i/MPtpGPJGG4sdTY5sgCj2grRjS1usCoclc6RJvlqu LQaWGlpvoy/GgarIp9ixMKE9snowtQT8Zm18iP6R4dMm1Oq34UvdV9lRihClaSK/U2pzy/aoc vPa7Ek4T3v/hyR/bB4MlSUG8OnfXR/alIrvMXKdz9xtXmsACla5390zLtRQrs/wbwK/XeyaF8 SXuKj9+5h6Bb4rItT6BXSU4W+e9G1iuMJkODP8/SU/P+pXxChe9Givcl3aClH6NU4v+nZWrIz /tbRskaasFEj3MDJiW229whR+lXZAsxmJv2l/Q== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) > But if GTK knows about that, shouldn't it DTRT with tooltips > automagically? In a GTK build the tooltips are presented by GTK, > right? Not necessarily. For example I build without them because they are ugly. I don't understand yet where this scaling takes place. If we only have problems to change window coordinates to display coordinates, the problem should be manageable. martin From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Oct 2015 21:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21348@debbugs.gnu.org Cc: 20619@debbugs.gnu.org, 18429@debbugs.gnu.org, 21469@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144468426027167 (code B ref 21348); Mon, 12 Oct 2015 21:11:03 +0000 Received: (at 21348) by debbugs.gnu.org; 12 Oct 2015 21:11:00 +0000 Received: from localhost ([127.0.0.1]:37562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZlkN1-000745-Uz for submit@debbugs.gnu.org; Mon, 12 Oct 2015 17:11:00 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:34007) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZlkMx-00073R-84; Mon, 12 Oct 2015 17:10:55 -0400 Received: by iow1 with SMTP id 1so1394851iow.1; Mon, 12 Oct 2015 14:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=/aPe9rmSDBXVRJR/74k5aFwqTd2UEqSAG0Y3Db3mmH8=; b=fhoGXgpjmmbD77BLLd7WiMBj1qmu4JuxJL4MDmK3a9nY/5Pa+mpG3NxMUIsywT3x17 HEfn5X52k3VL68YLqbP/H5BVUjYLpUbHmgC/j/Jt1Voa7b1gN6BkTD0d34LjE2D6l+Zv Z4u/AwufRhr/Nc9rSQ++DjXQh0BGrD4MyLKGVKoKGc9iox+LXpsy8IBO99QWpnJKrzgR c+CvGUTdH6+L2E9GocePR5ZX704xw/iyBxumNKJrj9PznkM32ZORE1iJrNJgEpXtIYk8 CTUAeOHEiAh2wys5GY+lQY9PGqA7pNx4CwKcrSSXbyHRhfQ4+JmZpmWKbYa8hy6W+aQ8 K5ww== X-Received: by 10.107.148.72 with SMTP id w69mr35411639iod.82.1444684254816; Mon, 12 Oct 2015 14:10:54 -0700 (PDT) Received: from ryan-XPS-13-9343 ([137.28.231.82]) by smtp.gmail.com with ESMTPSA id t7sm107640igz.10.2015.10.12.14.10.53 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Oct 2015 14:10:53 -0700 (PDT) From: Ryan Prior In-Reply-To: (Ryan Prior's message of "Tue, 25 Aug 2015 17:51:28 -0500") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Date: Mon, 12 Oct 2015 16:10:52 -0500 Message-ID: <86twpvhjxf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 I wrote a patch to fix the issues from bugs #20619 and #21348 for GTK users. When the functions to display a tooltip or menu are called, Emacs scales coordinates using a factor from GTK. In my testing, non-GTK tooltips and menus weren't broken, so the problem is specific to GTK and the patch has no effect on non-GTK builds. Michael Droettboom, will you apply this patch and verify that the menus are now placed correctly on your system? There's something else entirely going on with the scroll bars in bug #21469, this patch doesn't address that at all. I had never noticed that hidpi bug because I dont use scroll bars, but I can confirm that turning on scroll bars causes strange behavior. It might be possible that a similar scaling strategy for scroll bar placement could provide a fix, so I CC'd that bug. I will investigate that more as time allows. The final hidpi bug I looked at, #18429, I am unable to reproduce. Perhaps it is not applicable to my platform - I'm on Ubuntu Trusty, while the reporter is on Utopic. Anders Kaseorg, can you still reproduce the bug? Finally, there's the open question of why the coordinates these functions are getting are doubled in the first place. Given my limited familiarity with Emacs internals, I have not made any progress on that question. Perhaps there are few enough places where these sometimes-inflated coordinates are passed into GTK that we can just scale them everywhere and call it good enough. Or perhaps there's a more robust solution somewhere else - if anybody can help explain this to me, I would be appreciative. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Adjust-overlay-position-on-hidpi-screens.patch Content-Description: patch to fix bugs #21348, #20619 >From 3addec3d592b9fc81e2a1503a37ccb078f03118c Mon Sep 17 00:00:00 2001 From: Ryan Prior Date: Fri, 2 Oct 2015 19:22:28 -0500 Subject: [PATCH] Adjust overlay position on hidpi screens Scale the display positions of tooltips and menus according to the window scaling factor provided by GTK3, if it is available (Bug#21348). * src/gtkutil.h (xg_scale_x_y_with_widget): * src/gtkutil.c (xg_scale_x_y_with_widget): Fuction finds scaling factor and performs scaling. (xg_show_tooltip): Divide position of tooltip by scaling factor. * src/xmenu.c (create_and_show_popup_menu) [HAVE_GTK3]: Divide position of native GTK3 menus by scaling factor. --- src/gtkutil.c | 14 ++++++++++++++ src/gtkutil.h | 4 ++++ src/xmenu.c | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index 34e81b5..db80b2e 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -748,6 +748,7 @@ xg_show_tooltip (struct frame *f, int root_x, int root_y) if (x->ttip_window) { block_input (); + xg_scale_x_y_with_widget(GTK_WIDGET(x->ttip_window), &root_x, &root_y); gtk_window_move (x->ttip_window, root_x, root_y); gtk_widget_show_all (GTK_WIDGET (x->ttip_window)); unblock_input (); @@ -3223,6 +3224,19 @@ xg_update_submenu (GtkWidget *submenu, return newsub; } +/* Scale X and Y. + WIDGET the gtk widget from which to get the scaling factor */ +void +xg_scale_x_y_with_widget (GtkWidget *widget, + int *x, + int *y) +{ + gint scale_factor = gtk_widget_get_scale_factor(widget); + if(x) *x /= scale_factor; + if(y) *y /= scale_factor; +} + + /* Update the MENUBAR. F is the frame the menu bar belongs to. VAL describes the contents of the menu bar. diff --git a/src/gtkutil.h b/src/gtkutil.h index 34338db..8db063a 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -96,6 +96,10 @@ extern GtkWidget *xg_create_widget (const char *type, GCallback deactivate_cb, GCallback highlight_cb); +extern void xg_scale_x_y_with_widget (GtkWidget *widget, + int *x, + int *y); + extern void xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f, struct _widget_value *val, diff --git a/src/xmenu.c b/src/xmenu.c index 192ed89..1b7bbb5 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1229,6 +1229,12 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, /* Child of win. */ &dummy_window); +#ifdef HAVE_GTK3 + /* Use window scaling factor to adjust position for hidpi screens. */ + xg_scale_x_y_with_widget(GTK_WIDGET(f->output_data.x->ttip_window), + &x, + &y); +#endif unblock_input (); popup_x_y.x = x; popup_x_y.y = y; -- 2.6.1 --=-=-=-- From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: bug#21469: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2015 15:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Prior , 21348@debbugs.gnu.org Cc: 20619@debbugs.gnu.org, 18429@debbugs.gnu.org, 21469@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.14447515145492 (code B ref 21348); Tue, 13 Oct 2015 15:52:03 +0000 Received: (at 21348) by debbugs.gnu.org; 13 Oct 2015 15:51:54 +0000 Received: from localhost ([127.0.0.1]:38928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm1rl-0001QR-Gx for submit@debbugs.gnu.org; Tue, 13 Oct 2015 11:51:53 -0400 Received: from mout.gmx.net ([212.227.17.20]:60951) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm1rf-0001Pq-MN; Tue, 13 Oct 2015 11:51:48 -0400 Received: from [188.22.238.113] ([188.22.238.113]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LgI0W-1aOePO1GlQ-00neDu; Tue, 13 Oct 2015 17:51:46 +0200 Message-ID: <561D288E.7070803@gmx.at> Date: Tue, 13 Oct 2015 17:51:42 +0200 From: martin rudalics MIME-Version: 1.0 References: <86twpvhjxf.fsf@gmail.com> In-Reply-To: <86twpvhjxf.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:8j+pBGyt3wE2IIIUEUy160DB8nnWh1Lo0JYNZ0vp1PZbJX+51cj 0D9YCh5xN43XuXrzPcEXV0icSu1mLF1knjFg0Z9SYTT9yjhS+h7wbIhFjWLpAX5LKfAXyAU Yi8aRnwGDCr17yVvyXNDihEERH5HUB0cKH3iiwKnBt7YiazvYjQr+2de29ykbDdtjZeYMfH DEeIftd//23U3BUMJPgaw== X-UI-Out-Filterresults: notjunk:1;V01:K0:opKyW66IunQ=:rUMwifr2d0GCbKulKPz5WB WF80fIGQLHj9xf0/R1tqufJmcKbYbzdaB+b66X8SwTWxKFf+2sQKcAMAs1pxQKuQMGeIScWlC qFCDcXw95bEGzVTMpPBAqw5FIRlPxPYIwwv7VqntAu/VNhp9DCyr9CUGuBSgUgCp+VPfx50xE Q9ODeHCGJmL/oxf7r3N5Am3mXYr+3KwCFwyltWzS3iDk1RF4Zrkg0pjhpKe0fUfBFUv/A5SaS fKvMO0NmcJXhMIIStkvisIL6DT32UPNMHzeXV/walmwcMNOwOwVyKpdYBo0+fTW9xjK+kMsuI kR5/eRJ8xhB19HiZGdiST1UmG1/qQwQ2ZrpbwbzKF+cwxx4Yg4+IbqGaf3JKyFVvMCBqT27s6 hmfE1ctno2s2OnOoXdoAQM04sGJUo1T4srAJq5pA3kCodAeuWT8U/fIaDDNpdd+BKVM6gD1St zVf4MX7OeYBU63mYxSqYMye9cbtjQdoU3QfSwAMGG3w4EEXdovXkwsp+fmh4LzCxtfvYqbQlP KroB5bP4opjNWbN2Jitpdxfuym5oVnzogogZ/M4znQN0bWaPRS6io7TFbQJm2QZJMfjBupiGV bileDw/dLtQKguouZd5eBIvsnqZyrk68K2NNWcaIi7/wWQuK3c/Q90iluLseXZCLjM2Uau1/o VPMCLpgPiNO0i5neRwrGkOfhRWi1VIurPAKsHXiLBcbZShhcS15Ar6P94Yaju6R3tqLKDrkvg TWFdGr9qLOTdtStHyxLSmIuQZKwtQre9vrvPZdDTOZmpZoPpUPTwD1yka2HgxuFCIOd7dk1dP M6el7rH X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) > I wrote a patch to fix the issues from bugs #20619 and #21348 for GTK > users. When the functions to display a tooltip or menu are called, Ema= cs > scales coordinates using a factor from GTK. In my testing, non-GTK > tooltips and menus weren't broken, so the problem is specific to GTK a= nd > the patch has no effect on non-GTK builds. Thank you very much Ryan. Your help is very appreciated. > Michael Droettboom, will you > apply this patch and verify that the menus are now placed correctly on= > your system? Michael, pretty please, do that. If you have any problems applying the patch or building Emacs, please tell us. It would be great to fix and test this before the release. > There's something else entirely going on with the scroll bars in bug > #21469, this patch doesn't address that at all. I had never noticed th= at > hidpi bug because I dont use scroll bars, but I can confirm that turni= ng > on scroll bars causes strange behavior. Is the behavior you see "consistent"? Robert's screenhots seem to tell that the x-position of each scrollbar is always twice of what it should be. > It might be possible that a > similar scaling strategy for scroll bar placement could provide a fix,= > so I CC'd that bug. I will investigate that more as time allows. That would be great. > The final hidpi bug I looked at, #18429, I am unable to > reproduce. Perhaps it is not applicable to my platform - I'm on Ubuntu= > Trusty, while the reporter is on Utopic. Anders Kaseorg, can you still= > reproduce the bug? Let's hope that Anders is listening. > Finally, there's the open question of why the coordinates these > functions are getting are doubled in the first place. Given my limited= > familiarity with Emacs internals, I have not made any progress on that= > question. Perhaps there are few enough places where these > sometimes-inflated coordinates are passed into GTK that we can just > scale them everywhere and call it good enough. I don't see any problems with such a solution. > Or perhaps there's a more > robust solution somewhere else - if anybody can help explain this to m= e, > I would be appreciative. Are the frame parameters =E2=80=98top=E2=80=99 and =E2=80=98left=E2=80=99= affected? Suppose you do say (set-frame-parameter nil 'left 500) with scaling in effect. Does the frame appear 500 pixels left of the left screen edge? If not, then mouse warping (=E2=80=98set-mouse-absolute-pixel-position=E2=80=99) is pr= obably affected too and we really have to look into a more generic solution. martin From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: bug#21469: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2015 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 20619@debbugs.gnu.org, 18429@debbugs.gnu.org, 21348@debbugs.gnu.org, 21469@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.14447541229814 (code B ref 21348); Tue, 13 Oct 2015 16:36:02 +0000 Received: (at 21348) by debbugs.gnu.org; 13 Oct 2015 16:35:22 +0000 Received: from localhost ([127.0.0.1]:38958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm2Xp-0002Y5-4z for submit@debbugs.gnu.org; Tue, 13 Oct 2015 12:35:21 -0400 Received: from mail-yk0-f170.google.com ([209.85.160.170]:34180) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm2Xi-0002Xe-UZ; Tue, 13 Oct 2015 12:35:15 -0400 Received: by ykdg206 with SMTP id g206so22204493ykd.1; Tue, 13 Oct 2015 09:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Aw6lc+XRdcLkjToCPFhWG+oZoVjiAjgUYXnYCMxXzgg=; b=m2c+7ytCb8aAu4INey9WI8+j2LTMROzwdcn7mTB6wi5uFHLwJA9/+isSG9hyBb6Ycz gYQw24U1XTTOgHxWxWTDwVhYCQHr/1bblS5gSI29XiLaF54AIGdmao8i3eb/AdRGxw2Z LIQDDQ70ojKs2+qsYGRC6NcuHpsgMFZlYah6Aq02Xx9/+1oaMqjulhSlwE8SM3+2uUji FDUIArx2rxIAhqsrX2OVeeGOAxKP9rYvd5wSe/9nXgZi1ZBqa5Ert1JnZEYEzDKsTpfn mWUTTyJRzBRBtYJc8yGYpVqzXZJkQ8+eiWG2OBGy/wdJPYy3VFEIgVZfUeGOb/ad9tti 4vpA== X-Received: by 10.13.217.80 with SMTP id b77mr28126999ywe.339.1444754114341; Tue, 13 Oct 2015 09:35:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.87.193 with HTTP; Tue, 13 Oct 2015 09:34:34 -0700 (PDT) In-Reply-To: <561D288E.7070803@gmx.at> References: <86twpvhjxf.fsf@gmail.com> <561D288E.7070803@gmx.at> From: Ryan Prior Date: Tue, 13 Oct 2015 11:34:34 -0500 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) On Tue, Oct 13, 2015 at 10:51 AM, martin rudalics wrote: > Are the frame parameters =E2=80=98top=E2=80=99 and =E2=80=98left=E2=80=99= affected? Suppose you do say > (set-frame-parameter nil 'left 500) with scaling in effect. Does the > frame appear 500 pixels left of the left screen edge? If not, then > mouse warping (=E2=80=98set-mouse-absolute-pixel-position=E2=80=99) is pr= obably affected > too and we really have to look into a more generic solution. I spent some time playing with frame positions. TABLE: `(set-frame-parameter nil 'left ,x) _____________________________________________ x | actual frame distance from left screen edge (px) 0 | 20 500 | 520 1600 | 1620 1800 | 1772 2000 | 1772 A few observations: 1) offset of 20 pixels I've never noticed this issue because it doesn't affect maximized frames. Maybe that number 20 is significant somehow, or perhaps this is a separate bug. The first time after I start `emacs -Q` and set the left frame edge to 0, the frame flashes momentarily into place flush with the left screen edge, for perhaps a single video frame, and then jumps 20 pixels to the right. Subsequent calls to set the left frame edge to 0 do not trigger this flashing behavior. 2) numbers are proportional, modulo the unexplained offset We do not see doubling behavior here. I have added no scaling code pertaining to frame positioning. 3) frame "sticks" to the right screen edge Given the width of the frame I was testing with, when the left frame edge is 1772 pixels from the left screen edge, the right frame edge is flush with the right screen edge. Setting the left frame edge to a greater value does not result in a further movement of the frame. l appreciate any help with corroboration and analysis of these results. Yours, Ryan From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: bug#21469: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2015 17:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Prior Cc: 20619@debbugs.gnu.org, 18429@debbugs.gnu.org, 21348@debbugs.gnu.org, 21469@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144475691014000 (code B ref 21348); Tue, 13 Oct 2015 17:22:03 +0000 Received: (at 21348) by debbugs.gnu.org; 13 Oct 2015 17:21:50 +0000 Received: from localhost ([127.0.0.1]:38986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm3Gn-0003dj-Px for submit@debbugs.gnu.org; Tue, 13 Oct 2015 13:21:50 -0400 Received: from mout.gmx.net ([212.227.17.22]:59895) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm3Gl-0003dR-3i; Tue, 13 Oct 2015 13:21:47 -0400 Received: from [188.22.238.113] ([188.22.238.113]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Lkiqm-1aKHYj42dg-00aSNp; Tue, 13 Oct 2015 19:21:46 +0200 Message-ID: <561D3DA5.9000801@gmx.at> Date: Tue, 13 Oct 2015 19:21:41 +0200 From: martin rudalics MIME-Version: 1.0 References: <86twpvhjxf.fsf@gmail.com> <561D288E.7070803@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:55H+aAeVjtvLuHXy8ztASJu8BAqKGuypfFlEeEaJovFSpATIPJh lej5hcbZwBhuXW6nAOTYcuuj/JQwhdGfuG0azlhGbRp6e+Go35EaR61hzwsASGDawzI4U3v d+fPlGo9p3P8MMYK6I7gsb1yFvTpfhTKEy6qPfadPnJGvMubpCqdmTyyWoy+pq+EaC2Jbfm oSebKsVgO7P+QprKn//Rw== X-UI-Out-Filterresults: notjunk:1;V01:K0:KnKuE9vOKBs=:Y6VDbJTqwowo4MH2W4zvoy 428/0lN7grKqvxeczOLwuwJCu1SAf4k7Rz5yWmODAzRHnyqwKo0TisvjNTLem5HU0KgOjpiXR QP5PxfEj/1/7Sk/dg1cuAfya3Emyx7RUeDPlasOdi3+lO5Y5o2yOcQnSUazrUY31RBmTr/Bue kOaCAYvLh9Dq7skcUUy2LjDFiwnhBoeKfXvki24x/dOMZsl5ejgY/HDwdesfTRirIUSt0mUP7 lfVasBGkK4ml86At1Erq0A8CzLwu1s8HSVq6NnnhoVFMlUmGcGi5/cANf/dWDDXHkOehXavGj 1gnbp3fOxIUIQqZnnkumQUE2PjgQAAr/jMErkJ3th6DTNRD4kSuXvctasMPcOUaSHBH9sOsEZ aGzzEpSJrz7rnW7FBPehLn11nGG8iGou6DuBtKBYoRAqn6HXCU9idBSaIAvUsHcB+pLpL+5NO UJ6ZImJzbcGU/vP40sIQDHIjltJwSFe1Pevc7bnN5jhXoJvnkkLwuwtZvtSJwK+sy30Vm1BN2 ob/wBtzp8m1Zp5moEY8GvfZr06X/hGorCFZDvDgRug4nIKjrql/jA98S7DpWMBS2PyLBMV5H6 NfU2VsucadN6e5bSRPm3/W6SbxnQV8oo+ogUiDjAWRMGvAPvXS9Et3PO06QZdQ7C0QvDQr1JQ JiAc0YIOb9K6L6EmaUZhGKQWXDKyO5LHBjdoLxvHx8fgGLddMMemxeckbr+SZt03H4jM4jsy4 rdnwaHe3Prze3IkuskkkgPbFGRXDBs9NUx0ixxfzlMnGpo4ETB/u1YUHLAzTd1+9GmZW93w+Z 09+kuvs X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) > TABLE: `(set-frame-parameter nil 'left ,x) > _____________________________________________ > x | actual frame distance from left screen edge (px) > 0 | 20 > 500 | 520 > 1600 | 1620 > 1800 | 1772 > 2000 | 1772 > > A few observations: > 1) offset of 20 pixels > I've never noticed this issue because it doesn't affect maximized > frames. Maybe that number 20 is significant somehow, or perhaps this > is a separate bug. The first time after I start `emacs -Q` and set the= > left frame edge to 0, the frame flashes momentarily into place flush > with the left screen edge, for perhaps a single video frame, and then > jumps 20 pixels to the right. This might be window manager related. Can you try again with the =E2=80=98user-position=E2=80=99 frame parameter non-nil? Like (modify-frame-parameters nil '((left . 0) (user-position . t))) > Subsequent calls to set the left frame > edge to 0 do not trigger this flashing behavior. You mean on a subsequent attempt the frame is flushed left or still at position 20. What happens when you try something similar with the =E2=80= =98top=E2=80=99 parameter? > 2) numbers are proportional, modulo the unexplained offset > We do not see doubling behavior here. I have added no scaling code > pertaining to frame positioning. Does that mean the offset of 20 pixels appears with scaling turned off and on? > 3) frame "sticks" to the right screen edge > Given the width of the frame I was testing with, when the left frame > edge is 1772 pixels from the left screen edge, the right frame edge is= > flush with the right screen edge. Setting the left frame edge to a > greater value does not result in a further movement of the frame. So the window manager probably constrains frame positioning. What happens with a frame larger than the screen size? And does =E2=80=98set-mouse-absolute-pixel-position=E2=80=99 work normall= y? martin From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: bug#21469: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2015 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 21348@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144476871132066 (code B ref 21348); Tue, 13 Oct 2015 20:39:01 +0000 Received: (at 21348) by debbugs.gnu.org; 13 Oct 2015 20:38:31 +0000 Received: from localhost ([127.0.0.1]:39109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm6L8-0008L7-Vm for submit@debbugs.gnu.org; Tue, 13 Oct 2015 16:38:31 -0400 Received: from mail-yk0-f181.google.com ([209.85.160.181]:32833) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zm6L6-0008Kz-TY for 21348@debbugs.gnu.org; Tue, 13 Oct 2015 16:38:29 -0400 Received: by ykoo7 with SMTP id o7so28982266yko.0 for <21348@debbugs.gnu.org>; Tue, 13 Oct 2015 13:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=VKuFy5Oxfoiy6jZwQkn66WhtmL1OMZ30amIvaMWnOo0=; b=iXJIa9IqhS9uROpaYAkDgMhs7UgiyuQ4/fblsW2o05V4MB/ALhgXCFuwQx3KosOLPb lwxzQKRF8uTQMM9PdUPAaJ/MxKqiBN9WsM05hCbpn4gRS90vXq4Ubz64i8tL+VE2DBvv zl/SeXNT5WhzY9UPHnc5T79O+XDKS8ZbUgX3fHm21C0HtLfVCckokicuW6BhVKcDL/me yHRTnvXDeO/Ay2waBg7zcyvnjleE8ORMvyRIVm7CI8Fvw8j1gzPl2OhXJ7IyYtLf/idA mrHKDlGFXu8RN6YVqx3LIi9+qNafAFLpD54gvaWgUu+KpIKyNXXMqELKjNbTQgArXwPW gCVQ== X-Received: by 10.13.217.66 with SMTP id b63mr25365863ywe.152.1444768708200; Tue, 13 Oct 2015 13:38:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.87.193 with HTTP; Tue, 13 Oct 2015 13:37:48 -0700 (PDT) In-Reply-To: <561D3DA5.9000801@gmx.at> References: <86twpvhjxf.fsf@gmail.com> <561D288E.7070803@gmx.at> <561D3DA5.9000801@gmx.at> From: Ryan Prior Date: Tue, 13 Oct 2015 15:37:48 -0500 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) On Tue, Oct 13, 2015 at 12:21 PM, martin rudalics wrote: > Can you try again with the > =E2=80=98user-position=E2=80=99 frame parameter non-nil? The behavior is identical. > You mean on a subsequent attempt the frame is flushed left or still at > position 20. What happens when you try something similar with the =E2=80= =98top=E2=80=99 > parameter? The frame is never flush left except during brief flash. Immediately afterward, and subsequent to each additional call, the actual frame position is offset by 20 pixels. This is true for top just as it is for left. > Does that mean the offset of 20 pixels appears with scaling turned off > and on? Not quite. With scaling at 2x, the offset is 20 pixels. With scaling at 1x, the offset is 10 pixels. > So the window manager probably constrains frame positioning. What > happens with a frame larger than the screen size? This question opened a can of worms. The answer, on Ubuntu Trusty with Unity (Compiz) window manager, is that it depends on which virtual desktop you are on. I have four virtual desktops laid out in a 2x2 grid, which I'll refer to clockwise like so: [1][2] [4][3] On desktop 1, it behaves the same as for a frame which is smaller than the screen size and not flush with the right screen edge: offset of (10*scale) pixels when positioning left or top, doesn't appear to "stick" to anything. On desktop 2, positioning top behaves the same as desktop 1, but positioning left results in a frame flush with the left screen edge. This is not true of frames smaller than the screen size, which I previously tested on each virtual desktop and displayed consistent behavior. On desktop 4, we see a symmetric behavior where positioning left behaves the same as desktop 1, but positioning top results in a frame flush with the screen top edge. On desktop 3, positioning both left and top results in a frame flush with the respective screen edge, and I observed an additional curious behavior. Each call to set the top position also decreases the left position by a small amount, if the number of pixels specified as the top position is small. In the range of 10-30, it budged the left side; in the range of 100-500, it didn't. When I came to write up my results, I decided to try to pin down exactly where the cut-off was between values which would or wouldn't budge the frame to the left, so I restarted emacs and set about trying to reproduce it. But I can't. This time around, a frame larger than the screen behaves in all ways as I described for desktop 1. This test could be exercising some little-tested code paths in Emacs, Unity, or both. As before, I appreciate any assistance in corroborating and analyzing this information. > And does =E2=80=98set-mouse-absolute-pixel-position=E2=80=99 work normall= y? In fact, mouse-set-absolute-pixel-position works flawlessly as expected. If I set the frame left position to 0 and the mouse x position to (10*scale), they line up precisely. Similarly, I can set the mouse position to (0,0) with no problem. Ryan From unknown Sat Jun 21 03:31:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21348: bug#21469: bug#21348: 25.0.50; Screen scaling factor >=2 causes menus, tooltips to display in the wrong place Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Oct 2015 08:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Prior Cc: 21348@debbugs.gnu.org Received: via spool by 21348-submit@debbugs.gnu.org id=B21348.144481259931507 (code B ref 21348); Wed, 14 Oct 2015 08:50:03 +0000 Received: (at 21348) by debbugs.gnu.org; 14 Oct 2015 08:49:59 +0000 Received: from localhost ([127.0.0.1]:39467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZmHl0-0008C6-9s for submit@debbugs.gnu.org; Wed, 14 Oct 2015 04:49:58 -0400 Received: from mout.gmx.net ([212.227.17.20]:64802) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZmHkw-0008Bv-63 for 21348@debbugs.gnu.org; Wed, 14 Oct 2015 04:49:54 -0400 Received: from [62.47.255.84] ([62.47.255.84]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LhSfM-1aQ2PQ2vaa-00mZVr; Wed, 14 Oct 2015 10:49:52 +0200 Message-ID: <561E172B.8010500@gmx.at> Date: Wed, 14 Oct 2015 10:49:47 +0200 From: martin rudalics MIME-Version: 1.0 References: <86twpvhjxf.fsf@gmail.com> <561D288E.7070803@gmx.at> <561D3DA5.9000801@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:VLLikWYSf5m2qQ/qsSYCDTR7J/rH/72Czg1jUS/pomWi928ho0K N1jSVtVvf4E2R9bcWoxnk9o4y/xf87ELGDsQldZuLOHuW9ec3aHaJ+zqpJduZcIFR288X7k lYy1S32md7L4IRifEh+WI4OjZNyDURCYMD8St+Vt9teUxCugccbIbsPaJY5ACQNF/Zl8hfe ZKQUTphFERfm5QzZ9Fq7Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:r+OfZENUmKg=:2Ob6snnnn7kts63IXlK2aV PHUXGYsM4kZLDVsJz72iLUTrahYeIGvOzbjju6jCWKW7AwbAqarn7bchc3Pq7LCi3qVtkEajS kSAM6Y4HA9ZaKkXpldVXljB625oI2F8qwB0zQQZT3SEm5Jio48UKiMVOC2elhv4jJnCW4Ruog PE4b11V8C/cPVOSUs4AC42lZ+pCXsgBT/J5b4t4I/KltuRDVmadG0mD7etG43rT+8PFa08/ES 5zBhixyBTbvQpFne01iu9FZcXCkrruMl7O9kv01GscrHj5+It29q7ZEgIpI8EYQMI6EMnmHSK GGQvUsUMP2iXZMK/4qFDI8TNZO8+UK2b2AUerQ8J8p0X6akmuHrwTKBC+csnWqHQJK/wc5h89 vEl6FWg0lGRrBsOgSUSAko7+yeCdatbK6axFN4PBPFbXmNAc5gRhuWRemHa+05kSWFU5JhYpG 37Rg8yltFoD8vxoAdCdEu0PYUr575WEzYt3nFDVUNuUzw0gSe64qs8aBRku0uoL1CFdFye4Qn 5L/LC/y5tUKAfAifZKMyUTPNHl4MM4UcHGJhjtdiwhThDDzQzeYDLLYa1rwf2VovSpUxlpnY8 MDte6OFtnENrNpoD9EfzjBote/R8Di1y2lf1aTXD5PWyNbuQwpgZnxOuvVI8Sa/xK9ThOOw9E NolbYVCHzXW9OgJpFz4VdnrGP/TqvFlxp+9ZpBTuWAjswNx+l17VV6OnDZsVgn1DKq/5rNzH4 e/9RVEQOZ1ERydWehLsc7pwCcqq5Zn4CpWOJwKdio1/PQ+1BppwGks3YXR+byz6PHcmjSZrTw drp6pT+ X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) >> Can you try again with the >> =E2=80=98user-position=E2=80=99 frame parameter non-nil? > > The behavior is identical. So Unity seems to ignore =E2=80=98user-position=E2=80=99. Can you manual= ly move (mouse-drag) the frame to the left edge? Did you ever try to tweak the window placement settings in the Compiz Setting Manager? >> You mean on a subsequent attempt the frame is flushed left or still a= t >> position 20. What happens when you try something similar with the =E2= =80=98top=E2=80=99 >> parameter? > > The frame is never flush left except during brief flash. Immediately > afterward, and subsequent to each additional call, the actual frame > position is offset by 20 pixels. This is true for top just as it is > for left. I could imagine Unity to not allow the frame enter a 20 pixels zone if there's some launcher or panel there. But why should it move a frame from position 500 to 520? That simply doesn't make sense. BTW, does maximizing the frame horizontally work? What does evaluating (set-frame-parameter nil 'fullscreen 'fullwidth) give? >> Does that mean the offset of 20 pixels appears with scaling turned of= f >> and on? > > Not quite. With scaling at 2x, the offset is 20 pixels. With scaling > at 1x, the offset is 10 pixels. And with scalings 1.5, 2.5 and 3 you consistently get 15, 25 and 30? If so then we can conclude that the frame position does not scale with the x-coordinate Emacs supplies but shifts by the scale factor times ten. > The answer, on Ubuntu Trusty with Unity (Compiz) window manager, is > that it depends on which virtual desktop you are on. I have four > virtual desktops laid out in a 2x2 grid, which I'll refer to clockwise= > like so: > > [1][2] > [4][3] > > On desktop 1, it behaves the same as for a frame which is smaller than= > the screen size and not flush with the right screen edge: offset of > (10*scale) pixels when positioning left or top, doesn't appear to > "stick" to anything. So it can't go more to the left or upwards due to the 10*scale restriction, I suppose. > On desktop 2, positioning top behaves the same as desktop 1, but > positioning left results in a frame flush with the left screen edge. > This is not true of frames smaller than the screen size, which I > previously tested on each virtual desktop and displayed consistent > behavior. You mean that a large frame on desktop 2 gets flushed left, a smaller one gets still set off at the 10*scale position. > On desktop 4, we see a symmetric behavior where positioning left > behaves the same as desktop 1, but positioning top results in a frame > flush with the screen top edge. Sounds consistent. > On desktop 3, positioning both left and top results in a frame flush > with the respective screen edge, and I observed an additional curious > behavior. Each call to set the top position also decreases the left > position by a small amount, if the number of pixels specified as the > top position is small. In the range of 10-30, it budged the left side;= > in the range of 100-500, it didn't. In all these calls did you also specify a left position or did you only specify the top position? > When I came to write up my results, I decided to try to pin down > exactly where the cut-off was between values which would or wouldn't > budge the frame to the left, so I restarted emacs and set about trying= > to reproduce it. But I can't. This time around, a frame larger than > the screen behaves in all ways as I described for desktop 1. That is the behavior on desktop 4 is the same as the behavior on desktop 1: A 10*scale pixel zone on the left and the top are left free? > This test could be exercising some little-tested code paths in Emacs, > Unity, or both. Apart from occasional specifications like (0, 0) or a user supplied position, Emacs never tries to enforce a particular frame position. Also, Emacs nowhere samples the screen size in order to get a fitting initial size of the frame. The default size of the initial frame is 80x35 characters, hardcoded somewhere in frame.c. So all this positioning stuff should be in Unity. How they could possibly have coded such a thing is a mystery to me. >> And does =E2=80=98set-mouse-absolute-pixel-position=E2=80=99 work nor= mally? > > In fact, mouse-set-absolute-pixel-position works flawlessly as > expected. If I set the frame left position to 0 and the mouse x > position to (10*scale), they line up precisely. OK. One problem less to care about. > Similarly, I can set > the mouse position to (0,0) with no problem. =E2=80=98set-mouse-absolute-pixel-position=E2=80=99 operates on the "defa= ult root window" of the selected frame's display. Does =E2=80=98set-mouse-pixel-position=E2=80=99 also work as expected? For ex= ample, does (set-mouse-pixel-position (selected-frame) 0 0) correctly move the mouse pointer to a position right under the start of the menu or tool bar? martin From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 11:47:53 2015 Received: (at control) by debbugs.gnu.org; 18 Dec 2015 16:47:53 +0000 Received: from localhost ([127.0.0.1]:55907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9yC9-0000yf-Ks for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:47:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41125) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9yC7-0000yS-TR for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:47:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9yC2-0005nM-8I for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:47:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9yC2-0005nI-5F for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:47:46 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a9yC1-00018Y-7K for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:47:45 -0500 Subject: control message for bug 22204 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 18 Dec 2015 11:47:45 -0500 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.0 (-----) X-Debbugs-Envelope-To: control 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 (-----) merge 20619 22204 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 08 20:09:35 2016 Received: (at control) by debbugs.gnu.org; 9 Apr 2016 00:09:35 +0000 Received: from localhost ([127.0.0.1]:55006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aogT1-0004g1-5O for submit@debbugs.gnu.org; Fri, 08 Apr 2016 20:09:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aogSz-0004fn-Q0 for control@debbugs.gnu.org; Fri, 08 Apr 2016 20:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aogSt-0008Nb-Ts for control@debbugs.gnu.org; Fri, 08 Apr 2016 20:09:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aogSt-0008NX-Qs for control@debbugs.gnu.org; Fri, 08 Apr 2016 20:09:27 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1aogSt-0001so-Gl for control@debbugs.gnu.org; Fri, 08 Apr 2016 20:09:27 -0400 Subject: control message for bug 23231 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 08 Apr 2016 20:09:27 -0400 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: -6.0 (------) X-Debbugs-Envelope-To: control 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: -6.0 (------) merge 20619 23231 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 09:05:21 2017 Received: (at control) by debbugs.gnu.org; 16 Jul 2017 13:05:21 +0000 Received: from localhost ([127.0.0.1]:41095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWjEf-0000un-N3 for submit@debbugs.gnu.org; Sun, 16 Jul 2017 09:05:21 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:59497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWjEd-0000uf-SQ for control@debbugs.gnu.org; Sun, 16 Jul 2017 09:05:20 -0400 Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dWjEb-0005oH-Rx for control@debbugs.gnu.org; Sun, 16 Jul 2017 15:05:19 +0200 Date: Sun, 16 Jul 2017 15:05:17 +0200 Message-Id: <87fudwr0qa.fsf@mouse> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #27357 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (/) forcemerge 27357 21348 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 17 11:00:32 2017 Received: (at control) by debbugs.gnu.org; 17 Jul 2017 15:00:33 +0000 Received: from localhost ([127.0.0.1]:44599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX7Vg-0008S6-OJ for submit@debbugs.gnu.org; Mon, 17 Jul 2017 11:00:32 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:46016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX7Ve-0008Ry-Q3 for control@debbugs.gnu.org; Mon, 17 Jul 2017 11:00:31 -0400 Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dX7VR-0006OA-S9 for control@debbugs.gnu.org; Mon, 17 Jul 2017 17:00:25 +0200 Date: Mon, 17 Jul 2017 17:00:17 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #27357 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (/) tags 27357 fixed close 27357