After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778834 - GtkMenu opened outside of screen
GtkMenu opened outside of screen
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.22.x
Other Windows
: Normal major
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-02-17 13:54 UTC by Michail Crayson
Modified: 2017-02-19 11:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michail Crayson 2017-02-17 13:54:42 UTC
When a GtkMenu is popped up when the mouse pointer is near the right-hand and/or bottom screen edges, the menu is positioned partly outside the screen.
Comment 1 Michail Crayson 2017-02-17 13:57:37 UTC
The bug happens when running in HiDPI mode (for example with GDK_SCALE=2).

This happens both when the menu is opened with gtk_menu_popup() and with gtk_menu_popup_at_pointer().

Tested on Windows 7 and Windows 10.
Comment 2 Michail Crayson 2017-02-17 14:05:11 UTC
I'm guessing perhaps this is related to bug 778835.
Comment 3 Andrew Chadwick 2017-02-17 23:56:46 UTC
I've uploaded some time-limited debugging builds of the gtk-3-22 branch at d825c34ca3 plus attachment 346081 [details] [review] from bug 778835 for testers who are using current MSYS2. Please can everyone affected by this bug test with them?

    https://filebin.net/8wf4l3dl4nbdblu9

To install these .pkg.tar.xz files, download them and type:

    $ pacman -U /path/to/mingw-w64-*-gtk3-git-3.22.8.14.gd825c34ca3_patch346081-1-any.pkg.tar.xz

To revert to a stock MSYS2 GTK3 installation (to allow future upgrades to work):

    $ pacman -Syyuu   # upgrade the rest of the system as needed
    $ pacman -S mingw-w64-{x86_64,i686}-gtk3

Git packages are marked as conflicting with non-git ones, so you will be asked several times during installation whether you want to proceed. Enter "y" each time.
Comment 4 Andrew Chadwick 2017-02-18 00:04:52 UTC
Reproduced with stock MSYS2 mingw-w64-*-gtk3 version 3.22.7-1 and 

    $ GDK_SCALE=2 gtk3-demo --run=menus

The patched build in comment 3 fixes this for me with the same command. Also I can activate the menus correctly with my graphics tablet now: it seems to fix bug 778508 too☺
Comment 5 Michail Crayson 2017-02-19 10:29:48 UTC
The test build fixes this bug too for me. Great stuff!