GNU bug report logs - #24084
25.1; GTK3 mode-line drop down menu partially off-screen

Previous Next

Package: emacs;

Reported by: Sebastian Schueppel <Sebastian.Schueppel <at> endace.com>

Date: Wed, 27 Jul 2016 01:51:01 UTC

Severity: normal

Found in version 25.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 24084-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Alex <agrambot <at> gmail.com>
Cc: Sebastian Schueppel <Sebastian.Schueppel <at> endace.com>,
 24084-done <at> debbugs.gnu.org
Subject: Re: bug#24084: 25.1;
 GTK3 mode-line drop down menu partially off-screen
Date: Sun, 29 Sep 2019 06:54:51 +0200
Alex <agrambot <at> gmail.com> writes:

> Sebastian Schueppel <Sebastian.Schueppel <at> endace.com> 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.
>>
>> <code>
>> #include <gdk/gdk.h>
>>
>> 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
>> </code>
>>
>> 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




This bug report was last modified 5 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.