From unknown Fri Sep 05 18:57:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24084: 25.1; GTK3 mode-line drop down menu partially off-screen Resent-From: Sebastian Schueppel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2016 01:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24084@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.146958422429428 (code B ref -1); Wed, 27 Jul 2016 01:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jul 2016 01:50:24 +0000 Received: from localhost ([127.0.0.1]:38545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSDzK-0007eZ-KE for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:50:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSDDf-0006Jz-OA for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSDDZ-0004JB-3P for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:02 -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,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDZ-0004I1-0F for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDW-0005l7-Cf for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSDDT-0004GK-7H for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:58 -0400 Received: from out1103.nz.smxemail.com ([203.84.134.34]:4275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDS-0004FD-Lc for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; d=nz.smxemail.com; s=alpha; c=relaxed/relaxed; q=dns/txt; i=@nz.smxemail.com; t=1469581247; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc; bh=38qiqVJVcSy0FccyB5pGTuWbkwMLxc9pCFNtnfacyoA=; b=WZN59wo+mWJH10EHDtAodWE1SvN5n/G0R17pTxFXiLc39Zrwfzi6i8ZYVlQ0Ysp5 XKKXHhKhESAwsnTJlED3i412GK1j/YtQx4e6NsFWtY3koUipx5raLBUDD5X0qT/o n7Be+PeADCwRblj3Q+BQcMlJ8xP4a17vZ0kCASqwxCQ=; Received: from mail.ems.endace.com ([131.203.121.19]) by omr.nz.smxemail.com with ESMTP (using TLSv1 with cipher AES128-SHA (128/128 bits)) id 579807BE-359B0A53@mta1101.omr; Wed, 27 Jul 2016 01:00:46 +0000 Received: from NZAKLMBX01.ad.endace.com ([::1]) by nzaklmbx01.ad.endace.com ([::1]) with mapi id 14.03.0146.002; Wed, 27 Jul 2016 13:00:43 +1200 From: Sebastian Schueppel Thread-Topic: 25.1; GTK3 mode-line drop down menu partially off-screen Thread-Index: AdHnmNyu9uqIBuxnSq6A2vZCyeF6ZA== Date: Wed, 27 Jul 2016 01:00:42 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.69.124] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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-Mailman-Approved-At: Tue, 26 Jul 2016 21:50:21 -0400 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 (-----) This is related to a multi monitor setup: I have 3 monitors set from left t= o right. The middle monitor has a vertical orientation therefore the pixels= available on that one is swapped. The monitors have the following resoluti= ons: (1680x1050)(1050x1680)(1680x1050)=0A= If I do the following on one of the horizontal/normal oriented monitors the= mode-line drop down menu disappears partially off-screen.=0A= =0A= starting from 'emacs -Q'=0A= =0A= maximize the frame on one of the monitors with normal orientation (1680x105= 0) and click in the mode-line on the line number or column number. The popu= p/dropdown menu will partially disappear at the bottom of the monitor. =0A= =0A= --=0A= My debug/quickfix so far: =0A= =0A= The popup menus like this are defined in emacs/src/xmenu.c =0A= Since I'm using GTK3 the 'menu_position_func' function is always used to de= fine the position of the popup menu. Which is certainly the correct thing t= o do, otherwise GTK3 does sometimes some funky stuff. Now in my 3 monitor s= et-up, the function within 'menu_position_func' called 'x_display_pixel_hei= ght' always thinks the height of my screen is 1680 and therefore thinks the= re is room to display the menu below. It doesn't take into account that one= monitor is vertical oriented and has a height of 1680, but the other 2 mon= itor are set up normal with a height of 1080. =0A= =0A= I have used the following quickfix using GTK3 build in functions using moni= tors rather than the whole screen information. Adding the following to 'men= u_position_func' to get the geometry of the monitor the frame is on. I unde= rstand that this might not be generic enough, but it works for me. =0A= =0A= =0A= #include =0A= =0A= GdkRectangle workarea;=0A= // get the monitor the current frame is on=0A= gint widgetMonitor =3D gdk_screen_get_monitor_at_point(gtk_widget_get_scree= n(FRAME_GTK_OUTER_WIDGET (data->f)),*x,*y);=0A= gdk_screen_get_monitor_workarea(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGE= T (data->f)),widgetMonitor,&workarea);=0A= // now instead of using disp_width and disp_height we use a combination of = monitor absolut position and monitor working area.=0A= // monitor absolute position being workarea.x workarea.y and monitor size = being workarea.height and workarea.width=0A= =0A= =0A= I'm omitting the rest of the code here where those values are used as it sh= ould be obvious. Hope this will help to get a more generic solution out the= re. =0A= =0A= =0A= =0A= In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)=0A= of 2016-07-26 built on mymachine=0A= Repository revision: 0f0b191a5324115fe9e8c438eceef4043decf209=0A= Windowing system distributor 'The X.Org Foundation', version 11.0.11501000= =0A= System Description: Ubuntu 14.04.4 LTS=0A= =0A= Configured features:=0A= XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS=0A= LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11=0A= =0A= Important settings:=0A= value of $LC_ALL: en_NZ.utf-8=0A= value of $LANG: en_NZ.UTF-8=0A= value of $XMODIFIERS: @im=3Dibus=0A= locale-coding-system: utf-8-unix=0A= =0A= Major mode: Fundamental=0A= =0A= Minor modes in effect:=0A= tooltip-mode: t=0A= global-eldoc-mode: t=0A= electric-indent-mode: t=0A= mouse-wheel-mode: t=0A= tool-bar-mode: t=0A= menu-bar-mode: t=0A= file-name-shadow-mode: t=0A= global-font-lock-mode: t=0A= blink-cursor-mode: t=0A= auto-composition-mode: t=0A= auto-encryption-mode: t=0A= auto-compression-mode: t=0A= buffer-read-only: t=0A= line-number-mode: t=0A= transient-mark-mode: t=0A= =0A= Recent messages:=0A= For information about GNU Emacs and the GNU system, type C-h C-a.=0A= Making completion list...=0A= =0A= Load-path shadows:=0A= None found.=0A= =0A= Features:=0A= (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml=0A= mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies=0A= mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail=0A= rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu=0A= cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util=0A= tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type=0A= mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt=0A= fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register=0A= page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock=0A= font-lock syntax facemenu font-core frame cl-generic cham georgian=0A= utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean=0A= japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european=0A= ethiopic indian cyrillic chinese charscript case-table epa-hook=0A= jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice=0A= loaddefs button faces cus-face macroexp files text-properties overlay=0A= sha1 md5 base64 format env code-pages mule custom widget=0A= hashtable-print-readable backquote dbusbind inotify dynamic-setting=0A= system-font-setting font-render-setting move-toolbar gtk x-toolkit x=0A= multi-tty make-network-process emacs)=0A= =0A= Memory information:=0A= ((conses 16 90185 6392)=0A= (symbols 48 19738 0)=0A= (miscs 40 363 146)=0A= (strings 32 14712 4043)=0A= (string-bytes 1 433457)=0A= (vectors 16 12041)=0A= (vector-slots 8 437199 5168)=0A= (floats 8 165 69)=0A= (intervals 56 240 10)=0A= (buffers 976 22)=0A= (heap 1024 30448 957))=0A= =0A= From unknown Fri Sep 05 18:57:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24084: 25.1; GTK3 mode-line drop down menu partially off-screen Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jun 2017 05:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24084 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sebastian Schueppel Cc: 24084@debbugs.gnu.org Received: via spool by 24084-submit@debbugs.gnu.org id=B24084.149759112528070 (code B ref 24084); Fri, 16 Jun 2017 05:33:02 +0000 Received: (at 24084) by debbugs.gnu.org; 16 Jun 2017 05:32:05 +0000 Received: from localhost ([127.0.0.1]:50086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLjrY-0007Ig-O0 for submit@debbugs.gnu.org; Fri, 16 Jun 2017 01:32:04 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:35128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLjrW-0007ID-Q7 for 24084@debbugs.gnu.org; Fri, 16 Jun 2017 01:32:03 -0400 Received: by mail-it0-f67.google.com with SMTP id f20so3749015itb.2 for <24084@debbugs.gnu.org>; Thu, 15 Jun 2017 22:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=g4i+tm1XIPUITTJpVurF8FuCRmLqi+hXiX/UEKY1e/Y=; b=egb1c0mO5ig9/tFxIT8viBgwFT9r0StpGTiCz4GQjWw0UAQEgV1fUqlVw/UcBBo1v1 JLNv/hk71/PtH5Lz+Enoh/37eCU7HqNi321i9FFui8Wk7gmSBc2kAgm5phKyBku4pxvy HSiaKBIQliUV+0pAglX89oGI2n6F9+aL5/5CJq/0VY63VmII2zRoGQOyY1ntDi4h85V9 70MVCJxKtOjWtU7a29habJ9RCvloZ4C+McUQOc9Or+NowOGZ8fSMwiYsh8Z7iTfAHzAY bRodiikR4V/a7AceCzPO2fAMbsChOibn2uJdmQyMc4ZIbiQ9GriuSDw+8f0uNqs6PQVg 6TUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=g4i+tm1XIPUITTJpVurF8FuCRmLqi+hXiX/UEKY1e/Y=; b=AYwHMuNhWi9OLBE4b52+KFAT0ieBlodAP069SumYQAVflSszc9dHB0htrnjClMXyht r9e72qrp9GbQwRK1nUCAJ7w+cG/psl/+dDKMZZfUp81Jq9Sq9Kai3PN1IRDju6/vn4Sa Ul1MXqLFdXLN8whWnhQudBJKCA9eUqZtctJ1AeV0koqjRk5dNmX49sy5ctgc2qnVoYvt 0VzbvHIAEDocRvs89Booj7T7jNGWTkKOSJKjYGZ8JGiQCGYrKU3j2Q927KglfJvb0So+ sGp70GivyB3KaFlx5Gcwq72cFdJwJWgCYLy6rWk8wJYP9AGtca03tRdoRvu2RXeVuyXV oIWw== X-Gm-Message-State: AKS2vOwuGF9GxOeD9ptSjxpqoGk1jaQ3ckgK80a9PGXySfNlQ3CBUGrA /R58JyoTv6oMW/m8 X-Received: by 10.36.108.131 with SMTP id w125mr8858371itb.91.1497591116830; Thu, 15 Jun 2017 22:31:56 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id x29sm730906ioi.14.2017.06.15.22.31.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Jun 2017 22:31:55 -0700 (PDT) From: Alex References: Date: Thu, 15 Jun 2017 23:31:51 -0600 In-Reply-To: (Sebastian Schueppel's message of "Wed, 27 Jul 2016 01:00:42 +0000") Message-ID: <87y3ssxzug.fsf@lylat> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) 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 (/) Sebastian Schueppel writes: > This is related to a multi monitor setup: I have 3 monitors set from left to > right. The middle monitor has a vertical orientation therefore the pixels > available on that one is swapped. The monitors have the following resolutions: > (1680x1050)(1050x1680)(1680x1050) > If I do the following on one of the horizontal/normal oriented monitors the mode-line drop down menu disappears partially off-screen. > > starting from 'emacs -Q' > > maximize the frame on one of the monitors with normal orientation (1680x1050) > and click in the mode-line on the line number or column number. The > popup/dropdown menu will partially disappear at the bottom of the monitor. > > -- > My debug/quickfix so far: > > The popup menus like this are defined in emacs/src/xmenu.c > Since I'm using GTK3 the 'menu_position_func' function is always used to define the position of the popup menu. Which is certainly the correct thing to do, otherwise GTK3 does sometimes some funky stuff. Now in my 3 monitor set-up, the function within 'menu_position_func' called 'x_display_pixel_height' always thinks the height of my screen is 1680 and therefore thinks there is room to display the menu below. It doesn't take into account that one monitor is vertical oriented and has a height of 1680, but the other 2 monitor are set up normal with a height of 1080. > > I have used the following quickfix using GTK3 build in functions using monitors rather than the whole screen information. Adding the following to 'menu_position_func' to get the geometry of the monitor the frame is on. I understand that this might not be generic enough, but it works for me. > > > #include > > GdkRectangle workarea; > // get the monitor the current frame is on > gint widgetMonitor = gdk_screen_get_monitor_at_point(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGET (data->f)),*x,*y); > gdk_screen_get_monitor_workarea(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGET (data->f)),widgetMonitor,&workarea); > // now instead of using disp_width and disp_height we use a combination of monitor absolut position and monitor working area. > // monitor absolute position being workarea.x workarea.y and monitor size being workarea.height and workarea.width > > > I'm omitting the rest of the code here where those values are used as it should be obvious. Hope this will help to get a more generic solution out there. I believe this is fixed in the latest master. Can you confirm? It should work for any GTK version. From unknown Fri Sep 05 18:57:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sebastian Schueppel Subject: bug#24084: closed (Re: bug#24084: 25.1; GTK3 mode-line drop down menu partially off-screen) Message-ID: References: X-Gnu-PR-Message: they-closed 24084 X-Gnu-PR-Package: emacs Reply-To: 24084@debbugs.gnu.org Date: Sun, 29 Sep 2019 04:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1569732962-1281-1" This is a multi-part message in MIME format... ------------=_1569732962-1281-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24084: 25.1; GTK3 mode-line drop down menu partially off-screen which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24084@debbugs.gnu.org. --=20 24084: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24084 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1569732962-1281-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24084-done) by debbugs.gnu.org; 29 Sep 2019 04:55:11 +0000 Received: from localhost ([127.0.0.1]:51972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEREl-0000J4-8i for submit@debbugs.gnu.org; Sun, 29 Sep 2019 00:55:11 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:44880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEREj-0000Im-VU for 24084-done@debbugs.gnu.org; Sun, 29 Sep 2019 00:55:10 -0400 Received: by mail-pf1-f169.google.com with SMTP id q21so3651993pfn.11 for <24084-done@debbugs.gnu.org>; Sat, 28 Sep 2019 21:55:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Zl1mcSqq0ZaLrV2CWFJA5eyEz2OS0IEm0P5l3bnrI2g=; b=j/mKv5LfJAgdV4ReSheIAqTS9MCgy/Ewt/nl/QCbg9ccbpeg856hKxDJlRFUjtfUeh R1AnTaLVW0jm5Aivn7r7FCtKDR/kT9cD97sNd8x85MontRSoC8eqHKX/AicSKoUWkY7k e3udoquiByuv/fRM/hKvO52iL21UdSSYX1jMiMK8NuDPFacoTMT/E2v/2GgL5ZZ4ebaT GRie41bUWf9Si6s7VX7K3deRTKm2QDXenyUvfeImj1wo4JPChVY4Ek/Pfl+ESXCAnbMJ 72uSZK6eWhxWtnWTS2AXfdi6Nk8ARunzILR1C3B/RBeD76DWJ4EmTUc+MArJqCNR7Zc/ p9Vg== X-Gm-Message-State: APjAAAWiD+oLbS1aaxNDA0is5Sb31CQX3yh+jGwFLSLQXdXqKA3sKoPt SlddWXMQnkRrtlBfNxPujaZYroqlsL+D4jDFFEo= X-Google-Smtp-Source: APXvYqysvnvppjRq477AczywiQRcLs9c0DcUf03szdpqwwrw5BB9wulPVwCazmOLU8lILjsfrT/wi3VrCvmWHiIOBJQ= X-Received: by 2002:a63:720f:: with SMTP id n15mr17156329pgc.198.1569732902467; Sat, 28 Sep 2019 21:55:02 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sun, 29 Sep 2019 06:54:51 +0200 Message-ID: Subject: Re: bug#24084: 25.1; GTK3 mode-line drop down menu partially off-screen To: Alex Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 24084-done Cc: Sebastian Schueppel , 24084-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.6 (/) Alex writes: > Sebastian Schueppel writes: > >> This is related to a multi monitor setup: I have 3 monitors set from left to >> right. The middle monitor has a vertical orientation therefore the pixels >> available on that one is swapped. The monitors have the following resolutions: >> (1680x1050)(1050x1680)(1680x1050) >> If I do the following on one of the horizontal/normal oriented monitors the mode-line drop down menu disappears partially off-screen. >> >> starting from 'emacs -Q' >> >> maximize the frame on one of the monitors with normal orientation (1680x1050) >> and click in the mode-line on the line number or column number. The >> popup/dropdown menu will partially disappear at the bottom of the monitor. >> >> -- >> My debug/quickfix so far: >> >> The popup menus like this are defined in emacs/src/xmenu.c >> Since I'm using GTK3 the 'menu_position_func' function is always used to >> define the position of the popup menu. Which is certainly the correct thing to >> do, otherwise GTK3 does sometimes some funky stuff. Now in my 3 monitor >> set-up, the function within 'menu_position_func' called >> 'x_display_pixel_height' always thinks the height of my screen is 1680 and >> therefore thinks there is room to display the menu below. It doesn't take into >> account that one monitor is vertical oriented and has a height of 1680, but >> the other 2 monitor are set up normal with a height of 1080. >> >> I have used the following quickfix using GTK3 build in functions using >> monitors rather than the whole screen information. Adding the following to >> 'menu_position_func' to get the geometry of the monitor the frame is on. I >> understand that this might not be generic enough, but it works for me. >> >> >> #include >> >> GdkRectangle workarea; >> // get the monitor the current frame is on >> gint widgetMonitor = gdk_screen_get_monitor_at_point(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGET (data->f)),*x,*y); >> gdk_screen_get_monitor_workarea(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGET (data->f)),widgetMonitor,&workarea); >> // now instead of using disp_width and disp_height we use a combination of monitor absolut position and monitor working area. >> // monitor absolute position being workarea.x workarea.y and monitor size being workarea.height and workarea.width >> >> >> I'm omitting the rest of the code here where those values are used as it should be obvious. Hope this will help to get a more generic solution out there. > > I believe this is fixed in the latest master. Can you confirm? It should > work for any GTK version. I can't reproduce this on current master using GTK+ Version 3.24.5. Since a verification for a fix was requested over 2 years ago, and none was given, I'm going to assume this is no longer an issue. I'm therefore closing this bug report. If anyone can still reproduce this, please reopen. Best regards, Stefan Kangas ------------=_1569732962-1281-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jul 2016 01:50:24 +0000 Received: from localhost ([127.0.0.1]:38545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSDzK-0007eZ-KE for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:50:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSDDf-0006Jz-OA for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSDDZ-0004JB-3P for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:02 -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,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDZ-0004I1-0F for submit@debbugs.gnu.org; Tue, 26 Jul 2016 21:01:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDW-0005l7-Cf for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSDDT-0004GK-7H for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:58 -0400 Received: from out1103.nz.smxemail.com ([203.84.134.34]:4275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDDS-0004FD-Lc for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 21:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; d=nz.smxemail.com; s=alpha; c=relaxed/relaxed; q=dns/txt; i=@nz.smxemail.com; t=1469581247; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc; bh=38qiqVJVcSy0FccyB5pGTuWbkwMLxc9pCFNtnfacyoA=; b=WZN59wo+mWJH10EHDtAodWE1SvN5n/G0R17pTxFXiLc39Zrwfzi6i8ZYVlQ0Ysp5 XKKXHhKhESAwsnTJlED3i412GK1j/YtQx4e6NsFWtY3koUipx5raLBUDD5X0qT/o n7Be+PeADCwRblj3Q+BQcMlJ8xP4a17vZ0kCASqwxCQ=; Received: from mail.ems.endace.com ([131.203.121.19]) by omr.nz.smxemail.com with ESMTP (using TLSv1 with cipher AES128-SHA (128/128 bits)) id 579807BE-359B0A53@mta1101.omr; Wed, 27 Jul 2016 01:00:46 +0000 Received: from NZAKLMBX01.ad.endace.com ([::1]) by nzaklmbx01.ad.endace.com ([::1]) with mapi id 14.03.0146.002; Wed, 27 Jul 2016 13:00:43 +1200 From: Sebastian Schueppel To: "bug-gnu-emacs@gnu.org" Subject: 25.1; GTK3 mode-line drop down menu partially off-screen Thread-Topic: 25.1; GTK3 mode-line drop down menu partially off-screen Thread-Index: AdHnmNyu9uqIBuxnSq6A2vZCyeF6ZA== Date: Wed, 27 Jul 2016 01:00:42 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.69.124] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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-Mailman-Approved-At: Tue, 26 Jul 2016 21:50:21 -0400 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 (-----) This is related to a multi monitor setup: I have 3 monitors set from left t= o right. The middle monitor has a vertical orientation therefore the pixels= available on that one is swapped. The monitors have the following resoluti= ons: (1680x1050)(1050x1680)(1680x1050)=0A= If I do the following on one of the horizontal/normal oriented monitors the= mode-line drop down menu disappears partially off-screen.=0A= =0A= starting from 'emacs -Q'=0A= =0A= maximize the frame on one of the monitors with normal orientation (1680x105= 0) and click in the mode-line on the line number or column number. The popu= p/dropdown menu will partially disappear at the bottom of the monitor. =0A= =0A= --=0A= My debug/quickfix so far: =0A= =0A= The popup menus like this are defined in emacs/src/xmenu.c =0A= Since I'm using GTK3 the 'menu_position_func' function is always used to de= fine the position of the popup menu. Which is certainly the correct thing t= o do, otherwise GTK3 does sometimes some funky stuff. Now in my 3 monitor s= et-up, the function within 'menu_position_func' called 'x_display_pixel_hei= ght' always thinks the height of my screen is 1680 and therefore thinks the= re is room to display the menu below. It doesn't take into account that one= monitor is vertical oriented and has a height of 1680, but the other 2 mon= itor are set up normal with a height of 1080. =0A= =0A= I have used the following quickfix using GTK3 build in functions using moni= tors rather than the whole screen information. Adding the following to 'men= u_position_func' to get the geometry of the monitor the frame is on. I unde= rstand that this might not be generic enough, but it works for me. =0A= =0A= =0A= #include =0A= =0A= GdkRectangle workarea;=0A= // get the monitor the current frame is on=0A= gint widgetMonitor =3D gdk_screen_get_monitor_at_point(gtk_widget_get_scree= n(FRAME_GTK_OUTER_WIDGET (data->f)),*x,*y);=0A= gdk_screen_get_monitor_workarea(gtk_widget_get_screen(FRAME_GTK_OUTER_WIDGE= T (data->f)),widgetMonitor,&workarea);=0A= // now instead of using disp_width and disp_height we use a combination of = monitor absolut position and monitor working area.=0A= // monitor absolute position being workarea.x workarea.y and monitor size = being workarea.height and workarea.width=0A= =0A= =0A= I'm omitting the rest of the code here where those values are used as it sh= ould be obvious. Hope this will help to get a more generic solution out the= re. =0A= =0A= =0A= =0A= In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)=0A= of 2016-07-26 built on mymachine=0A= Repository revision: 0f0b191a5324115fe9e8c438eceef4043decf209=0A= Windowing system distributor 'The X.Org Foundation', version 11.0.11501000= =0A= System Description: Ubuntu 14.04.4 LTS=0A= =0A= Configured features:=0A= XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS=0A= LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11=0A= =0A= Important settings:=0A= value of $LC_ALL: en_NZ.utf-8=0A= value of $LANG: en_NZ.UTF-8=0A= value of $XMODIFIERS: @im=3Dibus=0A= locale-coding-system: utf-8-unix=0A= =0A= Major mode: Fundamental=0A= =0A= Minor modes in effect:=0A= tooltip-mode: t=0A= global-eldoc-mode: t=0A= electric-indent-mode: t=0A= mouse-wheel-mode: t=0A= tool-bar-mode: t=0A= menu-bar-mode: t=0A= file-name-shadow-mode: t=0A= global-font-lock-mode: t=0A= blink-cursor-mode: t=0A= auto-composition-mode: t=0A= auto-encryption-mode: t=0A= auto-compression-mode: t=0A= buffer-read-only: t=0A= line-number-mode: t=0A= transient-mark-mode: t=0A= =0A= Recent messages:=0A= For information about GNU Emacs and the GNU system, type C-h C-a.=0A= Making completion list...=0A= =0A= Load-path shadows:=0A= None found.=0A= =0A= Features:=0A= (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml=0A= mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies=0A= mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail=0A= rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu=0A= cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util=0A= tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type=0A= mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt=0A= fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register=0A= page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock=0A= font-lock syntax facemenu font-core frame cl-generic cham georgian=0A= utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean=0A= japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european=0A= ethiopic indian cyrillic chinese charscript case-table epa-hook=0A= jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice=0A= loaddefs button faces cus-face macroexp files text-properties overlay=0A= sha1 md5 base64 format env code-pages mule custom widget=0A= hashtable-print-readable backquote dbusbind inotify dynamic-setting=0A= system-font-setting font-render-setting move-toolbar gtk x-toolkit x=0A= multi-tty make-network-process emacs)=0A= =0A= Memory information:=0A= ((conses 16 90185 6392)=0A= (symbols 48 19738 0)=0A= (miscs 40 363 146)=0A= (strings 32 14712 4043)=0A= (string-bytes 1 433457)=0A= (vectors 16 12041)=0A= (vector-slots 8 437199 5168)=0A= (floats 8 165 69)=0A= (intervals 56 240 10)=0A= (buffers 976 22)=0A= (heap 1024 30448 957))=0A= =0A= ------------=_1569732962-1281-1--