bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23568: 25.0.94; Mode line menus appear incorrectly in some monitor c


From: Alex
Subject: bug#23568: 25.0.94; Mode line menus appear incorrectly in some monitor configurations
Date: Mon, 05 Jun 2017 02:03:45 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Alex <address@hidden>
>> Cc: address@hidden,  address@hidden
>> Date: Sat, 03 Jun 2017 13:19:50 -0600

>> I changed all instances of `display' to `frame'. I'm still not sure on
>> the name, though. Perhaps a better prefix would be `physical-monitor-*',
>> or just `monitor-*'?
>> 
>> What do you think?
>
> LGTM, thanks.

Just to be clear: you prefer the frame-* prefix?

>> The xmenu.c part contains the actual bugfix, while the frame.el part is
>> just a partial abstraction for the fix so that other procedures can use
>> it (such as compute_tip_xy in xfns.c).
>> 
>> The procedure I'm editing (menu_position_func) is inside an #ifdef
>> USE_GTK, and uses x_display_pixel_{height,width} currently. I'm not sure
>> if it's useful outside of X currently.
>> 
>> I haven't tested the issue on other systems, but I don't think it's an
>> issue in Windows as half of the code came from Windows code according to
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22549#61.
>
> Ah, okay.  Then maybe just add a comment there saying that the w32
> case is handled elsewhere, perhaps with a pointer to the function
> which does that.

Actually, it turns out that I used the half of the code that *didn't*
come from compute_tip_xy from w32fns.c. I instead put a reference to
commit c77ffc8019 in date form in the commit message.

I tested it out on a Windows partition and indeed the problem doesn't
appear there.

>> Here's an updated diff:
>
> Thanks, it would be nice if you could also provide a ChangeLog-style
> commit log message.  That'd make the job of pushing the changes much
> easier.

Right, I just figure that it's easier to save that work until the end
until most/all of the design considerations are taken care of.

Also, I switched from using the geometry attribute (like c77ffc8019
used) to the workarea attribute as according to the GDK doc[1]:

  The work area should be considered when positioning menus and similar
  popups, to avoid placing them below panels, docks or other desktop
  components.

I've attached a patch below.

Attachment: 0001-Fix-the-placement-of-GTK-menus-on-multi-monitor-syst.patch
Description: multi-monitor-patch

Footnotes: 
[1]  
https://developer.gnome.org/gdk3/stable/GdkScreen.html#gdk-screen-get-monitor-workarea


reply via email to

[Prev in Thread] Current Thread [Next in Thread]