From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#24084: 25.1; GTK3 mode-line drop down menu partially off-screen Date: Sun, 29 Sep 2019 06:54:51 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100829"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Sebastian Schueppel , 24084-done@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 06:56:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iERFp-000Q7m-DK for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 06:56:17 +0200 Original-Received: from localhost ([::1]:36758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERFn-0005od-Fw for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 00:56:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43705) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERFc-0005n9-3p for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 00:56:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iERFa-0001kk-Lb for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 00:56:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43158) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iERFa-0001jw-HC for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 00:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iERFa-0000Km-EC for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 00:56:02 -0400 In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 04:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 24084 X-GNU-PR-Package: emacs Mail-Followup-To: 24084@debbugs.gnu.org, stefan@marxist.se, Sebastian.Schueppel@endace.com Original-Received: via spool by 24084-done@debbugs.gnu.org id=D24084.15697329111186 (code D ref 24084); Sun, 29 Sep 2019 04:56:02 +0000 Original-Received: (at 24084-done) by debbugs.gnu.org; 29 Sep 2019 04:55:11 +0000 Original-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 Original-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 Original-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) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167595 Archived-At: 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