<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Certain menus display at wrong position in configured multi-monitor setups under Wayland"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=764310#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Certain menus display at wrong position in configured multi-monitor setups under Wayland"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=764310">bug 764310</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
        <pre>gtkmenu uses the workarea of the monitor where the menu is placed by doing:

 gdk_device_get_position (pointer, ..., &x, &y);
 monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
 gdk_screen_get_monitor_workarea (screen, monitor_num, &workarea);

On Wayland, there is no global coordinates so gdk_device_get_position() returns
relative position to the toplevel, so it will most likely fall in the first
monitor. That in itself is wrong, but it won't cause much problem for most as
the first monitor is usually placed in (0, 0).

But if the monitor layout is set so the first monitor is shifted down, these
values returned by gdk_device_get_position() fall outside of any monitor. 

                +----------------------+
 x              |                      |
                |                      |
+---------------+                      |
|               |                      |
|               |                      |
|               |                      | 
|               |                      | 
+---------------+----------------------+


PS: I reckon X11 impl is wrong as well, not as bad, but still wrong as it uses
the workarea which is shifted down and reduced in height by the location of the
first monitor, using such a monitor layout so the menu is misplaced as well on
X11..</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>