3

How to advise code that pops up menus (like the ones you get by left-clicking a major-mode indicator in the modeline) to stay within the current Emacs frame?

Background:
Probably this is a bug within my window manager. I have a multi-monitor setup with one screen above the other. With Emacs's frame at the bottom of the upper screen its popup menus look like this:
enter image description here

But it should look like this:
enter image description here

I would not mind if this popup menu popped up far away from my mouse, as long as I was able to use the menu.

Note: with x-popup-menu placing of own popup menus is possible, so it should somehow be possible with those major-mode popup menus from modeline.

Drew
  • 75,699
  • 9
  • 109
  • 225
jue
  • 4,476
  • 8
  • 20
  • I suggest that you file an enhancement request for Emacs, using `M-x report-emacs-bug` (that's also for enhancement requests). Presumably the request is for a Boolean user option to control whether a mode-line popup menu should be contained within the frame borders (or something similar). – Drew Apr 10 '19 at 15:14
  • The multi-monitor setup is a very good observation. At my place the monitors stand side-by-side. On the first monitor the pop-up menus are off the screen on the second one they are not (for the same frame and the same pop-up menu). It happens with `emacs -Q` and Emacs version `GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-05-29`. – Tobias Apr 10 '19 at 16:04
  • Do the displays differ in size? If so which one is larger? – Tobias Apr 10 '19 at 16:35
  • After changing the resolution of my larger screen such that it is equal to the resolution of the smaller one Emacs avoids cutting off the menu on both screens. So the effect is related to different screen sizes (in pixels). – Tobias Apr 10 '19 at 17:27
  • @Tobias both screens have the same resolution (FullHD). The problem is that one screen is above the other and then either X11 or my window manager has a bug. – jue Apr 10 '19 at 19:33
  • Might it be that the lower part of the menu is visible on the lower screen? Up to now it looks like your displays work as an extended screen. – Tobias Apr 11 '19 at 04:17
  • @Tobias it is not visible at the lower screen. It is like you can see in the screenshot. The screenshots where taken from the whole desktop (both screens). I just removed the uninteresting parts. On the picture with the bad menu Emacs' frame was on the upper screen. On the picture with the good menu Emacs' frame was on the lower screen. – jue Apr 11 '19 at 08:02

0 Answers0